Skip to main content

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.

  1. Start Checkout Flow with card payment method and processPayment = false.
  2. CheckoutJS returns a paymentToken.
  3. Use the paymentToken to retrieve public_person_id and public_card_id.
  4. Send the payment with card method (CREDITCARD or DEBITCARD).

Authorization​

HeaderValue
X-Auth-TokenMY_ACCESS_TOKEN
  • For card checkout transactions, paymentToken is the identifier that authenticates and links the checkout session to the tokenized customer/card data generated by CheckoutJS.
  • paymentToken is 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}

2) Process Checkout Payment​

Use the returned public_person_id and public_card_id to process the payment.

POST /checkout/sendPayment

Credit Card and Debit Card transactions​

  • For credit cards, set payment.method = CREDITCARD.
  • For debit cards, set payment.method = DEBITCARD and include 3DS authentication data (authentication object).
  • 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_id
  • reference_id
  • public_person_id
  • public_card_id
  • payment.amount
  • payment.asset
  • payment.method

If you process with pre-authorization (delay_capture = true), you can later: