Create customer payment method by external ID

Creates a new payment method for a customer using a Stripe confirmation token.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

externalIdstringRequired
The external ID of the customer

Request

This endpoint expects an object.
confirmationTokenstringRequired
Stripe confirmation token for the payment method
returnUrlstringRequired
URL to redirect to after payment method setup
metadatamap from strings to anyOptional
Optional metadata to attach to the payment method

Response

Payment method created successfully
idstring or null

The payment method ID (typically from Stripe)

typeenum or null
The type of payment method
Allowed values:
cardobject or null

Card details (present when type is ‘card’)

usBankAccountobject or null

US bank account details (present when type is ‘us_bank_account’)

isDefaultboolean or null
Whether this is the customer's default payment method
createdAtdatetime or null

Errors