Enroll wallet
Overview
Enroll the digital wallet application after NFC Wallet SDK initialization and before you start Tokenization.
Wallet enrollment provisions the digital wallet application with the security assets required to use NFC Wallet services:
Run this once per wallet instance.
Run this only if the digital wallet application uses NFC Wallet services.
Run this only on eligible devices.
Sequence diagram
High-level flow to enroll your wallet application.
SDK Integration
Prerequisites
Before you start, verify the following:
Your digital wallet application is onboarded in the NFC Wallet backend.
You initialized the NFC Wallet SDK.
The wallet is not enrolled (see below).
Perform wallet enrollment
Wallet enrollment is a one-time action in the digital wallet application lifecycle.
Run it after SDK initialization, and only if the wallet is not enrolled.
Get a
WalletSecureEnrollmentBusinessServiceinstance.Check
getState()returnsWSE_REQUIRED.If needed, call
startWalletSecureEnrollment()to start wallet enrollment.Implement
WalletSecureEnrollmentListenerto track progress.
These are the possible callbacks:
onProgressUpdatewith stateWSE_STARTED: The process starts.onProgressUpdatewith stateWSE_COMPLETED: The process completes successfully.onError: The process fails with an error.
After wallet enrollment completes successfully, continue with Tokenize a card.
Error code details
When WalletSecureEnrollmentListener.onError(...) is triggered, the SDK provides a WalletSecureEnrollmentError.
It includes an error code and a message, plus additional fields depending on the failure type.
Parse WalletSecureEnrollmentError
The structure of the WalletSecureEnrollmentError object is as follows:
SDK error code: The error type for this operation.
CPS error code: The numeric error code returned by the CPS module (server-side).
HTTP status code: The HTTP status code returned for communication errors.
Message: A human-readable error description.
The error needs to be parsed as follows:
Read
getSdkErrorCode()to get aWalletSecureEnrollmentErrorCodesvalue.If the SDK error code indicates a communication error (
COMM_ERROR), readgetHttpStatusCode().If the SDK error code indicates a server-side error (
SERVER_ERROR), readgetCpsErrorCode().Read
getErrorMessage()for log-friendly description.If the SDK error code is
DEVICE_SUSPICIOUS, readgetStatusAdditionalInfo()and log it for troubleshooting.
Refer to WalletSecureEnrollmentErrorCodes in the Android API reference for the full list of codes.
WalletSecureEnrollmentErrorCodes
Use the following recommendations to decide whether to retry, stop, or reset the SDK.
Application binding key (notes)
As described in onboarding you must provide the application binding key.
If the application binding key is not provided or incorrect, enroll wallet will failed.
Please check warning and note below.
Last updated
Was this helpful?