Skip to main content
POST
Create URL

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-cf-signature
string

Send the signature if two-factor authentication is selected as Public Key. More details.

Body

application/json

Find the request parameters to create a DigiLocker URL to retrieve and verify aadhaar, pan, driving-license information.

verification_id
string
required

It is the unique ID you create to identify the API request. The maximum character limit is 50. Alphanumeric, period (.), hyphen (-). and underscore ( _ ) are allowed.

Example:

"ABC00123"

document_requested
enum<string>[]
required

It is the list of customer documents required for verification.

Available options:
AADHAAR,
PAN,
DRIVING_LICENSE
Example:
redirect_url
string

It is the URL you need to provide to redirect the user after completing the DigiLocker journey. It will contain the verification_id, which can be used to check the status of the verification.

Example:

"https://www.cashfree.com"

user_flow
enum<string>

Specifies the flow the user will follow during the DigiLocker consent process. If not provided, the default flow is signup. Possible values are:

  • signin: Use this if the user already has a DigiLocker account. The user will be directed to the authorisation flow.
  • signup: Use this if the user does not have a DigiLocker account. The user will be directed to signup flow.
Available options:
signin,
signup
Example:

"signup"

purpose
string

It is the reason for which you request the user's documents. DigiLocker displays this value on the consent screen. The maximum character limit is 50. Letters, numbers, spaces, and underscore ( _ ) are allowed. If you do not send this parameter, the default value KYC Verification is used. For valid values, refer to the standard purpose sample list.

Maximum string length: 50
Example:

"Loan KYC"

company_name
string

It is the name of your business that DigiLocker displays to the user on the consent screen. The maximum character limit is 50. Letters, numbers, spaces, and underscore ( _ ) are allowed. If you do not send this parameter, Cashfree uses your account name, formatted to meet these rules. If the account name is unavailable, Cashfree uses Cashfree Payments.

Maximum string length: 50
Example:

"DigiLoan"

Response

Success response for creating a DigiLocker URL for document verification.

verification_id
string

It displays the unique ID you created to identify this API request.

Example:

"ABC00123"

reference_id
integer

It displays the unique ID created by Cashfree for reference purposes. format: int64.

Example:

12345

url
string

It displays the URL used to retrieve and verify document information from DigiLocker. This URL expires 10 minutes after it is generated. Ensure it is accessed within this period to avoid expiration errors.

Example:

"https://verification-test.cashfree.com/dgl/h7562ci7us0"

status
string

It displays the status of the verification request.. Possible values are:

  • PENDING
Example:

"PENDING"

user_flow
string

Indicates the user flow selected for the DigiLocker consent process. Possible values are:

  • signin: The user already has a DigiLocker account. The user will be directed to the authorisation flow.
  • signup: The user does not have a DigiLocker account. The user will be directed to the signup flow.
Example:

"signup"

document_requested
enum<string>[]

It displays the list of documents requested for verification.

Available options:
AADHAAR,
PAN,
DRIVING_LICENSE
Example:
redirect_url
string

It displays the URL entered in the request that takes the user to after completing the DigiLocker journey.

Example:

"https://www.cashfree.com"

purpose
string

It displays the purpose shown to the user on the DigiLocker consent screen. If you did not send a value in the request, it displays the default value KYC Verification.

Example:

"Loan KYC"

company_name
string

It displays the business name shown to the user on the DigiLocker consent screen. If you did not send a value in the request, it displays the name Cashfree derived from your account.

Example:

"DigiLoan"