/

to search

Introducing Setu Changelog Check it out ↗

#Aadhaar OKYC Redundancy API Integration

The following guide describes the redundancy implementation of our Aadhaar OKYC APIs. Due to intermittent issues on our supply partner's end, we have introduced an Aadhaar Redundancy API, which uses either supply partner to perform Aadhaar Verification and fetch a user's Aadhaar details, depending on uptimes. You will need the following 2 APIs—

  • Create Aadhaar Verification Request—This lets you initiate a verification request.
  • GET Aadhaar Verification Details—This lets you check the status associated with the verification request, and if complete, fetch the verification details.

Here are the URLs you would need for this integration—

  • Sandbox—https://dg-sandbox.setu.co
  • Production—https://dg.setu.co
  • Headers—Contact Setu for providing the credentials required to successfully call Setu APIs. This contains:
    • x-client-id
    • x-client-secret
    • x-product-instance-id

#Create Aadhaar verification request

Call this API to initiate Aadhaar Verification for your end customer. A quick explanation of the request params—

  • redirectUrl Endpoint to which your end customer will be redirected to, post completion of verification flow.


Your Aadhaar Verification request was created successfully


Request
POST /api/aadhaar/verify
{
"redirectUrl": "https://setu.co"
}

Response

You get an id associated with the Aadhaar verification request, which you can use to check verification status in the Get Aadhaar Verification Details API.

{
"id": "be896113-6ad1-4741-80e3-56e67e794959",
"status": "pending",
"url": "https://dg.setu.co/digilocker/login/be896113-6ad1-4741-80e3-56e67e794959?path=L2Y3ZDdjOTk2LWEzNmQtNDQ0Mi1iMTliLTY3MDQ5NTE5Mjc0Yy8=",
"validUpto": "2023-11-15T06:52:01+05:30",
"traceId": "1-6540a411-48c3a26c1442b1580f6e6bf9"
}

#Get Aadhaar Verification Details

Call this API to fetch the details and status of the Aadhaar Verification request. A quick explanation of the query params—

  • request_id The id returned in the Create Aadhaar Verification request response



Request
GET /api/aadhaar/verify/:request_id

Response

If status is pending.

{
"id": "be896113-6ad1-4741-80e3-56e67e794959",
"status": "pending",
"url": "https://dg.setu.co/digilocker/login/be896113-6ad1-4741-80e3-56e67e794959?path=L2Y3ZDdjOTk2LWEzNmQtNDQ0Mi1iMTliLTY3MDQ5NTE5Mjc0Yy8=",
"validUpto": "2023-11-15T06:52:01+05:30",
"traceId": "1-6540a411-48c3a26c1442b1580f6e6bf9"
}