post https://pay2new.in/apis/v1/verification/voterID
Header Request
Accept : application/json
Content-Type: application/json
secret : Unique secret key (Provided by Pay2New)
Request Parameters
Parameters | Type | Mandatory (M), Optional (O) | Description |
---|---|---|---|
number | String | M | Customer Voter ID number |
request_id | String | M | Unique Reference number |
optional1 | String | O | Depends on Operator |
optional2 | String | O | Depends on Operator |
optional3 | String | O | Depends on Operator |
optional4 | String | O | Depends on Operator |
customer_number | String | M | Customer Mobile number |
pincode | String | M | Customer Pin code |
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 |
outletId | String | M | Unique OutletID (Provided by Pay2New) |
Sample Request
curl --location 'https://pay2new.in/apis/v1/verification/voterID' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
"number": "ABCD1234E",
"request_id": P2N54544444545,
"optional1": "",
"optional2": "",
"optional3": "",
"optional4": "",
"customer_number": "9876543210",
"pincode": "444444",
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167",
"outletId": 2
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay2new.in/apis/v1/verification/voterID',
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 =>'{
"number": "ABC1234E",
"request_id":P2N54544444545,
"optional1": "",
"optional2": "",
"optional3": "",
"optional4": "",
"customer_number": "9876543210",
"pincode": "123456",
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167",
"outletId": 2
}',
CURLOPT_HTTPHEADER => array(
'secret: qwertyuQWERTY12345asdf',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Parameters
Parameters | Type | Description |
---|---|---|
status | Integer | Pay2New Voter Id Status |
message | String | Message from API |
data | Array | Voter Id Data details |
data.message | String | Status message |
data.epic_no | String | Voter Id number |
data.dob | String | Voter Id holder date of birth |
data.holder_name | String | Voter Id holder name |
data.relation | String | Voter Id holder Relation |
data.relation_type | String | |
data.age | String | Voter Id holder age |
data.gender | String | Voter Id holder gender |
data.area | String | Voter Id holder address |
data.district | String | Voter Id holder district |
order_id | String | API order id |
Sample Response
{
"status": 1,
"message": "Transaction Successful",
"data": {
"message": "Success",
"epic_no": "ABC1234E",
"dob": "",
"holder_name": "Test",
"relation": "Test",
"relation_type": "F",
"age": "26",
"gender": "M",
"area": "Narhe",
"district": "Pune"
},
"order_id": "P2N5452534158DFOLASDF"
}
Please Note
- Latitude and Longitude must be represented in degrees with 4 digits after decimal.