DigiLocker account verification, user consent, status and document retrieval.
Use the DigiLocker APIs to check an account, obtain user consent, confirm verification status, and retrieve a consented document. Each operation has a separate API page below.
Before you begin
Use your Pay2New-issued secret from an allowlisted backend IP. Your account, KYC, wallet, API access and DigiLocker service must be active. Obtain the customer's consent before requesting identity documents.
DigiLocker APIs
| Step | API page | Purpose |
|---|---|---|
| 1 | Verify Account | Check the mobile number and choose the sign-in or sign-up flow. |
| 2 | Create Consent URL | Request access to selected documents and obtain the user consent URL. |
| 3 | Check Status | Confirm the user's consent and inspect the available documents. |
| 4 | Retrieve Document | Retrieve a document included in the user's consent. |
Integration flow
| Step | Action |
|---|---|
| Verify | Check whether the mobile number has a DigiLocker account. |
| Request consent | Create a URL with the required documents and the correct user flow. |
| Customer action | Open the returned URL so the customer can sign in or sign up and grant consent. |
| Confirm | Check status using the saved order_id and operator_reference. |
| Retrieve | Request an available document using its supported document type. |
Common request headers
| Header | Requirement | Value |
|---|---|---|
secret | Required | Your issued Pay2New API secret. |
Content-Type | Required | application/json |
Accept | Recommended | application/json |
Supported document types are AADHAAR, PAN and DRIVING_LICENSE. Use the exact field names and request examples on each API page.
Keep the consent references
Store order_id and operator_reference returned by Create Consent URL. Status and document requests need both values. Read the top-level status and the service-specific data.status; HTTP success alone does not establish consent or verification completion.
The Verification Integration Guide contains shared conventions, error handling and the full verification reference.
