Field Name | Mandatory | Description |
---|
Content-Type | Yes | application/json |
X-Verify | Yes | SHA256(base64 encoded payload + '/v3/auth/cancel' + salt key) + '###' + salt index |
{
"merchantId": "MID12345",
"transactionId": "TX123456789"
}
{
"request": "eyAgCiAgICJtZXJjaGFudElkIjogIk1JRDEyMzQ1IiwKICAgInRyYW5zYWN0aW9uSWQiOiAiVFgxMjM0NTY3ODkiCn0K"
}
Field Name | Data Type | Mandatory | Description |
---|
merchantId | String | Yes | Unique merchantId assigned to the merchant |
transactionId | String | Yes | The transaction Id sent by merchant in the authorize request |
{
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"transactionId": "TX123456789",
"authState": "CANCELLED"
}
}
Field Name | Data Type | Description |
---|
transactionId | String | Same as Request |
authState | String | Current state of the auth & capture transaction. For details, check the authState flow diagram below. |
Code | Description |
---|
AUTHORIZATION_ALREADY_CANCELLED | Cancel failed as the authorization for the given transaction is already canceled/expired. |
AUTHORIZATION_ALREADY_CAPTURED | Cancel failed as the authorization for the given transaction is already captured. |
Code | Description |
---|
SUCCESS | Your request has been successfully completed. |
BAD_REQUEST | Invalid request payload |
AUTHORIZATION_FAILED | Value of X-VERIFY is incorrect |
INTERNAL_SERVER_ERROR | Something went wrong. Please call status and try again. |
TRANSACTION_NOT_FOUND | No Authorization found with the given details. |
USER_BLACKLISTED | Customer is blacklisted on PhonePe side |
USER_DOESNOT_EXIST | Invalid user |
🚧
If the Cancel Auth Request API fails, then merchants should retry Cancel Auth Request API to release the authorized amount.