POSTVoid and Cancel API
Use Case
The API will help merchants to void (cancel) payment request transactions.
Request Attributes
Head
Attribute | Description |
---|---|
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
Attribute | Description |
---|---|
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 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
Head
Attribute | Description |
---|---|
responseTimestamp string | Date Time value when the response is being returned. Example: 2023-06-19 15:10:07 |
Body
Attribute | Description |
---|---|
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. 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
resultCode | resultStatus | resultMsg |
---|---|---|
0009 | SUCCESS | Success |
0012 | FAIL | Internal Server Error. Please retry |
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"}}'