Mobile Change OTP Validate

📘

Header Request

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

Request Parameter

ParametersTypeDescription
existingMobileNumberStringExisting Mobile Number of the Customer
newMobileNumberStringNew Mobile Number of the Customer
existing_mobile_otpStringOTP of the existing Mobile Number
new_mobile_otpStringOTP 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

ParametersTypeDescription
statusIntegerPay2New Status Code
messageStringMessage from API
order_idStringTransaction Id ( If transaction otherwise it is null )

Sample Response

{
    "status": 1,
    "message": "Mobile Number successfully changed",
    "order_id": null
}
Language
Click Try It! to start a request and see the response here!