Skip to main content
Cashfree Video KYC (VKYC) is a secure, RBI-compliant digital customer verification solution that enables businesses to complete customer onboarding remotely through a live video interaction. Merchants can choose to integrate VKYC in two ways, depending on their user experience requirements and technical capabilities. Cashfree offers the following ways to integrate VKYC: Integrating using the SDK
  • Integrate the VKYC process directly into your web or mobile application.
  • Provide a seamless in-app experience for customers without redirecting them.
  • Support an OTP-less flow if the customer is already authenticated in your application.
  • Use SDK callbacks to handle events such as success, failure, or closure, and to track activity and customise your user interface.
Integrating using the APIs
  • Generate a unique VKYC link for each customer.
  • Share the link via SMS, email, or any external channel.
  • Allow customers to complete the VKYC process outside your application.
The VKYC SDK supports Web, Android, and iOS platforms and communicates securely with Cashfree servers through callbacks.This topic includes the following sections:
  1. SDK VKYC flow
  2. Initialising SDK
  3. Callback structure

SDK VKYC flow

Refer to the steps below for the VKYC flow for SDK:
  1. Create the user using the Create User for Secure ID Suite API. You must complete this step before initiating the VKYC session.
  2. Start the VKYC session using the Initiate Video KYC Request API. Pass the user ID and authentication token to the SDK.
  3. Generate an authentication token using the Create Auth Token API. This token is required to initialise the SDK. Use it to bypass OTP verification if the user is already authenticated in your application.
  4. Retrieve the current session status using the Get Video KYC Status API.
  5. Configure webhooks to receive real-time updates on VKYC events. For more information, refer to Webhook.
Refer to the image below for a sample workflow:

Initialising SDK

Refer to the instructions below to initialise the SDK for your target platform. The SDK communicates with Cashfree and provides real-time updates through callbacks.You can initialise the SDK for:

Web integration

Initialise the Web SDKRefer to the example code snippet below to initialise the Web SDK:
Do not pass the OAuth token if you want Cashfree to perform the OTP check.
Close the SDK programmaticallyRefer to the code snippet below to close the SDK instance in your application:
Import the hosted JavaScript SDKRefer to the instructions below to import the SDK script into your HTML page.
  1. Add the SDK script for your environment. Production environment:
    Sandbox environment:
  2. Include a <div> for the SDK container.

Android native integration

Add the SDK dependencyRefer to the steps below to add the SDK to your Android project.
  1. Add the Maven repository in settings.gradle.kts.
  2. Add the SDK dependency in build.gradle.kts.
  3. Click Sync Now in Android Studio to sync your project.
Initialise and use the SDK
  1. Create an instance of the verification service.
  2. Configure the callback to handle verification responses.
  3. Initiate the verification process.

iOS native integration

The following are the requirements before integrating the iOS SDK:
  • iOS version: 13.0 or later
  • Swift version: 5.0 or later
  • Xcode version: 14.0 or later
Install the SDKTo install the SDK:
  1. Open your Xcode project.
  2. Go to File > Add Packages.
  3. Enter the repository URL:
  4. Select the version and add the package to your project.
Initialise and use the SDK
  1. Create an instance.
  2. Set up callback handlers.
  3. Start the VKYC session.

Callback structure

Refer to the sample response below for the VKYC callback structure:
Additional Notes:
  • Ensure the <div> with ID cf-vkyc-sdk exists in your HTML.
  • The SDK applies default styling for consistent behaviour. Custom styling is not supported.
  • The embedded iframe uses sandboxing for secure interactions.