post https://pay2new.in/apis/onboard/v1/customer
Implement this API to onboard an Customer to the Pay2New platform. Pay2New will update the outlet profile if it's already registered.
Header Request
secret : Unique secret key (Provided by Pay2New)
Request Parameters
Parameters | Type | Mandatory (M) , Optional(O) | Description |
---|---|---|---|
mobile_number | String | M | Mobile Number of the outlet owner (Mobile Number should be same as registered with Aadhaar) |
pan_number | String | M | PAN of outlet owner (only individual PAN is allowed) |
aadhar_number | String | M | Aadhar Number |
String | M | Email Address of the outlet owner (recommended as in Aadhaar) | |
latitude | String | M | Latitude of the Outlet |
longitude | String | M | Longitude of the Outlet |
terms_agree | String | M | Consent should be accepted by customer |
product_code | String | M | Unique Operator Code |
ip | String | M | Onboard User IP Address |
request_id | String | M | Unique Reference number |
Sample Request
curl --location 'https://pay2new.in/apis/v1/onboard/customer' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
"mobile_number": "9876543210",
"pan_number": "ABCDE1234F",
"aadhaar_number": "123456789123",
"email": "[email protected]",
"latitude": "19.1258",
"longitude": "74.7453",
"terms_agree": "Y",
"product_code": "291",
"ip": "30.169.159.167",
"request_id": "P2N54544444545"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay2new.in/apis/v1/onboard/customer',
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 =>'{
"mobile_number": "9876543210",
"pan_number": "ABCDE1234F",
"aadhaar_number": "123456789123",
"email": "[email protected]",
"latitude": "19.1258",
"longitude": "74.7453",
"terms_agree": "Y",
"product_code": "291",
"ip": "30.169.159.167",
"request_id": "P2N54544444545"
}',
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 Transaction Status |
message | String | Message from API |
order_id | String | Transaction Id ( If transaction otherwise it is null ) |
request_id | String | Unique Request number |
data | Array | Response Data (If Present) |
Sample Response
{
"status": 1,
"message": "Transaction Successful",
"order_id": "P2N5452534158DFOLASDF",
"request_id": "P2N54544444545",
"data": {
"aadhaar": "123456789123",
"otpReferenceID": "E6E85F914A1A48F8DAE161C364BA2",
"hash": "rvme0TzfPytuvSF9Nxizs7wKAREkpf2DE6E85F914A1A48F8DAE161C364BA2rvme0TzfPytuvSF9Nxizs7wKAREkpf2DE6E85F914A1A48F8DAE161C364BA2"
}
}