post https://uat-accounts.payu.in/api/v3/merchants/kyc_document/aadhaar_xml_consent
The Aadhar OTP Generation API allows merchants to generate OTP for Aadhaar verification purposes. This API is used to initiate the authentication process by sending an OTP to the mobile number registered with the Aadhaar.
Environment
Test | https://uat-accounts.payu.in |
Production | https://accounts.payu.in |
Request Parameters
Authorization header
Authorization Bearer token must be generated using **Get Token API ** with the scope as . For more information, refer to Get Token API - Partner Integration.
Body
Parameter | Description | Example |
---|---|---|
merchant_id
| Unique identifier for the merchant | 20997866 |
aadhar_number
| 12-digit Aadhaar number of the user | bbbbbbbbbbbb |
Sample request
curl --location 'https://api-example.com/api/v3/merchants/kyc_document/aadhaar_xml_consent' \
--header 'Authorization: Bearer dummy' \
--form 'merchant_id="20997866"' \
--form 'aadhar_number="bbbbbbbbbbbb"'
Sample response
Success scenario
{
"status": "success",
"code": 200,
"message": "OTP sent successfully",
"data": {
"reference_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"merchant_id": "20997866",
"timestamp": "2023-05-27T10:15:30Z"
}
}
Failure scenario
- Invalid Aadhaar number
{
"status": "error",
"code": 400,
"message": "Invalid Aadhaar number",
"data": null
}
- Unauthorized access
{
"status": "error",
"code": 401,
"message": "Unauthorized access",
"data": null
}
- Failed to generate OTP
{
"status": "error",
"code": 500,
"message": "Failed to generate OTP",
"data": null
}