Skip to main content
The 1-Click Onboarding SDK simplifies user verification workflows for Android, iOS, and web applications. You can include a script tag, initialise the SDK with a session ID, and manage verification processes easily. Success and error callbacks handle responses, and you can close the SDK programmatically if needed. This topic includes the following sections:

Integration

To integrate 1-Click Onboarding:
  1. Log in to the Merchant Dashboard and create a 1-Click Onboarding template.
  2. Follow the workflow below:
    1. Verify user data using the Data Availability API to check user data availability using a mobile number. This step is mandatory.
    2. Initiate OAuth by calling the Initiate OAuth API with the mobile number to obtain a session_id for opening the SDK.
    3. Collect user consent by opening the SDK using the session_id. Once the user provides consent, a callback returns an auth_code.
    4. Generate an access token using the auth_code with the OAuth Access Token Generation API to get a token valid for one hour.
    5. Retrieve user details using the access token with the Fetch User Details API to access user details.
Refer to the image below for a sample workflow:

Initializing SDKs

The SDK communicates with Telr and provides updates via the callbacks. Initialize the applicable SDK from the options below:

Web

To initiate the web SDK, pass the sessionId and callback functions. Refer to the JavaScript example below:

Importing hosted JS SDK

Include the appropriate SDK version in your HTML document:
  • Use the following for the production environment:
  • Use the following for the sandbox environment:
Refer to the code snippet below for the HTML structure:

Android native

To set up the Android native SDK:
  1. Add the Maven repository to settings.gradle.kts:
  2. Add SDK dependency in build.gradle.kts:
  3. Click Sync Now in Android Studio to sync the project.
To initialise and use the Android native SDK:
  1. Create an instance of the verification service:
  2. Configure the callback to handle verification responses, errors, and user drop scenarios:
  3. Initiate the 1-Click Onboarding SDK:
It consists of the following parameters:
  • sessionId: Unique session identifier.
  • Environment: SDK environment. Possible values are:
    • Environment.TEST
    • Environment.PROD

iOS native

To set up the iOS native SDK:
  1. Add the SDK to your project by updating your Podfile:
  2. Run pod install to install the SDK.
To initialise and use the iOS native SDK:
  1. Create an instance of the CFVerificationService class:
  2. Set up callback handlers to manage events after verification processing. Implement the CF1ClickOnboardingResponseDelegate protocol to handle responses and errors:
  3. Initiate the 1-Click Onboarding SDK using the following code:
It consists of the following parameters:
  • sessionId: A unique identifier for the session.
  • environment: Specifies the environment in which the SDK operates. Possible values are:
    • Environment.TEST
    • Environment.PROD

Callback structure

Refer to the sample response below:
Refer to the table below for the possible statuses:
StatusDescription
SESSION_EXPIREDThe session ID is invalid.
SESSION_ID_MISSINGNo session ID is provided during initialization.
DIV_MISSINGThe <div> with ID cf-sdk is missing.
SUCCESSThe operation is completed successfully.
CLOSEDThe SDK closes.
Notes:
  • Ensure the <div> with ID cf-sdk exists in your HTML.
  • The SDK applies default styling for consistent behaviour; custom styling is not supported.
  • The iframe uses sandboxing for secure interactions.
For detailed API documentation, refer to 1-Click Onboarding API Integration.