This page's content:

Endpoints

https://api.ebanx.com/ws/token

https://sandbox.ebanx.com/ws/token

HTTP Method

POST

Response

JSON

The token operation is used to create a token for a given credit card to be used for recurrent payments.

For this method, you will need to wrap the request parameters in a JSON object and send them as the value of a parameter called request_body.

It’s important to know that the tokens expire after 14 months of its last use.
Notice: To generate the token and check the credit card authenticity, EBANX creates a temporary transaction that will not be captured.

Request parameters

integration_key string, length 100, required

Your unique and secret integration key.

public_integration_key string, length 100, required

Your unique and public integration key. You can do a token operation using this key instead of the integration key when the request is from the client of your customer (browser, app, etc…). By doing this, you don’t have to deal directly with the credit card information of your customer.

payment_type_code string, length 32, required

The credit card scheme: amex, aura, diners, discover, elo, hipercard, mastercard, visa.

token string, length 32-128, unique, optional

This must be set if you want to inform the token instead of letting EBANX create one.

country string, length 2, required

The two-letter country code for the customer country. The available codes are:

  • br: Brazil.
  • co: Colombia.
  • mx: Mexico.
creditcard.card_number string, length 14-19, required

The credit card number (14-19 digits, must pass the Luhn algorithm).

creditcard.card_name string, length 64, required

The cardholder name, as written in the credit card.

creditcard.card_due_date string, length 7, mm/yyyy, required

The credit card valid thru date (formatted as mm/yyyy).

creditcard.card_cvv string, length 3-4, required

The Card Verification Value (CVV) (3-4 digits).

Response parameters

status string

The status of the request (SUCCESS or ERROR).

payment_type_code string, length 32

The credit card scheme.

token string, length 32-128, unique

The generated token or the same one that was informed in the request.

masked_card_number string, length 14-19

The masked credit card number. This can be stored and shown to the customer.