<html-block html=”
“>
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(“/v3/charge/{merchantId}/{transactionId}/cancel” + salt key) + ### + salt index |
<html-block html=”
“>
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | STRING | Unique Merchant ID assigned to the merchant by PhonePe | Yes |
transactionId | STRING | Unique Transaction ID generated by the merchant to track this request to PhonePe | Yes |
<html-block html=”
“>
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | Success status of the request |
code | ENUM | See below section for list of codes |
message | STRING | Short message about status |
data | OBJECT | Empty object |
<html-block html=”
“>
The code in the above API response could be.
SUCCESS
INTERNAL_SERVER_ERROR
: There can be internal server error. Merchant should retry the cancel API request.INVALID_TRANSACTION_ID
PAYMENT_ALREADY_COMPLETED
: Payment has been succesful hence can’t cancel the request. For this case merchant should trigger successful transaction, generating the bill.
{“method”:”post”,”url”:”/v3/charge/{merchantId}/{transactionId}/cancel”,”auth”:”required”,”apiSetting”:”5ecf9143b5bd210023b3b738″,”examples”:{“codes”:[]},”results”:{“codes”:[{“status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”:\”Your request has been successfully completed.\”,\n \”data\”:{}\n}”,”name”:”Success Response”}]},”params”:[{“name”:”merchantId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Merchant ID assigned to the merchant by PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5a1f8c74986fec001e5a8759″},{“name”:”transactionId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Transaction ID generated by the merchant to track this request to PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5a1f8c74986fec001e5a8758″},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a1f8c74986fec001e5a8757″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(\”/v3/charge/{merchantId}/{transactionId}/cancel\” + salt key) + ### + salt index”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5a1f8c74986fec001e5a8756″}]}
https://mercury-uat.phonepe.com