payment-methods

Create a payment method

Starts attaching a payment method to a customer by exchanging a client-side confirmation token for a setup intent. Complete any additional authentication client-side using the returned client secret.

post/payment-methods/

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/payment-methods/
  • Auth: HTTP bearer

Request body

customerIdstring

Paid customer ID to attach the payment method to.

externalCustomerIdstring

Your external customer ID to attach the payment method to.

confirmationTokenstring required

Confirmation token generated client-side by the payment processor's elements (e.g. a Stripe ConfirmationToken ID).

returnUrlstring uri

URL the customer is redirected to after completing any additional authentication step (e.g. 3-D Secure).

metadataobject

Key-value metadata stored on the setup intent.

Response

201

externalPaymentMethodIdstring nullable required

The payment processor's identifier for the attached payment method, when already available.

customerIdstring required

The customer the payment method is being attached to.

Changes

No recorded changes to this operation across all 1 revision of this API.