3. Initialization
NFC Wallet SDK initialization
The digital wallet application (wallet) must initialize the SDK before the NFC Wallet SDK features can be used.
You can use TSHPay.configure API to initialise the SDK. The wallet is required to provide two parameters:
Cardholder verfication method (CVM)
Configuration PLIST file
The initialisation of the SDK must be performed each time the application is launched.
Cardholder verification method
The wallet is required to provide the authentication method during SDK initialisation. One of the following authentication methods is selected:
.userPresence: An authentication method using biometrics (TouchID/FaceID) with fallback to device passcode, or to use device passcode in cases where the biometrics are removed after the card digitization process. MPA can change the authentication method to biometrics or device passcode during the payment verification step.biometricOnly:An authentication method using TouchID/FaceID only.
For more details about the cardholder verification method, refer to the API documentation.
Configure PLIST file
A PLIST file has to be created and stored in the main bundle of the mobile application.
TSHPay.plist
You may define a custom name for the configuration PLIST file, for example: "YourPlistName.plist". The custom name may be provided via SDK initialisation.
By default, NFC Wallet SDK will search for TSHPay.plist in the main bundle of the application if the mobile application does not provide any.
The following examples shows how to initialise the SDK using the default TSHPay.plist
Check device eligibility
After SDK inititalization, verify the device eligibility to check:
Device owner authentication method using
deviceEligibility.Contactless payment capability using
contactlessPaymentEligibility.
If the device meets the requirements, the SDK returns supported.
Retrieving the Wallet ID
Use TSHPay.walletID to retrieve the wallet identifier.
The SDK generates the wallet ID the first time you call TSHPay.configure.
The wallet ID remains stable across application restarts.
If you reset the SDK, the wallet ID is regenerated.
Use the wallet ID for troubleshooting and support.
Last updated
Was this helpful?