API Reference

Cardholder Token Generation

This section define the steps on how to generate the Cardholder token. This token is used in SDKs and functions of Customer Services SDK and also for Card View, Reset ATM PIN and Transaction SDKs

Overview

As there are many functions and SDKs that need Cardholder token to post or fetch the data, this section describes the step by which the cardholder token can be generated.

Prerequisite

The following are prerequisite for obtaining the cardholder token:

  • The SDK Single Sign On webhook is configured and functional for the business or program
  • The card is already created against the mobile number under the business or program

Steps to generate cardholder token

  1. Execute the function loginWithAuthToken with the necessary params (as defined in below respective tech stacks section)
  2. Please note: one of the params sdkToken is the token of the calling application. This token is NOT a card91 token.
  3. This loginWithAuthToken will internally execute the webhook that is configured for the program or business with the defined payload.
  4. The business or program has to validate the sdkToken which is initially passed to the SDK against the mobile number (which is also the part of the payload sent on the webhook) and validate the expiry and authenticity of the token. In case it is a valid token, the webhook must return 200 as HTTP status code with proper body as defined.
  5. Once the webhook responds with the positive (200 as HTTP status code with proper body), the loginWithAuthToken function in the SDK will return the token as header in the Map data .
  6. The data Map will also have the other details of the cardholder.

Use the value returned as header in the Map data as the token