post https://pay2new.in/apis/v1/verification/aadhaar
Headers
Accept : application/json
Content-Type: application/json
secret : Unique secret key (Provided by Pay2New)
Request Parameter
Parameter | Type | Mandatory (M), Optional (O) | Description |
---|---|---|---|
aadhaar_number | String | M | Customer aadhar number |
request_id | String | M | Unique Reference number |
latitude | String | M | End Customer Latitude, Represented in degrees with 4 digits after the decimal |
longitude | String | M | End Customer Longitude, Represented in degrees with 4 digits after the decimal |
ip | String | M | Onboard User IP Address |
Sample Request
curl --location 'https://pay2new.in/apis/v1/verification/aadhaar' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
"aadhaar_number": "123456789123",
"request_id": P2N54544444545,
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay2new.in/apis/v1/verification/aadhaar',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"aadhaar_number": "123456789012",
"request_id": P2N54544444545,
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167"
}',
CURLOPT_HTTPHEADER => array(
'secret: qwertyuQWERTY12345asdf',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Parameters
Parameter | Type | Description |
---|---|---|
status | Integer | Pay2New Aadhar number Status |
message | String | Message from API |
order_id | String | API order id |
request_id | String | Unique Request number |
ref_id | String | Unique Reference number |
Sample Response
{
"status": 1,
"message": "OTP has been sent!",
"order_id": "P2N5452534158DFOLASDF",
"request_id": P2N54544444545,
"ref_id": "REF123456789"
}
Note:
- Latitude and Longitude must be represented in degrees with 4 digits after decimal.