search

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)
mandatory

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)
mandatory

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

Content Type : JSON

Body

AttributeDescription
paytmOrderIds
array
mandatory

paytmOrderIds for the order to be cancelled.

Response Attributes

Content Type : JSON

Body

AttributeDescription
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

statusCodestatusstatusMessage
DE_002ACCEPTEDRequest accepted
DE_010FAILUREPaytmOrderIds is mandatory field and it can't be null or blank
DE_013FAILURESubwalletGuid doesn't contain valid length, It should be 50 or less
DE_041FAILUREMaximum 500 orders allowed for cancellation
DE_400FAILURERequest Parameter Invalid
DE_401FAILUREAuthentication Parameters Required
DE_402FAILUREAccess Denied
DE_404FAILUREUnable to authenticate the request
DE_405FAILURERemote IP not whitelisted
DE_406FAILUREInvalid Client-Token
DE_407FAILUREClient-Token Required
DE_408FAILUREChecksum Required
DE_409FAILUREChecksum Verification Failed
DE_112INPROCESSOrder cancellation inprocess.
DE_115FAILUREOrder cancellation failed
DE_502SYSTEM_ERRORSystem Error
Staging
Production
https://staging-dashboard.paytm.com/bpay/api/v1/disburse/order/cancelcopy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
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"]}'
copy icon