Skip to main content

Tokenize card

POST/api/v1/bank/wallet/tokenization/Bearer Token

Request headers

HeaderValueRequired
AuthorizationBearer {A55_ACCESS_TOKEN}Yes
Content-Typeapplication/jsonYes
Idempotency-KeyUUID v4Recommended

Request body

FieldTypeRequiredDescription
wallet_uuidstring (UUID)YesWallet to associate the token with
card_numberstringYesCard PAN (e.g., 4024007153763191)
card_namestringYesCardholder name as printed on the card
card_expiry_monthstringYesExpiry month MM (e.g., 12)
card_expiry_yearstringYesExpiry year YYYY (e.g., 2030)
card_cvvstringYesCard verification value
payer_tax_idstringYesCardholder tax ID (CPF, RFC, RUT, CUIT)
payer_emailstringNoCardholder email for notifications
Card data handling

When sending raw card data, A55 encrypts and vaults it immediately upon receipt. If you prefer to avoid handling card data on your backend, use the A55Pay SDK or Checkout Page instead.


Response fields

FieldTypeDescription
token_uuidstringReusable token identifier for future charges
card_brandstringCard brand (visa, mastercard, amex, elo)
card_last_fourstringLast 4 digits of the card
card_expiry_monthstringExpiry month
card_expiry_yearstringExpiry year
statusstringactive on success
created_atstringISO 8601 creation timestamp

HTTP status codes

StatusDescription
200Card tokenized successfully
400Invalid card data or missing required fields
401Invalid or expired Bearer token
403Insufficient permissions for this wallet
404Wallet not found
409Card already tokenized for this wallet
422Card validation failed (invalid number, expired)
429Rate limit exceeded
500Internal server error — retry with exponential backoff

Code examples

curl -s -X POST https://core-manager.a55.tech/api/v1/bank/wallet/tokenization/ \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 880e8400-e29b-41d4-a716-446655440003" \
-d '{
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"card_number": "4024007153763191",
"card_name": "MARIA SILVA",
"card_expiry_month": "12",
"card_expiry_year": "2030",
"card_cvv": "123",
"payer_tax_id": "123.456.789-09",
"payer_email": "maria@example.com"
}'

Error response example

{
"status": "error",
"message": [
{
"code": "INVALID_CARD_NUMBER",
"source": "validation",
"description": "Card number failed Luhn check"
}
]
}