search

POSTRelease API v1

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 Type: JSON

ATTRIBUTE DESCRIPTION

MID

mandatory

This is a unique identifier provided to every merchant by Paytm. MID is part of your account credentials and is different on staging and production environment. Your staging MID is available here & production MID will be available once your activation is complete.

PREAUTH_ID

mandatory

The Unique ID generated for the blocked amount by Paytm.

TOKEN

mandatory

This is a unique token linked with the user's Paytm wallet and is provided in the response while linking user's Paytm wallet.

CHECKSUM

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.

Response Attributes

API Content Type: JSON

ATTRIBUTE DESCRIPTION
PREAUTH_ID The Unique ID generated for the blocked amount by Paytm

STATUS

string(20)

This parameter indicates the status of API call.

STATUSMESSAGE

string(30)

This parameter is the result message which contains information about the result.

Response Codes & Messages

SCENARIOSTATUSSTATUSMESSAGE
Release (Success) TXN_SUCCESSTxn Successful
Release(Pending response) PENDINGCould not complete request. Please retry again.
Release Failed(Different MID)TXN_FAILUREEither merchant Id or preAuth Id does not match for request
Release Failed(Different PreauthID)TXN_FAILUREEither merchant Id or preAuth Id does not match for request
Release(Amount already unblocked)TXN_FAILUREAmount is already unblocked
Release Failure TXN_FAILUREBalance Account not found
Release Failure TXN_FAILUREWe could not get the requested details. Please try again
Release Failure TXN_FAILURERequest not unique
Release Failure TXN_FAILUREMerchant does not exist
Release Failure TXN_FAILURETransaction with the same order Id already exists
Release Failure TXN_FAILUREUNAUTHORIZED_ACCESS
Release Failure TXN_FAILUREThis user is blocked at Paytm end


Release Error Codes and Messages


ErrorCode ErrorMessage
305 Merchant Id not registered
330 Paytm checksum mismatch
501 System Error
PREAUTH_ID NOT PRESENT Invalid preAuth Id
VAER-PF101 VAL_PF_MID IS REQUIRED
VAER-CS103 CHECKSUM IS REQUIRED
ORDER_ID NOT PRESENT ORDER_ID IS REQUIRED
TXN_AMOUNT IS NOT PRESENT TXN_AMOUNT IS REQUIRED
NO TOKEN TOKEN IS REQUIRED
⇾
Staging
Production
https://securegw-stage.paytm.in/order/releasecopy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl -X POST 'https://securegw-stage.paytm.in/order/release' \
--header 'Content-Type: application/json' \
--data '{"MID":"{mid}","PREAUTH_ID":"2020052711121XXXXXXXX68304901660306","TOKEN":"eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..xxxxxxxxxxx.9iHTtWbCZ0I6qbn2sUnyz5siw1fqbmtEnFMFE7nSIX-yrwCkiGfAC6QmPr9q-tw8LMPOh5-3UXRbpeVZEupQd3wNyaArWybRX2HAxJDRD8mxJ_wxzJM6GZ1ov4O3EIsx2Y_Zr0aHCd3VbnTjRUnlVdxXJPFG8QZs0b_2TVdoAX3_QjZS8_dwcmIWoH8ebDzOIs7MJacETfMtyFGAo8Xc0LjznToUWvTsTbIXQoF1yB0.1fZFAYJVsY61BTv2htLcXQ8800","CHECKSUM":"{checksum}"}'     
copy icon