post https://pay2new.in/apis/onboard/v1/customer/validateMobile
Header Request
Accept : application/json
Content-Type: application/json
secret : Unique secret key (Provided by Pay2New)
Request Parameter
Parameters | Type | Description |
---|---|---|
existingMobileNumber | String | Existing Mobile Number of the Customer |
newMobileNumber | String | New Mobile Number of the Customer |
existing_mobile_otp | String | OTP of the existing Mobile Number |
new_mobile_otp | String | OTP of the new Mobile |
Sample Request
curl --location 'https://pay2new.in/apis/v1/onboard/customer/validateMobile' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
"existing_mobile": "9876543210",
"new_mobile": "9876542310",
"existing_mobile_otp": "708069",
"new_mobile_otp": "415784"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay2new.in/apis/v1/onboard/customer/validateMobile',
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 =>'{
"existing_mobile": "9876543210",
"new_mobile": "9876542310",
"existing_mobile_otp": "708069",
"new_mobile_otp": "415784"
}',
CURLOPT_HTTPHEADER => array(
'secret: qwertyuQWERTY12345asdf',
'Content-Type: application/json',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Parameter
Parameters | Type | Description |
---|---|---|
status | Integer | Pay2New Status Code |
message | String | Message from API |
order_id | String | Transaction Id ( If transaction otherwise it is null ) |
Sample Response
{
"status": 1,
"message": "Mobile Number successfully changed",
"order_id": null
}