Tokenizar cartao
Transactions
Tokenize card
Securely tokenize a credit card
POST
Tokenizar cartao
Tokenizes a credit card using the merchant’s active acquirer, without storing PAN/CVV in Safefy’s database. The returned token can be used in
POST /v1/transactions via the cardToken field.
Request
POST /v1/card-tokenize
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
cardNumber | string | yes | Card number (13-19 digits) |
cardHolderName | string | yes | Name printed on the card |
cardExpirationMonth | int | yes | Expiration month (1-12) |
cardExpirationYear | int | yes | Expiration year (e.g. 2028) |
cardCvv | string | yes | Security code (3-4 digits) |
Responses
200 — Success
| Field | Type | Description |
|---|---|---|
cardToken | string | Card token (prefix ct_). Time-limited validity. |
last4 | string | Last 4 digits of the card |
brand | string | Card brand (e.g. visa, mastercard) |
400 — Invalid data
401 — Invalid JWT token
422 — Acquirer doesn’t support tokenization
Authorizations
Token JWT obtido via /v1/auth/token
Body
application/json
Numero do cartao (13-19 digitos)
Example:
"4111111111111111"
Nome impresso no cartao
Example:
"JOAO SILVA"
Mes de expiracao (1-12)
Example:
"12"
Ano de expiracao (4 digitos)
Example:
"2028"
Codigo de seguranca (3-4 digitos)
Example:
"123"