Replenish payment keys
Overview
Payment keys (SUK or LUK) are required to compute EMV cryptograms for contactless payments.
In a Host Card Emulation (HCE) model, payment keys are temporary. Replenish them before they run out. This prevents payment interruptions.
This guide covers when to replenish and how to trigger it.
The NFC Wallet SDK supports these payment key types:
SUK (Single Use Key): Use one key per transaction. Used for Mastercard and PURE (white label EMV).
LUK (Limited Use Key): Use one key for multiple transactions. Used for Visa.
Prerequisites
Configure replenishment thresholds (onboarding)
Configure replenishment thresholds during onboarding with the Thales delivery team.
When you define thresholds, consider:
SUK: Remaining SUK count that triggers replenishment.
LUK: Remaining transaction count and LUK expiration time.
SDK integration
Detect when replenishment is required
Use one (or both) of these signals:
Proactive check: Read the digital card status.
Reactive push (TSP-triggered): Process
MG:ReplenishmentNeededNotificationfrom the TSP.
For push delivery and routing, see Handle push notifications.
Proactive check
Run this check for each digital card. Run it at app startup or after a payment.
Get
DigitalizedCardStatusfromDigitalizedCard.Call
DigitalizedCardStatus.needsReplenishment().
Perform this proactive check:
At regular application startup
Do not perform the check if application is stated for a payment - see warning below
After a payment
On event
onNextTransactionReady- see implement contactless payment callbacks.
When the card is set as default.
After connectivity returns (offline → online).
Run this check at application startup, after NFC Wallet SDK initialization.
Do not run this check when the end user launches the application to make a contactless payment. It can delay payment execution.
Trigger replenishment
Call ProvisioningBusinessService.sendRequestForReplenishment(...) to request new payment keys.
Get the card identifier.
Use the tokenized card ID - see Display digital card.
Send the replenishment request.
Call
sendRequestForReplenishment(...)and implementPushServiceListener:onComplete: The request is accepted.onError: The SDK cannot send the request. InspectProvisioningServiceError.
Process the replenishment push.
After you submit the request, the NFC Wallet backend sends a push notification. Your digital wallet application must process it. The SDK then retrieves the new payment keys.
Avoid terminating the digital wallet application while replenishment is in progress.
TSP-triggered replenishment
When you receive MG:ReplenishmentNeededNotification, trigger replenishment with forced = true.
Last updated
Was this helpful?