| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Before you call this API
Send your issued
secretheader andContent-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 bodyipfield 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
| Field | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | order_id returned by Create URL. |
operator_reference | string/integer | Yes | operator_reference returned by Create URL. |
document_type | string | Yes | One 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
datachanges bydocument_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 anyerrorsobject. A successful HTTP response does not establish verification completion. Invalid JSON, invalid parameters, authentication failure, or unavailable service can returnstatus: 2. For field validation errors,errorsmaps field names to messages.
See the Verification Integration Guide for the full consent journey, status handling, and examples.
