Card payments for Payment Setup API
Last updated: June 24, 2026
To accept card payments, you must:
- Create a payment setup.
- Update the payment setup with the card details.
- Confirm the payment.
Call the Create a payment setup endpoint.
Information
The Payment Setup API supports idempotency. You can safely retry API requests without the risk of duplicate requests.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payments/setups
1{2"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",3"currency": "USD",4"amount": 2000,5"reference": "ORDER_01234",6"description": "Card payment",7"payment_type": "Regular",8"settings": {9"success_url": "https://example.com/payments/success",10"failure_url": "https://example.com/payments/failure"11}12}
In the request body, provide the following:
processing_channel_id– The processing channel's unique identifieramount– The payment amountcurrency– The payment currency
1{2"id": "set_rcmepwrchqab2wsergcafvijfy",3"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",4"amount": 2000,5"currency": "USD",6"payment_type": "Regular",7"reference": "ORDER_01234",8"description": "Card payment",9"payment_methods": {10"card": {11"status": "pending",12"flags": []13}14},15"available_payment_methods": [16"card"17],18"settings": {19"success_url": "https://example.com/payments/success",20"failure_url": "https://example.com/payments/failure"21}22}
For card, payment_methods contains the following fields:
status– The status of the payment method.flags– An array of error codes or indicators that highlight missing or invalid information.
When the customer selects card as the payment method on the checkout page, collect their card details and call the Update a payment setup endpoint to submit them.
You can provide either a card token or the full card details.
A token is a secure representation of sensitive payment details. Requesting a payment with the token ensures that the details do not reach your server.
When updating the payment setup, provide the following fields:
| Field | Description |
|---|---|
object | A Checkout.com token representing the card. Required if |
string | The token identifier, prefixed by Required |
string | The card account holder type. Supported values:
Required |
string | The card account holder's first name. Max length: 35 |
string | The card account holder's last name. Max length: 35 |
string | The card account holder's middle name. Max length: 35 |
boolean | Indicates whether the ANI (account name inquiry) check is performed with the card scheme (Visa or Mastercard). |
object | The customer's phone number. |
string | The phone number's international country calling code. Min length: 1 |
string | The phone number. Min length: 6 |
boolean | Set to |
string | The preferred card scheme for co-badged cards. Supported values:
|
1{2"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",3"currency": "USD",4"amount": 2000,5"reference": "ORDER_01234",6"description": "Card payment",7"payment_type": "Regular",8"payment_methods": {9"card": {10"token": {11"id": "tok_4gzeau5lnbcubj3fjzaqpdbdrm"12},13"account_holder": {14"type": "individual",15"first_name": "Toby",16"last_name": "Arden"17}18}19}20}
1{2"id": "set_rcmepwrchqab2wsergcafvijfy",3"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",4"amount": 2000,5"currency": "USD",6"payment_type": "Regular",7"reference": "ORDER_01234",8"description": "Card payment",9"payment_methods": {10"card": {11"status": "ready",12"flags": [],13"schemes": [14"visa",15"mastercard"16]17}18},19"available_payment_methods": [20"card"21],22"settings": {23"success_url": "https://example.com/payments/success",24"failure_url": "https://example.com/payments/failure"25}26}
The response returns a ready status when the payment details pass validation. The payment is ready to confirm.
When the payment status changes to ready, confirm the payment by calling the Confirm a payment setup endpoint and provide:
- The payment setup
idas the{id}path parameter. cardas the payment method name.
post
https://{prefix}.api.checkout.com/payments/setups/{id}/confirm/card
A successful response returns a payment_id that you can use to track the payment.