Display digital cards
Overview
After Tokenization, your digital wallet application should show the end user their digital cards.
Provide a list view and a details view.
Use card status, card art, and metadata to drive the UI.
SDK integration
Use DigitalizedCardManager
DigitalizedCardManagerAfter Tokenization completes, use DigitalizedCardManager to access the NFC Wallet SDK persistent data and retrieve digital cards.
DigitalizedCardManager supports asynchronous and blocking calls:
AsyncHandler: Receive results via callbacks.AsyncToken: Block the calling thread until the operation completes.
AsyncToken blocks the calling thread. Avoid it on the UI thread.
Retrieve card list
After Tokenization completes, use DigitalizedCardManager.getAllCards() to retrieve all tokenized card IDs.
For the difference between identifiers, see Tokenized card ID versus digital card ID.
The examples below show how to retrieve tokenized card IDs with AsyncHandler and AsyncToken.
Tokenized card ID versus digital card ID
DigitalizedCardManager lists and retrieves cards using a tokenized card ID.
DigitalizedCard.getTokenizedCardID() returns the tokenized card ID.
This identifier is not the same as the digital card ID.
The NFC Wallet SDK uses two identifiers for the same card:
Tokenized card ID: Generated during secure provisioning. Also known as a CPS token ID. See Trigger provisioning.
Digital card ID: Generated during digitization. Also known as an MG card ID. See Digitize a card.
Use these helper methods to convert identifiers:
DigitalizedCardManager.getDigitalCardId(): Get the digital card ID from a tokenized card ID.DigitalizedCardManager.getTokenizedCardId(): Get the tokenized card ID from a digital card ID.
A TSP also provides its own digital card identifier.
Retrieve it in Card metadata.
Use it when troubleshooting with the TSP (VTS/MDES).
This identifier is different from the tokenized card ID and the digital card ID.
Retrieve digital card information
Use DigitalizedCard
DigitalizedCardDigitalizedCard represents a digitized card and exposes card data, such as:
DigitalizedCardStatusCard state:
ACTIVE,SUSPENDEDPayment keys status: Use it to detect replenishment needs.
DigitalizedCardDetailsgetLastFourDigits(): Last four digits of FPAN.getLastFourDigitsOfDPAN(): Last four digits of DPAN.getPANExpiry(): FPAN expiry date.getScheme(): Payment network (Visa, Mastercard, and PURE).
DigitalizedCard.getPaymentAccountReference()Payment Account Reference (PAR) for the primary contactless card.
Retrieve a DigitalizedCard from DigitalizedCardManager using the tokenized card ID.
Retrieve auxiliary card information
If the card is co-badged, you can retrieve additional properties from DigitalizedCard:
DigitalizedCard.hasAuxiliaryScheme(): Returnstrueif the card has an auxiliary scheme.DigitalizedCardDetailsgetAuxiliaryLastFourDigitsOfDPAN(): Last four digits of the auxiliary DPAN.getAuxiliaryScheme(): Payment network for the auxiliary card.
DigitalizedCard.getAuxiliaryPaymentAccountReference(): Payment Account Reference (PAR) for the auxiliary contactless card.
If the card is not co-badged, these properties return null.
Card metadata
Use MGCardEnrollmentService.getCardMetaData() and the digital card ID to retrieve card metadata, such as:
TSP issuer name
TSP ID (VTS, MDES, or another identifier)
PAR (payment account reference)
TSP digital card ID (
tokenId)
For full field coverage, see the SDK API reference.
TSP digital card ID (tokenId) maps to:
Mastercard (MDES):
tokenUniqueReferenceVisa (VTS):
tokenReferenceID
Card art
Use MobileGatewayManager.getCardArt() and the digital card ID to retrieve CardArt.
Use CardArt.getBitmap() to retrieve these images:
BANK_LOGO: Issuer logoCARD_BACKGROUND: Card backgroundCARD_BACKGROUND_COMBINED: Card background combined with the payment networkCARD_ICON: Card icon
Card art retrieval triggers network requests; cache images within the digital wallet application to improve performance.
The sample application demonstrates a simple local caching approach:
Last updated
Was this helpful?