<html-block html=”
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(base64 encoded payload + ‘ /v3/debit/instant’ + salt key) + ‘###’ + salt index |
{
"merchantId": "DemoMerchant",
"transactionId": "TX123456789",
"userAuthToken":"1604832205579140b0931ce0abbb450b9a40e81ed06ce216",
"amount": 100,
"merchantOrderId": "OD1234",
"subMerchant": "DemoMerchant",
"message": "Payment for order OD1234"
}
{
"request" : "ew0KCeKAnG1lcmNoYW50SWTigJ06IOKAnEpJT+KAnSwNCgnigJx0cmFuc2FjdGlvbklk4oCdOiDigJxUWE4xMjM0NeKAnSwNCgnigJxtZXJjaGFudE9yZGVySWTigJ0gOiDigJxPNDIzODTigJ0sDQoJ4oCcbW9iaWxlTnVtYmVy4oCdOiDigJw5ODc2NTQzMjEw4oCdLA0KCeKAnG1lcmNoYW50VXNlcklk4oCdOiDigJxVU0VSMTIzNDXigJ0sDQoJ4oCcZW1haWw6IOKAnG5pc2hhbnQubUBnbWFpbC5jb23igJ0sDQoJ4oCcc2hvcnROYW1l4oCdIDog4oCcTmlzaGFudCBNaXR0YWzigJ0NCn0="
}
<html-block html=”
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | string | Unique merchant id assigned to the merchant | Yes |
transactionId | string | Unique Transaction ID generated by the merchant to track this request to PhonePe | Yes |
amount | int | Amount in paise | Yes |
mobileNumber | string | Mobile number on which OTP will be sent | Yes |
merchantOrderId | string | Order ID for the merchant transaction | Yes |
userAuthToken | string | Auth token generated from otp verify | Yes |
email | string | Email id of customer | No |
shortName | string | Name of customer | 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 |
message | string | Short message about code |
<html-block html=”
“>
Code | Description |
---|---|
INVALID_TRANSACTION_ID | Duplicate TransactionID |
BAD_REQUEST | Invalid request payload |
AUTHORIZATION_FAILED | Incorrect X-VERIFY header |
INTERNAL_SERVER_ERROR | Something went wrong |
INVALID_USER_AUTH_TOKEN | The userAuthToken provided is either invalid or not mapped to merchant. |
PAYMENT_SUCCESS | Payment is successful |
PAYMENT_ERROR | Payment failed |
USER_BLACKLISTED | Customer is blacklisted on PhonePe side |
MERCHANT_USER_NOT_FOUND | No user exists for merchant id and user id combination. |
USER_BLOCKED | User is blocked for 1 day. |
TIMED_OUT | Payment timed out (Status check is required) |
<html-block html=”
“>
Parameter Name | Type | Description |
---|---|---|
transactionId | String | Unique Transaction ID generated by the merchant to track this request to PhonePe |
merchantId | String | Unique Merchant ID assigned to the merchant by PhonePe |
amount | Long | Transaction amount in paise |
status | String | Status of the request |
merchantUserId | String | Unique ID assigned to the user by the merchant. This is used for linking the user’s PhonePe account. |
mobileNumber | String | Mobile number of the user |
providerReferenceId | String | PhonePe transaction id |
payResponseCode | String | PhonePe internal status code |
{“method”:”post”,”url”:”/v3/debit/instant”,”auth”:”required”,”results”:{“codes”:[{“status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”PAYMENT_SUCCESS\”,\n \”message\”: \”Your payment is successful.\”,\n \”data\”: {\n \”transactionId\”: \”TXtest2dfws3dfd124\”,\n \”amount\”: 10,\n \”merchantId\”: \”M2306160483220675579140\”,\n \”merchantUserId\”: null,\n \”status\”: \”SUCCESS\”,\n \”mobileNumber\”: \”9611640370\”,\n \”providerReferenceId\”: \”P1801082016589589866175\”,\n \”payResponseCode\”: \”SUCCESS\”\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”:”5a97e7099bd97200459f200c”},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97e7099bd97200459f200b”},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”sha256(base64encodedRequest + “/v3/debit/instant” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a97e7099bd97200459f200a”}],”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]}}
https://mercury-uat.phonepe.com