Skip to main content
POST
https://api.stablepay.global
/
v2
/
users
/
{userId}
/
kyc
/
digilocker
/
init
Verify Aadhaar
curl --request POST \
  --url https://api.stablepay.global/v2/users/{userId}/kyc/digilocker/init \
  --header 'Authorization: Bearer <token>'

Verify Aadhaar

Aadhaar verification is done exclusively through DigiLocker. This is a required verification for KYC completion.
Aadhaar OTP verification has been discontinued by UIDAI. DigiLocker is the only supported method for Aadhaar verification.
For detailed DigiLocker integration, see Verify DigiLocker.

Quick Start

1. Initialize DigiLocker Session

curl -X POST https://api.stablepay.global/v2/users/usr_abc123/kyc/digilocker/init \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "redirectUrl": "https://digilocker-sdk.surepass.io/...",
    "sessionId": "dgl_abc123",
    "expiresAt": "2025-01-05T10:30:00Z"
  }
}

2. Direct User to DigiLocker

Open the redirectUrl for the user to complete DigiLocker consent. The session expires in 30 minutes.

3. Poll for Status

curl https://api.stablepay.global/v2/users/usr_abc123/kyc/digilocker/status \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "status": "completed",
    "documentsFetched": ["AADHAAR"],
    "aadhaarVerified": true,
    "aadhaar": {
      "name": "RAHUL KUMAR",
      "maskedNumber": "XXXX-XXXX-1234"
    }
  }
}
Once verified, the user’s Aadhaar details are automatically saved and KYC status is updated.