Push Provisioning
Step 1: Showing the Add to Wallet button
Your issuer application uses the Push Provisioning SDK to check whether the target xPay Wallet is supported on the device and whether a token already exists for the card. Based on the result, it shows or hides the Add to Wallet button.
Follow these wallet brand guidelines for using Add to Wallet in your issuer application:
Huawei Pay Support is available only for domestic schemes.
Warning
Huawei Pay is not supported by international payment networks (for example, Mastercard and Visa). Only domestic schemes can be supported in specific cases. Check with Thales for the conditions of use.
Starting June 10, 2024, Google Wallet requires Android 9 or higher.
Using the last four digits of the PAN, the issuer application can retrieve the token for a card that is already provisioned to a wallet on the device (Samsung Pay and Google Pay for Android).
Each token includes:
The token ID.
The last four digits of the digital card (DPAN).
The token state (digitization status).
OEMPayType type = OEMPayType.GOOGLE_PAY; // or OEMPayType.SAMSUNG_PAY
GetTokenInput input = new GetTokenInput("1234"); // last four digits of the physical card (FPAN)
PushProvisioning pushProvisioning = TPCManager.getInstance().getPushProvisioning(type);
pushProvisioning.getToken(input, new TPCSDKListener<Token>() {
@Override
public void onStart() {
}
@Override
public void onSuccess(TPCResult<Token> result) {
//Token can be retrieved using result.getResult().
//result.getResult() will return null if the OEM wallet does not have a corresponding token.
//Token state is used as follows:
if(result.getResult()==null || TextUtils.isEmpty(result.getResult().getState())){
//API did not return a token.
//Displays the "Add to GPay/SPay" button.
}else{
Token token = result.getResult();
if(type==OEMPayType.GOOGLE_PAY){
//For Google Pay.
try {
int tokenState = Integer.parseInt(token.getState());
switch (tokenState){
case CardDigitizationStatus.GOOGLE_PAY_TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION:
// Refer to Token life cycle management for Activate action.
// card is pending for ID&V.
break;
case CardDigitizationStatus.GOOGLE_PAY_TOKEN_STATE_PENDING:
case CardDigitizationStatus.GOOGLE_PAY_TOKEN_STATE_SUSPENDED:
case CardDigitizationStatus.GOOGLE_PAY_TOKEN_STATE_ACTIVE:
//Card is already added.
break;
case CardDigitizationStatus.GOOGLE_PAY_TOKEN_STATE_UNTOKENIZED:
//Display "Add to GPay" button.
break;
}
} catch (NumberFormatException e) {
//Handles the exception.
}
}else if(type==OEMPayType.SAMSUNG_PAY){
//For Samsung Pay.
String tokenState = token.getState();
switch (tokenState){
case CardDigitizationStatus.SAMSUNG_PAY_PENDING_PROVISION:
// Refer to Token life cycle management for Activate action.
// card is pending for ID&V
break;
case CardDigitizationStatus.SAMSUNG_PAY_ACTIVE:
case CardDigitizationStatus.SAMSUNG_PAY_EXPIRED:
case CardDigitizationStatus.SAMSUNG_PAY_PENDING_ENROLLED:
case CardDigitizationStatus.SAMSUNG_PAY_SUSPENDED:
case CardDigitizationStatus.SAMSUNG_PAY_PENDING_ACTIVATION:
//Card is already added.
break;
case CardDigitizationStatus.SAMSUNG_PAY_DISPOSED:
//Displays the "Add to SPay" button.
break;
}
}
}
}
@Override
public void onError(TPCSDKException exception) {
// specific for Samsung Pay
Throwable exceptionCause = exception.getCause();
if (exceptionCause != null && exceptionCause instanceof TPCSpayException) {
// get more details of the error for Samsung Pay
TPCSpayException spayException = (TPCSpayException) exceptionCause;
}
}
});For Google Pay, the status of the token is as follows:
GOOGLE_PAY_TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION
Card is digitized, pending for ID&V.
GOOGLE_PAY_TOKEN_STATE_PENDING
Card is digitized.
GOOGLE_PAY_TOKEN_STATE_SUSPENDED
Card is digitized.
GOOGLE_PAY_TOKEN_STATE_ACTIVE
Card is digitized.
GOOGLE_PAY_TOKEN_STATE_UNTOKENIZED
Card is not digitized.
CARD_IS_NOT_DIGITIZED
Card is not digitized.
For Samsung Pay, the status of the token is as follows:
SAMSUNG_PAY_PENDING_PROVISION
Card is digitized, pending for ID&V.
SAMSUNG_PAY_ACTIVE
Card is digitized.
SAMSUNG_PAY_EXPIRED
Card is digitized.
SAMSUNG_PAY_PENDING_ENROLLED
Card is digitized.
SAMSUNG_PAY_PENDING_ACTIVATION
Card is digitized.
SAMSUNG_PAY_SUSPENDED
Card is digitized.
SAMSUNG_PAY_DISPOSED
Card is not digitized.
Caution
For Google Pay, if the card still appears as
NOT_DIGITIZEDafter digitization, check that the issuer application is configured correctly in the TSP portal.For Samsung Pay, some issuers must register multiple
ISSUER NAMEvalues in the portal. This depends on the issuer application and/or TSP requirements. Make sure theISSUER NAMEvalue in the API matches the value registered in the portal. The API returns only exact matches.The
getTokenAPI is not supported for Huawei Pay. UseisCardDigitizedto check the digitization status.
Step 2: Provisioning a request
On Android, the success result varies by OEMPayType. For Samsung Pay, it returns a Card object. For Huawei Pay, it returns a Boolean. For Google Pay, SDK 2.0.0 and later return a GoogleProvisioningResult, which contains the token ID when available.
Samsung Pay
Card
Google Pay
GoogleProvisioningResult
Huawei Pay
Boolean
Last updated
Was this helpful?