Get the card digitization state
Get the card digitization state
Use this guide to determine whether a card is already digitized in a specific wallet on the device. The issuer application uses this state to decide whether to show Add to wallet or Activate card, or to hide both.
You typically call this API when:
the issuer application starts, or
the end user opens a card details screen.
For the overall push provisioning flow, see Implement push to digital wallets.
Overview
The issuer application uses the D1 SDK to check the card Tokenization status in the mobile device. Based on the returned state, the issuer application updates the UI:
DIGITIZED– The card is already tokenized in the wallet on this device. Hide Add to wallet and Activate card.NOT_DIGITIZED– The card is not tokenized. Show Add to wallet.PENDING_IDV– The digital card is created but pending ID&V. Show Activate card if in-app authentication is supported.
Flow
Sequence diagram
Pre-requisites
Consumer account and card were registered in D1
SDK is properly initialized
Issuer App called D1 SDK login API
Platform integration
On Android, the D1 SDK returns a CardDigitizationState through the getCardDigitizationState() API for the selected wallet, such as Google Pay or Samsung Pay.
The possible states are:
DIGITIZEDThe card has already been tokenized. No message or action is required.NOT_DIGITIZEDShow an Add to Google/Samsung Pay button. Refer to the Google Pay brand guidelines for more information. The next step is to push the card into the wallet as explained in Push to the digital wallet.PENDING_IDVShow an Activate card button if issuer application authentication is supported. After successful authentication, callactivateDigitalCard()to activate the digital card.
Use the API that matches the card identifier available in the issuer application:
Use
D1PushWallet.getCardDigitizationState(cardID, wallet)when you have the cardID.For D1 SDK v4.4.0 and later, use
PushProvisioningService.getCardDigitizationState(wallet, last4)when you only have the last four digits, for example from card metadata.
Use card ID
Use this API when the issuer application has the cardID.
Use the last four digits (Recommended)
The D1 SDK checks the digitization state locally on the device and does not require a network call. This reduces latency and improves issuer application performance.
On iOS, the D1 SDK returns a CardDigitizationResult object that includes:
the
CardDigitizationState, andoptional
PKPassobjects (localPKPassandremotePKPass) that can be used to display device-specific information such asdeviceName.
The possible states are:
digitizedThe card is already tokenized. Hide Add to Apple Wallet.notDigitizedDisplay aPKAddPassButton. This state is returned when at least one device (for example, iPhone or paired Apple Watch) is not yet tokenized.pendingIDVLocal/pendingIDVRemoteTokenization is pending ID&V for either the phone (pendingIDVLocal) or the watch (pendingIDVRemote). Show an appropriate Activate on your phone/watch button, authenticate the end user in the issuer application, then callactivateDigitalCard().
Use the API that matches the card identifier available in the issuer application:
Use
D1Task.cardDigitizationState(_:)when you have thecardID.For D1 SDK v4.4.0 and later, use
PushProvisioningService.cardDigitizationState(withLast4:)when you only have the last four digits, for example from card metadata.
Use card ID
Use the last four digits (Recommended)
The D1 SDK checks the digitization state locally on the device and does not require a network call. This reduces latency and improves issuer application performance.
For complete D1 SDK details, see the API reference.
Last updated
Was this helpful?