Skip to content
API DocsDocs

Tokenizing a Card

Securely vault a customer's card for future charges

2 min readUpdated Mar 24, 2026

Card tokenization lets you securely vault a customer's card once and reuse it for future charges without handling raw PAN data again. The tokenize endpoint is a synchronous, no-redirect operation — it returns a cardToken immediately with no 3DS challenge, no webhook, and no redirect.

#What You Get Back

After tokenization, Exirom returns:

  • token — the card reference to store on your side; pass this instead of card details on future charges
  • cardMask — masked PAN for display (e.g. 411111******1111)
  • cardBrand, cardType, issuingBank, cardCountry — BIN-derived metadata useful for fraud checks and display
  • expirationDate — when this token expires (default 90 days, configurable)

The original card number is never stored by you. Only the token is retained.

#Token Lifetime

SettingBehavior
Default90 days from creation
Custom (expirationDate)Shorter of default and requested date
Expired / inactiveCharge attempts are declined

#What Happens Next

After tokenizing, you can:

  1. Charge immediately — use the token to process a one-click payment via POST /payments/card/charge
  2. Set up recurring billing — create a subscription plan that auto-charges on a schedule
  3. Store for later — vault the token and charge when the customer initiates a future purchase

3DS authentication only applies when charging a saved card, not during tokenization. If the issuer requires 3DS on a charge, the charge response will include a challengeUrl.

#Sandbox Test Cards

All test cards tokenize successfully — card behavior only differs at charge time:

Card NumberTokenizeCharge Behavior
4111111111111111SuccessApproved
5500000000000004SuccessApproved
4000000000003220SuccessCUSTOMER_VERIFICATION (mock 3DS)
4000000000000002SuccessFAILED with decline code
Was this helpful?