POSTRelease 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 transactions other than SUCCESS and FAILED which is returned when the system is not sure whether money has been debited from the customer wallet/UPI/cards or not. It happens when there are some system errors between 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 .Merchant has to send txn type in the request of Transaction Status API to know the current status of txn.
Request Attributes
Head
Attribute | Description |
---|---|
version string optional | Application version(provided by Paytm) |
channelId string optional | The parameter value identifies the Channel for which API call is initiated. Example: APP, WEB, WAP, SYSTEM |
requestTimestamp string optional | Unix Timestamp of request |
clientId string mandatory | Paytm uses the merchant key on the basis of clientId parameter value. It is required only if the merchant has more than one key. |
signature string mandatory | Checksum string created by using paytm checksum logic/library |
Body
Attribute | Description |
---|---|
mid string mandatory | This is a unique identifier provided to every merchant by Paytm. MID is part of your account credentials and is different in staging and production environment. Your staging MID is available here & production MID will be available once your activation is complete. |
preAuthId string mandatory | The Unique ID generated for the blocked amount by Paytm. |
paytmSsoToken string optional | This is a unique token linked with the user's Paytm wallet and is provided in the response while linking the user's Paytm wallet. |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | Timestamp at which response was sent |
version string | Application version(provided by paytm) |
clientId string | Paytm uses the merchant key on the basis of clientId parameter value. It is required only if the merchant has more than one key. |
signature string | Checksum string created by using paytm checksum logic/library |
Body
Attribute | Description |
---|---|
preAuthId string | The Unique ID generated for the blocked amount by Paytm |
status string(20) | The Unique ID generated for the blocked amount by Paytm |
statusMessage string(30) | This parameter is the result message which contains information about the result. |
Response Codes & Messages
statusDesc | status | statusMsg |
---|---|---|
Release (Success) | TXN_SUCCESS | Txn Successful |
Release(Pending response) | PENDING | Could not complete request. Please retry again. |
Release Failed(Different MID) | TXN_FAILURE | Either merchant Id or preAuth Id does not match for request |
Release Failed(Different PreauthID) | TXN_FAILURE | Either merchant Id or preAuth Id does not match for request |
Release(Amount already unblocked) | TXN_FAILURE | Amount is already unblocked |
Release Failure | TXN_FAILURE | Balance Account not found |
Release Failure | TXN_FAILURE | We could not get the requested details. |
Release Failure | TXN_FAILURE | Request not unique |
Release Failure | TXN_FAILURE | Merchant does not exist |
Release Failure | TXN_FAILURE | Transaction with the same order Id already exists |
Release Failure | TXN_FAILURE | UNAUTHORIZED_ACCESS |
Release Failure | TXN_FAILURE | This 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 |
809 | Invalid preAuth Id |
curl -X POST 'https://securegw-stage.paytm.in/order/v2/release' \
--header 'Content-Type: application/json' \
--data '{"head":{"requestTimestamp":"1539601338741","clientId":"c11","version":"v2","channelId":"WEB","signature":"KVQ5YrYS/pcQtZ0gghKLWc="},"body":{"preAuthId":"202005031112128001**********","mid":"{mid}"}}'