Release API

Use Case


Release API is used for void a transaction and return money back to payer. The difference between void and refund is, a paid transaction is applicable for void before it is captured or confirmed by merchant or confirmed by payer, and it is applicable for refund after it is captured or confirmed.


We have PENDING status for release transaction other than SUCCESS and FAILED which is returned when the system is not sure whether money has been debited from customer wallet or not.

It happens when there are some system errors between two Paytm systems.

We have internal reconciliation between systems after which this PENDING transaction moves to either SUCCESS or FAILED state.

To verify the final Status of transaction Merchant can call Transaction Status API API and Merchant has to send txn type in the request of Transaction Status API to know the current status of txn.

Request Attributes:

API Content format: JSON

NAMEDESCRIPTIONREQUIRED
MIDThis is the “Merchant Identifier” that is issued by Paytm to the Merchant. This is unique for each merchant that integrates with Paytm.Yes
PREAUTH_IDThe Unique ID generated for the blocked amount by PaytmYes
TOKENA unique token received from Paytm against each userNo
CHECKSUMChecksum calculated on pre-defined logicYes

Response Attributes:

API Content format: JSON

NAMEDESCRIPTIONREQUIRED
PREAUTH_IDThe Unique ID generated for the blocked amount by PaytmYes
STATUSThe status of the Release request raised by the merchantYes
STATUSMESSAGEStatus message corresponding to statusYes

Release Status and Messages


SCENARIOMESSAGESTATUS
Release Failed(Different MID)Either merchant Id or preAuth Id does not match for requestTXN_FAILURE
Release Failed(Different PreauthID)Either merchant Id or preAuth Id does not match for requestTXN_FAILURE
Release(Amount already unblocked)Amount is already unblockedTXN_FAILURE
Release(Pending response)Could not complete request. Please retry again.PENDING
Release (Success)Txn SuccessfulTXN_SUCCESS
Release FailureBalance Account not foundTXN_FAILURE
Release FailureWe could not get the requested details. Please try againTXN_FAILURE
Release FailureRequest not uniqueTXN_FAILURE
Release FailureMerchant does not existTXN_FAILURE
Release FailureTransaction with the same order Id already existsTXN_FAILURE
Release FailureUNAUTHORIZED_ACCESSTXN_FAILURE
Release FailureThis user is blocked at Paytm endTXN_FAILURE

Release Error Codes and Messages


ERROR CODEERROR MESSAGE
305Merchant Id not registered
330Paytm checksum mismatch
501System Error
PREAUTH_ID NOT PRESENTInvalid preAuth Id
VAER-PF101VAL_PF_MID IS REQUIRED
VAER-CS103CHECKSUM IS REQUIRED
ORDER_ID NOT PRESENTORDER_ID IS REQUIRED
TXN_AMOUNT IS NOT PRESENTTXN_AMOUNT IS REQUIRED
NO TOKENTOKEN IS REQUIRED

Endpoints

Staging: https://securegw-stage.paytm.in/order/release

Production: https://securegw.paytm.in/order/release

Request CodeResponse JSON

curl -X POST 'https://securegw-stage.paytm.in/order/release' --data-urlencode 
'JsonData={
    "MID":"xxxxxxxxxxxxxxxxxxxx",
    "PREAUTH_ID":"xxxxx",
    "TOKEN":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "CHECKSUM":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'