| 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.
Creates the URL where the user logs in or signs up and grants access to the requested documents.
POST https://pay2new.in/apis/v1/verification/digilocker/createUrl
Request fields
| Field | Type | Required | Validation / Description |
|---|---|---|---|
mobile_number | string | Yes | Exactly 10 numeric digits. |
document_requested | array | Yes | One or more of AADHAAR, PAN, DRIVING_LICENSE. |
user_flow | string | Yes | Exact lowercase value signin or signup. |
redirect_url | string | Yes | Client URL to which the user is redirected after the journey. HTTPS is recommended. |
latitude | decimal | Yes | Customer/outlet latitude. |
longitude | decimal | Yes | Customer/outlet longitude. |
ip | string | Yes | Valid IPv4 address. |
request_id | string | Yes | Unique request reference, minimum 8 characters. |
cURL example
curl --request POST \
--url 'https://pay2new.in/apis/v1/verification/digilocker/createUrl' \
--header 'secret: <YOUR_PAY2NEW_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
"mobile_number": "9999999999",
"document_requested": ["AADHAAR", "PAN"],
"user_flow": "signin",
"redirect_url": "https://client.example.com/kyc/digilocker/callback",
"latitude": "19.0760",
"longitude": "72.8777",
"ip": "203.0.113.10",
"request_id": "DLURL202608260001"
}'
Success response example
{
"status": 1,
"message": "Transaction Success",
"order_id": "P2NDL202608260001",
"request_id": "DLURL202608260001",
"txn_value": "2.00",
"balance": "998.00",
"operator_reference": 12345678,
"url": "https://verification.example/dgl/temporary-token"
}
Persist both values
Use response
order_idandoperator_referencein the next two API calls. Redirect the user only to the URL returned by the API. Amounts in this example are illustrative; actual values follow the client package.
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.
