Enroll Payment Method
This request enrolls a payment method for a customer. With the information provided by WHITELABEL after the customer selects the payment method to enroll, you will be able to save it for future purchases in the payment method object created.
Note that this request requires an X-Idempotency-Key. Check the Authentication.
Webhooks
We recommend listening to Webhooks to stay up to date with the state of the enrolled payment methods of your customers.
In case a customer enrolls the same card twice but with new expiration date or cardholder info, we will unenroll the previously enrolled card and keep the new one.
Available payment methods for enrollment
The following payment methods can be enrolled using this endpoint:
| Payment Method | Type |
|---|---|
| Cards | CARD |
| Nupay | NU_PAY_ENROLLMENT |
| PayPal | PAYPAL_ENROLLMENT |
| Daviplata | DAVIPLATA_ENROLLMENT |
| MercadoPago Wallet | WALLET_CONNECT |
| dLocal Yape | YAPE_ENROLLMENT |
| dLocal Smart PIX | SMART_PIX |
| Astropay | ASTROPAY_ENROLLABLE |
| Adyen PIX Biométrico | PIX_BIOMETRICO |
Payment Method Availability
When you retrieve the payment methods available to enroll, only the ones which you have connected, created a route, and added to your checkout will be present. For more information about enrollment workflows, see the Enroll Payment Methods guide.
/customers/sessions/{customer_session}/payment-methodsPath Parameters
The customer session that has been created for the enrollment using the Create Customer Session endpoint (UUID, 36 chars).
Body application/json
The unique identifier of the account. You find this information on the WHITELABEL dashboard (UUID, 36 chars).
The payment method type (MAX 255; MIN 3; Payment Type List).
The transaction’s country code (MAX 2; MIN 2; ISO 3166-1).
Per-card control for Card Account Updater. When set to false, this card is excluded from Card Account Updater and will not receive automatic card-detail updates. When omitted, the card follows your account’s Account Updater configuration. Applies at enrollment.
Indicates whether to verify the payment with a verify transaction or not. You’ll need to have a provider defined in your CARD route. False by default. Access the Card Verification page for more details.
Response
201
400
401
403