Activation and Deactivation of Card Token
#
Call Details- Resource:
/v1/cards/{card.token}
- HTTP Method:
PUT
- Request Format:
JSON
- Response Format:
JSON
- Header Parameters:
Parameter | Description | Format | Required |
---|---|---|---|
merchant_id | Merchant code on Carat. The production and certification codes will be different. | < 15 AN | YES |
merchant_key | Merchant authentication key on Carat. The production and certification keys will be different. | < 80 AN | YES |
token | Token obtained from the token creation service Learn more.. If Authorization is not sent, this field becomes mandatory. | = 66 AN | COND. |
Authorization | The authentication signature of the merchant must be sent in Bearer {signature} format. Example: Bearer JHVGytfdgauygdauiw78264284527852897hagdg . If token is not sent, this field becomes mandatory. | < 2000 AN | COND. |
Content-Type | Must be sent with the value application/json . | = 15 AN | YES |
#
Flow#
ExamplesBelow are some examples of calling the card token activation and deactivation service using the cURL tool.
#
Activation of the card token with token authenticationRequest:
To use this example, remember to set the variable {{url}}
with the value
esitef-homologacao.softwareexpress.com.br
#
Activation of the card token with signature authenticationResponse:
Response codes
See reference on API codes - response codes
#
Deactivation of the card token with token authenticationRequest:
To use this example, remember to set the variable {{url}}
with the value
esitef-homologacao.softwareexpress.com.br
#
Deactivation of the card token with signature authenticationResponse:
Response codes
See reference on API codes - response codes
#
Request ParametersThe table below describes the request parameters for the card token activation and deactivation service:
Parameter | Description | Format | Required |
---|---|---|---|
card.token | Identification of the stored card. This token is used in place of the customer's card for transactions with Carat. | = 88 AN | YES |
card | |||
status | Card status. ATV (Active) and INA (Inactive). | < 3 AN | YES |
#
Response ParametersIn case of success, the HTTP response code will be 200
. Any other code should be interpreted as an error. The table below describes the response parameters for the card token activation and deactivation service:
Parameter | Description | Format |
---|---|---|
code | Carat response code. Any code different from 0 (zero) means failure. Learn more. | < 4 N |
message | Carat response message. | < 500 AN |
store | ||
status | Storage transaction status on Carat. Learn more. | = 3 AN |
nsua | Unique sequential number of the storage transaction on Carat. | = 15 AN |
nita | Stored item identification on Carat. | = 64 AN |
customer_id | Customer identification for card storage. | < 20 AN |
authorizer_id | Authorizer code used for storage. | < 3 N |
card | ||
token | Identification of the stored card. This token is used in place of the customer's card for transactions with Carat. | = 88 AN |
suffix | Last 4 digits of the customer's card. | = 4 AN |
bin | First 6 digits of the customer's card. | = 6 AN |
status | Card status. ATV (Active) and INA (Inactive). | < 3 AN |