Tokenization
API data
API Gateway
This API is used for payment gateway operations:
- Production: https://api.sopague.com.br/gateway
- Sandbox: https://api-hmg.sopague.com.br/gateway
- Architecture: Representational State Transfer (REST)
What is tokenization?
Tokenization is an essential operation to increase transaction security. It replaces sensitive card data with a unique token, ensuring that sensitive information is not exposed during processing.
Generate a token using the card number
This operation lets you create a token for a card, protecting its information. To tokenize, send a POST request as shown below:
POST v1/cards/tokenization
Via REST request with the following body:
Request
{
"cardNumber":"string"
}
Data dictionary - Parameters
| PROPERTY | DESCRIPTION | TYPE | LOCATION | REQUIRED | SIZE |
|---|---|---|---|---|---|
| cardNumber | Card number to be tokenized | string | body | yes | 9 to 19 |
- 🟢 200
- 🔴 400
- 🔴 500
Tokenization completed successfully
[
{
"numberToken":" 4DB5E9B5-F30E-4416-8E41-20B539426B68"
}
]
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| numberToken | Token generated for the card | string |
Request error
[
{
"tag": "CardNumber",
"description": "Cartão inválido."
}
]
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| tag | Error tag | string |
| description | Error description | string |
Internal error
[
{
"tag": "",
"description": "Não foi possível executar comando. Erro desconhecido."
}
]
Data dictionary - Response
| PROPERTY | DESCRIPTION | TYPE |
|---|---|---|
| tag | Error tag | string |
| description | Error description | string |