Tokenized Card

This endpoint creates a Tokenized Card. Useful to configure specific orders through your backend with options like Interest-free and Fixed Installments.

What is a Tokenized Card?

A tokenized card is a secure digital representation of a payment card, where sensitive card details are replaced with a unique, non-sensitive token for safe transactions. While a tokenized card can be used as part of a backend integration workflow in Ecart Pay, its usage depends on a merchant's specific needs, and is therefore not strictly required for all cases.

Tokenized Cards are useful to configure Interest-free and Fixed Installments options before creating an order through your backend.



⚠️

IMPORTANT

To follow the steps below, it is essential to have the corresponding Authorization Token. For more information, please refer to the following documentation page: Authorization Token

Create Tokenized Card

💻

Visit our API Reference to test this endpoint.

Endpoint

{{baseURL}}/api/tokens

Headers

  • Authorization: {token}

Request Payload

  • cvc: String value for the card CVC
  • id: String value for the card id. See Customer Cards for further details.
  • fixed_installments: Optional boolean to configure Interest-free and Fixed Installments.
    • true: The order will be processed with Fixed Installments (also known as Deferred Payments).
    • false: The order will be processed with Interest-free installments.
  • installments: This will configure 3, 6, 9, 12, and 18 month installments.

Examples

Request

curl --location --request POST 'https://sandbox.ecartpay.com/api/tokens' \
--header 'Authorization: {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "{{card_id}}",
    "cvc": "123"
}
curl --location --request POST 'https://sandbox.ecartpay.com/api/tokens' \
--header 'Authorization: {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "cvc": "123",
  "id": "68a57024c534963c6e81c323",
  "fixed_installments": true,
  "installments": 3
  }'

Response

{
    "token": "ca_ef686e4f4a2d92e99"
}