<html-block html=”
Request Headers
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(base64 encoded payload + “/v3/credit/deferred/fulfill” + salt key) + ### + salt index |
{
"merchantId": "DemoMerchant",
"transactionId": "TX123456789",
"merchantUserId": "U123456789",
"amount": 100,
"merchantOrderId": "OD1234",
"subMerchant": "DemoMerchant",
"mobileNumber": "9xxxxxxxxx",
"message": "refund for cancelled order",
"email": "[email protected]",
"shortName": "Amit"
}
{
"request": "eyJtZXJjaGFudE9yZGVySWQiOiAiT0QxMjM0IiwgInN1Yk1lcmNoYW50IjogIkRlbW9NZXJjaGFudCIsICJhbW91bnQiOiAxMDAsICJtZXNzYWdlIjogInJlZnVuZCBmb3IgY2FuY2VsbGVkIG9yZGVyIiwgIm1vYmlsZU51bWJlciI6ICI5eHh4eHh4eHh4IiwgInNob3J0TmFtZSI6ICJBbWl0IiwgInRyYW5zYWN0aW9uSWQiOiAiVFgxMjM0NTY3ODkiLCAibWVyY2hhbnRVc2VySWQiOiAiVTEyMzQ1Njc4OSIsICJtZXJjaGFudElkIjogIkRlbW9NZXJjaGFudCIsICJlbWFpbCI6ICJhbWl0eHh4NzVAZ21haWwuY29tIn0"
}
<html-block html=”
Request Parameters
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | String | Unique Merchant ID assigned to the merchant by PhonePe | Yes |
transactionId | String | Transaction ID same as that of credit/deferredAPI | Yes |
merchantUserId | String | Unique ID assigned to the user by the merchant. This is used for linking the user’s PhonePe account. | Yes |
amount | Long | Transaction amount in paise | Yes |
merchantOrderId | String | Order ID for the merchant transaction | Yes |
subMerchant | String | Tag to categorize merchant transaction | No |
mobileNumber | String | Mobile number of the user | No |
message | String | Short message displayed on success page | No |
email | String | Email address of the user | No |
shortName | String | User’s name for per-filling user registeration | No |
<html-block html=”
Response Parameters
“>
Parameter Name | Type | Description |
---|---|---|
success | Boolean | Success status of the request |
code | ENUM | To see list of response codes go here. |
message | String | Short message about code |
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/credit/deferred/fulfill”,”auth”:”never”,”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]},”results”:{“codes”:[{“name”:”Success Response”,”status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”PAYMENT_SUCCESS\”,\n \”message\”: \”Your payment is successful.\”,\n \”data\”: {\n \”transactionId\”: \”TX123456789\”,\n \”merchantId\”: \”DemoMerchant\”,\n \”amount\”: 100,\n \”status\”: \”SUCCESS\”,\n \”merchantUserId\”: \”U123456789\”,\n \”mobileNumber\”: \”9xxxxxxxxxx\”,\n \”providerReferenceId\”: \”PPXXXXX\”,\n \”payResponseCode\”: \”SUCCESS\”\n }\n}”},{“name”:”Failure Response”,”status”:400,”language”:”json”,”code”:”{\n \”success\”: false,\n \”code\”: \”INVALID_TRANSACTION_ID\”,\n \”message\”: \”The transaction id you have entered seems to be invalid.\”,\n \”data\”: {}\n}”}]},”params”:[{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a16be78fff719001ee1493a”},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(base64 encoded payload + \”/v3/credit/deferred/fulfill\” + salt key) + ### + salt index”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a16be78fff719001ee14939″},{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”base64 encoded payload”,”required”:true,”in”:”body”,”ref”:””,”_id”:”5a180e8db96bad0012f74488″}]}
https://mercury-uat.phonepe.com