DigiLocker Retrieve Document

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

📘

Before you call this API

Send your issued secret header and Content-Type: application/json. Your source IP must be registered on the partner account, and the account, KYC, wallet, API access, and DigiLocker service must be active. The body ip field does not replace the source-IP check.

Retrieves one consented document after the status is AUTHENTICATED.

POST https://pay2new.in/apis/v1/verification/digilocker/document

Request fields

FieldTypeRequiredDescription
order_idstringYesorder_id returned by Create URL.
operator_referencestring/integerYesoperator_reference returned by Create URL.
document_typestringYesOne of AADHAAR, PAN, DRIVING_LICENSE; it must have user consent.
curl --request POST \
  --url 'https://pay2new.in/apis/v1/verification/digilocker/document' \
  --header 'secret: <YOUR_PAY2NEW_SECRET>' \
  --header 'Content-Type: application/json' \
  --data '{
    "order_id": "P2NDL202608260001",
    "operator_reference": "12345678",
    "document_type": "AADHAAR"
  }'

Aadhaar response example

{
  "status": 1,
  "message": "Aadhaar Card Exists",
  "operator_reference": 12345678,
  "data": {
    "verification_id": "P2NDL202608260001",
    "status": "SUCCESS",
    "uid": "XXXXXXXX5647",
    "care_of": "S/O: SAMPLE PARENT",
    "dob": "02-02-1995",
    "gender": "M",
    "name": "SAMPLE CUSTOMER",
    "photo_link": "BASE64_ENCODED_IMAGE",
    "split_address": {
      "country": "India",
      "dist": "Mumbai",
      "house": "Sample House",
      "landmark": "",
      "pincode": "400001",
      "po": "Mumbai GPO",
      "state": "Maharashtra",
      "street": "Sample Street",
      "subdist": "Mumbai",
      "vtc": "Mumbai"
    },
    "year_of_birth": 1995,
    "xml_file": "https://secure.example/temporary-document-link",
    "message": "Aadhaar Card Exists"
  }
}

📘

Variable document schema

The object inside data changes by document_type. Aadhaar commonly contains masked UID, demographic details, photo and split address; PAN and Driving Licence return fields relevant to those documents. Treat non-mandatory fields as nullable. Any temporary document link should be downloaded/processed within its stated validity period.

🚧

Check the application result

Always inspect JSON status, message, and any errors object. A successful HTTP response does not establish verification completion. Invalid JSON, invalid parameters, authentication failure, or unavailable service can return status: 2. For field validation errors, errors maps field names to messages.

See the Verification Integration Guide for the full consent journey, status handling, and examples.

Body Params
string
required

order_id returned by Create URL.

string
required

operator_reference returned by Create URL.

string
required

Consented document: AADHAAR, PAN, or DRIVING_LICENSE.

Headers
string
required

Pay2New-issued API secret.

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json