Skip to main content
GET
/
digilocker
Get Verification Status
curl --request GET \
  --url https://sandbox.cashfree.com/verification/digilocker \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>'
import requests

url = "https://sandbox.cashfree.com/verification/digilocker"

headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'x-client-id': '<api-key>', 'x-client-secret': '<api-key>'}
};

fetch('https://sandbox.cashfree.com/verification/digilocker', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/verification/digilocker",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sandbox.cashfree.com/verification/digilocker"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox.cashfree.com/verification/digilocker")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/verification/digilocker")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "user_details": {},
  "status": "PENDING",
  "document_requested": [
    "AADHAAR",
    "PAN",
    "DRIVING_LICENSE"
  ],
  "document_consent": null,
  "document_consent_validity": null,
  "verification_id": "ABC00123",
  "reference_id": 12345
}

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.

Query Parameters

reference_id
integer

It is the unique ID created by Cashfree Payments that you received in the Create DigiLocker URL API response. format: int64

verification_id
string

It is the unique ID you created to identify the Create DigiLocker URL API request.

Response

Success response for retrieving status of the DigiLocker request.

user_details
object

It displays the details of the individual(user).

Example:
{
"name": "John Doe",
"dob": "02-02-1995",
"gender": "M",
"eaadhaar": "Y",
"mobile": "9999999999"
}
status
string

Indicates the status of the DigiLocker request. Possible values are:

  • PENDING: The user has not yet given document consent.
  • AUTHENTICATED: The user has logged in and provided document consent.
  • EXPIRED: The DigiLocker url has expired because the user did not take any action within the 10-minute validity window.
  • CONSENT_DENIED: The user explicitly denied document consent by clicking the "Deny" button on the DigiLocker consent screen.
Example:

"PENDING"

document_requested
string[]

It contains the information of the requested document(s) for verification.

Example:
["AADHAAR"]

It displays the consent of the individual(user) for document verification.

Example:
["AADHAAR"]

It displays the date and time until which the document consent is valid.

Example:

"2025-09-30T07:10:00.000Z"

verification_id
string

It displays the unique ID you created to identify the verification request.

Example:

"ABC00123"

reference_id
integer

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

Example:

1234