post https://mercury-uat.phonepe.com/v3/charge///cancel
Used to cancel the collect request
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256("/v3/charge/{merchantId}/{transactionId}/cancel" + salt key) + ### + salt index |
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 |
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 |
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.