Enroll wallet
Overview
Enroll your 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 call 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 devices that support contactless payments. See Check contactless capability.
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 (
WalletSecureEnrollmentService.isEnrolled()returnsfalse).If you support contactless payments, confirm the device is eligible. See Check contactless capability.
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.
Create a
WalletSecureEnrollmentServiceinstance.Check
wse.isEnrolled().If needed, call
wse.enroll()to start the process. If the operation is successful, the wallet secure enrollment is completed, otherwise, an error will be thrown.
After wallet secure enrollment completes successfully, continue with Tokenize a card.
Errors
When wallet enrollment fails, handle these error types:
clientError: An internal SDK error. A message is provided to the digital wallet application.serverError: A backend error. A message,httpStatus,errorCode, and optionaladditionalInfoare provided to the digital wallet application.networkError: The device has no internet connection.
Deprecated APIs
The following example demonstrates the use of WalletSecureEnrollmentService.State and WalletSecureEnrollmentService.eventStream APIs which are deprecated.
These are the possible events of WalletSecureEnrollment when the WalletSecureEnrollmentService.eventStream (deprecated) API is used:
.started: Wallet secure enrollment process is started..completed: Wallet secure enrollment process is completed..errorEncountered: The wallet secure enrollment error is returned.
Last updated
Was this helpful?