search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

POSTVoid and Cancel API

Use Case

The API will help merchants to void (cancel) payment request transactions.

Request Attributes

Content Type : JSON

Head

AttributeDescription
clientId
string
mandatory

Unique key for each merchant

Example: abcd

reqHash
string
mandatory

A security hash generated by you, using specific fields in a specific order. While generating a hash, the order (sequence) of fields in the request is important. Therefore, merchants need to generate the hash in the order of fields as mentioned in the request body.

Example: YFymAA3KvswYjLEkRRoqGofJqyMxiqHmPc9noS4fvMc

Body

AttributeDescription
cpayID
string
optional

Payment Request ID (CPay) is a random number generated by the Paytm system

Example: 100005

date
string
optional

Date and time of the transaction
Should not be in the future
Format - yyyy-MM-dd HH:mm:ss

Example: 2023-10-05 00:00:47

merchantOrderId
string
optional

Merchant Order ID

Example: 3573212222

mid
string ( min. 20)
optional

Paytm Merchant ID (MID)

Example: ABCD123

tid
string
mandatory

Paytm Terminal Id

Example: 12345678

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

Date Time value when the response is being returned.
Format - yyyy-MM-dd HH:mm:ss

Example: 2023-06-19 15:10:07

Body

AttributeDescription
paytmMID
string (20)

Paytm generated merchant Id

Example: MOH2458688743335

paytmTid
string (8)

Paytm generated terminal Id

Example: 12345678

merchantTransactionId
string (8-32)

Merchant's system generated Transaction Id(TxnId). It should be unique for each transaction. 
Note: It should be alphanumeric (special characters not allowed)

Example: 2091293484338398383

resultStatus
string

Response status

Example: SUCCESS

resultCode
string

Response status code

Example: A

resultMsg
string

Response message

Example: Accepted_Success

resultCodeId
string

Result code id

Example: 0009

Response Codes & Messages

resultCoderesultStatusresultMsg
0009SUCCESSSuccess
0012FAILInternal Server Error. Please retry
Staging
Production
https://securegw-stage.paytm.in/ecr/ext/void copy icon
REQUEST
RESPONSE
CURL
curl --location 'https://securegw-stage.paytm.in/ecr/ext/void ' \
--header 'Content-Type: application/json' \
--data '{"head": {"clientId": "abcd","reqHash": "YFymAA3KvswYjLEkRRoqGofJqyMxiqHmPc9noS4fvMc" },"body": {"cpayId": "1500453308","date": "2023-10-05 00:00:47","merchantOrderId": "3573212222","mid": "YOUR_MID_HERE","tid": "12345678"}}'
copy icon