Skip to main content

📄 Guide

When a cardholder adds a card to a digital wallet such as Apple Pay or Google Pay, or saves the card with a merchant or platform for future payments, the card scheme creates a token for that card. Payments are then made with the token instead of the real card number. One card can have several tokens at the same time, for example one in Apple Pay and one with an e-commerce platform. DCS gives you two ways to keep track of them:
  • Query endpoint: look up which tokens a card has and the status of each one, at any time.
  • Webhook notification: DCS pushes a notification when a token’s status changes. See Events and schema.
Only Visa cards are supported for now. Calling the query endpoint for a card of another scheme returns DAPI_CARD_SCHEME_NOT_SUPPORT.

List the tokens of a card

  • All supplied conditions apply together; only tokens matching all of them are returned.
  • No pagination: results are sorted by creation time, newest first, and at most the latest 500 are returned.
  • Provisioning attempts that have not completed yet are not listed.
  • When the card has no tokens, tokenizations is an empty array.
  • If the card does not exist or does not belong to your enterprise, DAPI_CARD_NOT_FOUND is returned. If tokenizationStatus is not one of the allowed values, DAPI_TOKENIZATION_STATUS_INVALID is returned.
Request example
Response fields (data.tokenizations[]) Response example

Token status

  • There is no final status: any status can change again. For example, when a cardholder adds the card back to a wallet, a DEACTIVATED token returns to INACTIVE and keeps its original tokenizationReferenceId. Keep processing later notifications for a token even after you receive DEACTIVATED.
  • New status values may be added when other card schemes are supported. Handle values you do not recognize gracefully.

Token requestors

tokenizationRequestor tells you who requested the token. The values are: APPLE_PAY, GOOGLE_PAY, ALIPAY, GRAB, STRIPE, OPENAI, ANTHROPIC, AMAZON, PAYPAL, PIPO, RESSO, UBER, SHOPEE, CTRIP, TWITTER, TRUEMONEY, AGODA, CLOUDFLARE, MICROSOFT, CTP, OTHERS
  • OTHERS means the requestor is not one of the values listed above. It does not mean the data is missing.
  • Values may be added over time. Handle values you do not recognize gracefully.

Status notifications

When a token’s status changes, DCS sends a webhook with webhookType = PAYMENT_TOKENIZATION. The fields in data are the same as those returned by the query endpoint, except that maskedTokenization is omitted if the token has no number of its own. See Events and schema for the field descriptions. Keep the following in mind:
  1. Notifications are sent only when tokenizationStatus changes, including when a new token is created. No notification is sent when only reasonMessage changes.
  2. Notifications start from the date this feature goes live. Changes before that are not sent. To get the full current picture, call the query endpoint.
  3. The same notification may arrive twice. Deduplicate by webhookId.
  4. Notifications are not guaranteed to arrive in order: several notifications for the same token may arrive out of sequence. The query endpoint is the source of truth for a token’s latest status. After receiving a notification, you can call it with the cardId and tokenizationReferenceId from the notification to confirm.

Next steps