DigiLocker

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

StepAPI pagePurpose
1Verify AccountCheck the mobile number and choose the sign-in or sign-up flow.
2Create Consent URLRequest access to selected documents and obtain the user consent URL.
3Check StatusConfirm the user's consent and inspect the available documents.
4Retrieve DocumentRetrieve a document included in the user's consent.

Integration flow

StepAction
VerifyCheck whether the mobile number has a DigiLocker account.
Request consentCreate a URL with the required documents and the correct user flow.
Customer actionOpen the returned URL so the customer can sign in or sign up and grant consent.
ConfirmCheck status using the saved order_id and operator_reference.
RetrieveRequest an available document using its supported document type.

Common request headers

HeaderRequirementValue
secretRequiredYour issued Pay2New API secret.
Content-TypeRequiredapplication/json
AcceptRecommendedapplication/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.