Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Handle push notifications

NFC Wallet uses push notifications to notify your digital wallet application. Notifications are sent by the NFC Wallet backend.

Handling NFC Wallet push notifications is required to support LCM, transaction notifications, and card enrollment flows where the digital card is activated directly by the issuer.

Route notifications using sender

Read sender key from message payload data and route the notification to the right handler:

  • CPS: digital card operations (LCM)

  • TNS: transaction notifications

  • MG: payment key replenishment triggered by the TSP

Process CPS notifications (digital card operations)

Forward CPS notifications using ProvisioningBusinessService.processIncomingMessage().

The NFC Wallet SDK processes the push and interacts with the NFC Wallet backend.

Implement PushServiceListener

Implement PushServiceListener to handle callback to track the digital card operation.

Supported callbacks:

  • onUnsupportedPushContent: Triggered when the push payload is not supported by the SDK.

  • onComplete: Triggered when processing completes successfully (for example, after provisioning a card profile and payment keys).

  • serverMessage: Triggered when the backend returns a server message The SDK provides a ProvisioningServiceMessage object and a tokenizedCardId.

When you receive ProvisioningServiceMessage, call getMsgCode to determine which operation the backend is executing:

  • REQUEST_INSTALL_CARD: message indicates request for card to be to installed.

  • REQUEST_REPLENISH_KEYS: message indicates request for a replenishment.

  • REQUEST_RESUME_CARD: message indicates request to move a card from suspended to active.

  • REQUEST_SUSPEND_CARD: message indicates request to move a card from active to suspended.

  • REQUEST_DELETE_CARD: message indicates request to delete a card.

  • REQUEST_RENEW_CARD: message indicates request to renew a card

Process TNS notifications (transactions)

Transaction notifications provide details about completed payment transactions. Use MGTransactionHistoryService to retrieve transaction records.

Through the push notification, the digital wallet application obtains the following information via the message payload data :

  • Key sender: TNS.

  • Key action: TNS:PaymentTransactionNotification.

  • Key digitalCardId: Digital card identifier. Use it with MGTransactionHistoryService.refreshHistory() to fetch the transaction

  • Key transactionRecordType: Present only for co-badged cards. Pass it to MGTransactionHistoryService.refreshHistory() to fetch only the relevant records (primary or auxiliary).

Process MG notifications (replenishment)

The TSP can request payment key replenishment. Use ProvisioningServiceManager.sendRequestForReplenishment to replenish keys.

Through the push notification, the digital wallet application obtains the following information via the message payload data

  • sender: MG.

  • action: MG:ReplenishmentNeededNotification.

  • "digitalCardId: Digital card identifier. Use it with ReplenishmentService.replenish(digitalCardID:isForced:).

Last updated

Was this helpful?