Skip to main content
POST
Prepare a payment method

Headers

Idempotency-Key
string
required

A client-generated idempotency key to ensure operations are only processed once even if a client retries the operation. The V4 UUID format, as defined in RFC 4122, is recommended to avoid collisions but is not required.

Maximum string length: 255

Body

application/json

Request body for preparing a customer payment method.

savePaymentMethod
boolean
default:false
required

Whether the collected method is saved to the customer's profile and reusable for future appointments. When false, the method is scoped to a single appointment and a digital wallet such as Apple Pay may be used. When true, collection is limited to methods that can be reused.

Response

Ok. The operation succeeded.

A customer-bound setup session for securely collecting a new payment method. The setup identifier is not itself a reusable payment method identifier.

paymentMethodSetupId
string
required

The identifier for this setup, supplied to appointment creation once the setup is complete.

clientSecret
string
required

The client secret associated with the payment processor integration.

expiresAt
string<date-time>
required

The expiration date-time for this setup session.

paymentMethodReuseAuthorized
boolean
required

Whether the collected method may be reused for future appointments.