Aadhaar Verification

📘

Headers

Accept : application/json
Content-Type: application/json
secret : Unique secret key (Provided by Pay2New)

Request Parameter

ParameterTypeMandatory (M), Optional (O)Description
aadhaar_numberStringMCustomer aadhar number
request_idStringMUnique Reference number
latitudeStringMEnd Customer Latitude, Represented in
degrees with 4 digits after the decimal
longitudeStringMEnd Customer Longitude, Represented in
degrees with 4 digits after the decimal
ipStringMOnboard 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

ParameterTypeDescription
statusIntegerPay2New Aadhar number Status
messageStringMessage from API
order_idStringAPI order id
request_idStringUnique Request number
ref_idStringUnique 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.
Language
Click Try It! to start a request and see the response here!