Create Checkout Payment
This guide explains how to create Credit Card and Debit Card transactions in Checkout using the two-step card flow.
Overview
In this model, CheckoutJS collects and tokenizes the card data first, then your backend completes the payment through API calls.
- Start Checkout Flow with card payment method and
processPayment = false. - CheckoutJS returns a
paymentToken. - Use the
paymentTokento retrievepublic_person_idandpublic_card_id. - Send the payment with card method (
CREDITCARDorDEBITCARD).
Authorization
| Header | Value |
|---|---|
| X-Auth-Token | MY_ACCESS_TOKEN |
- For card checkout transactions,
paymentTokenis the identifier that authenticates and links the checkout session to the tokenized customer/card data generated by CheckoutJS. paymentTokenis used to continue the transaction flow and fetch tokenized IDs.
Flow
1) Get Person & Credit Card ID
Use the checkout paymentToken to get the tokenized IDs needed to process the payment.
GET /checkout/{paymentToken}
- For more details, see: Get Person & Credit Card ID
2) Process Checkout Payment
Use the returned public_person_id and public_card_id to process the payment.
POST /checkout/sendPayment
- For more details, see: Process Checkout Payment
Credit Card and Debit Card transactions
- For credit cards, set
payment.method = CREDITCARD. - For debit cards, set
payment.method = DEBITCARDand include 3DS authentication data (authenticationobject). - Optional pre-authorization is available for credit card by setting
payment.delay_capture = true.
Required data to process payment
After retrieving the tokenized IDs, send at least:
contract_idreference_idpublic_person_idpublic_card_idpayment.amountpayment.assetpayment.method
Related operations
If you process with pre-authorization (delay_capture = true), you can later: