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

The payment method ID (typically from Stripe)

typeenum
The type of payment method
cardobject

Card details (present when type is ‘card’)

usBankAccountobject

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

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

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error