<html-block html=”
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(base64 encoded payload + ‘/v3/merchant/otp/send’ + salt key) + ‘###’ + salt index |
{
"merchantId": "MID",
"mobileNumber": "9876543210",
"email": "[email protected]",
"shortName": "Nishant Mittal"
"requestType": "WALLET"
}
{
"request" : "ew0KCeKAnG1lcmNoYW50SWTigJ06IOKAnEpJT+KAnSwNCgnigJx0cmFuc2FjdGlvbklk4oCdOiDigJxUWE4xMjM0NeKAnSwNCgnigJxtZXJjaGFudE9yZGVySWTigJ0gOiDigJxPNDIzODTigJ0sDQoJ4oCcbW9iaWxlTnVtYmVy4oCdOiDigJw5ODc2NTQzMjEw4oCdLA0KCeKAnG1lcmNoYW50VXNlcklk4oCdOiDigJxVU0VSMTIzNDXigJ0sDQoJ4oCcZW1haWw6IOKAnG5pc2hhbnQubUBnbWFpbC5jb23igJ0sDQoJ4oCcc2hvcnROYW1l4oCdIDog4oCcTmlzaGFudCBNaXR0YWzigJ0NCn0="
}
<html-block html=”
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | string | Unique merchantId assigned to the merchant | Yes |
mobileNumber | string | Mobile Number on which OTP will be sent | Yes |
email | string | Email ID of the customer | No |
shortName | string | Name of the customer | No |
requestType | Enum | Type of linking to be done. Will always be WALLET for DIRECT DEBIT flow, CREDIT for M2C/Instant Payout flow | No |
<html-block html=”
“>
Parameter Name | Type | Description |
---|---|---|
success | boolean | Denotes if API call is successful. |
code | string | See below for list of values |
data | Object | See below table |
DATA JSON OBJECT
Parameter Name | Type | Description |
---|---|---|
merchantId | string | merchantId assigned to merchant. |
otpToken | string | OTP token (need to be passed while verifying the OTP) |
otpToken should be stored in the server side and should not be passed to the client side.
<html-block html=”
“>
Code Value | Description |
---|---|
SUCCESS | Success scenario |
AUTHORIZATION_FAILED | Value of X-VERIFY is incorrect |
BAD_REQUEST | Invalid request payload |
INTERNAL_SERVER_ERROR | The server is busy or the server is not responding |
USER_BLACKLISTED | Customer is blacklisted on PhonePe side |
USER_BLOCKED | User is blocked for 1 day. |
OTP_LIMIT_EXCEEDED | There is a limit on number of times OTP can be sent on a mobile number. This code will be received is that limit is crossed. |
TOO_MANY_REQUESTS | If we are getting too many requests from merchant for this API |
<html-block html=”
“>
{“method”:”post”,”url”:”/v3/merchant/otp/send”,”auth”:”required”,”results”:{“codes”:[{“status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”merchantId\”: \”M2306160483220675579140\”,\n \”otpToken\”: \”OTP7c8d7de8-5d16-46b7-a269-45afeafb5f8e\”\n }\n}”,”name”:”Success Response”},{“status”:400,”language”:”json”,”code”:”{}”,”name”:””}]},”params”:[{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”base64 encoded payload”,”required”:true,”in”:”body”,”ref”:””,”_id”:”5a97d96f9bd97200459f1ef8″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97d96f9bd97200459f1ef7″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”sha256(base64encodedpayload + “/v3/merchant/otp/send” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97d96f9bd97200459f1ef6″}],”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]}}
https://mercury-uat.phonepe.com