POSTOrder Cancel API
Use Case
This API is used by the merchant to cancel the queued orders.
HTTP Headers
ATTRIBUTE | DESCRIPTION |
---|---|
x-mid string(50) |
Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation. |
x-checksum string(108) |
Signature encryption for validation. It's value to be sent should be the checksum string created by using Paytm checksum library. Note: Create the signature using all the request parameters. |
Request Attributes
Body
Attribute | Description |
---|---|
paytmOrderIds array mandatory | paytmOrderIds for the order to be cancelled. |
Response Attributes
Body
Attribute | Description |
---|---|
statusCode string | Failure reason code where status is FAILURE. A detailed list of statusCode is mentioned at the bottom of this page. |
status string | Order cancellation requests can be FAILURE and ACCEPTED. Accepted does not mean that order has been successfully cancelled. It means Cancellation request is successfully received. This attribute should be used to fetch the final status of the order. Please refer Note below for more details. |
statusMessage string | Description of each statusCode. |
Note: Request Accepted means that we have successfully received your order cancellation request. Please check the final status of the order using Status check API to confirm whether the order has been successfully cancelled or not.
Response Codes & Messages
statusCode | status | statusMessage |
---|---|---|
DE_002 | ACCEPTED | Request accepted |
DE_010 | FAILURE | PaytmOrderIds is mandatory field and it can't be null or blank |
DE_013 | FAILURE | SubwalletGuid doesn't contain valid length, It should be 50 or less |
DE_041 | FAILURE | Maximum 500 orders allowed for cancellation |
DE_400 | FAILURE | Request Parameter Invalid |
DE_401 | FAILURE | Authentication Parameters Required |
DE_402 | FAILURE | Access Denied |
DE_404 | FAILURE | Unable to authenticate the request |
DE_405 | FAILURE | Remote IP not whitelisted |
DE_406 | FAILURE | Invalid Client-Token |
DE_407 | FAILURE | Client-Token Required |
DE_408 | FAILURE | Checksum Required |
DE_409 | FAILURE | Checksum Verification Failed |
DE_112 | INPROCESS | Order cancellation inprocess. |
DE_115 | FAILURE | Order cancellation failed |
DE_502 | SYSTEM_ERROR | System Error |
curl -X POST 'https://staging-dashboard.paytm.com/bpay/api/v1/disburse/order/cancel' \
--header 'Content-Type: application/json' \
--header 'x-mid: {mid}' \
--header 'x-checksum: {checksum}' \
--data '{"paytmOrderIds":["ORDER_12345","ORDER_12346"]}'