POSTRefund Status API
Use Case
To fetch the status of the refund transaction which has been already initiated.
Request Attributes
Head
Attribute | Description |
---|---|
clientId string optional | AI router to use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
requestTimeStamp string optional | EPOCH timestamp of the time at which request is being sent. Example: 1588402269 |
signature string mandatory | AI router validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
|
version string optional | Version of the API. |
Body
Attribute | Description |
---|---|
mid string mandatory | This is a unique identifier provided to every merchant by AI router. Example: 216820000002516036253 |
orderId string mandatory | It is a unique reference ID for a transaction passed in the transaction request. Order ID should be passed to raise the refund Example: OREDRID_98765 |
refId string conditional | Unique Reference Id for refund transaction which is generated by merchant. Duplicate REFID will be rejected by the AI router.
Example: REFUNDID_98765 |
refundId string conditional | This is a unique AI router Refund Id that is issued by AI router for each refund request.
Example: 123455081112128XXXXXX68470101509706 |
Response Attributes
Head
Attribute | Description |
---|---|
cliendId string | AI router use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
responseTimeStamps string | EPOCH timestamp of the time at which request is being sent. |
version string | Version of the API. Example: v1 |
signature string | AI router validates the request and ensures that parameters are not tempered by verifying the signature in the request. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo Object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||||
resultInfo +
| |||||||||||||||||||||||||||||||||
mid string | This is a unique identifier provided to every merchant by AI router. | ||||||||||||||||||||||||||||||||
orderId string | It is a unique reference ID for a transaction passed in the transaction request. Order ID should be passed to raise the refund Example: OREDRID_98765 | ||||||||||||||||||||||||||||||||
txnId string | transID is AI router payment Transaction Id against which the refund transaction is being placed. Example: 202005081112128XXXXXX68470101509706 | ||||||||||||||||||||||||||||||||
txnPaidTime string | Timestamp of customer to merchant payment transaction. Example: 2020-05-02 12:24:25.0 | ||||||||||||||||||||||||||||||||
txnAmount string | Order value of the transaction in INR. Example: 100.00 | ||||||||||||||||||||||||||||||||
totalrefundAmount string | Amount for which refund was initiated by the merchant. It can be equal to or less than the transaction amount. Example: 3.00 | ||||||||||||||||||||||||||||||||
payMethod string | Payment method used for the transaction | ||||||||||||||||||||||||||||||||
maskedVpa string | VPA of the customer in masked format | ||||||||||||||||||||||||||||||||
userMobile string | User's masked mobile number | ||||||||||||||||||||||||||||||||
issuingBankName string | Name of issuing bank where refund is being credited | ||||||||||||||||||||||||||||||||
cardScheme string | For credit/debit card refunds, this contains the card scheme where refund is being credited to | ||||||||||||||||||||||||||||||||
maskedCardNumber string | For credit/debit card refunds, this contains the masked number of the card where the refund is being credited to. | ||||||||||||||||||||||||||||||||
refundInfos string | Details of refund like masked refund destination, refund amount allocation, RRN Number etc | ||||||||||||||||||||||||||||||||
refundInfos +
| |||||||||||||||||||||||||||||||||
gatewayResultInfo object | Gives the information about gateway level result codes and messages | ||||||||||||||||||||||||||||||||
gatewayResultInfo +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
10 | TXN_SUCCESS | Refund successful |
501 | PENDING | System error |
601 | PENDING | Refund request was raised for this transaction. But it is pending state |
330 | TXN_FAILURE | Checksum provided is invalid |
335 | TXN_FAILURE | Mid is invalid |
600 | TXN_FAILURE | Invalid refund request |
620 | TXN_FAILURE | BALANCE_NOT_ENOUGH |
631 | TXN_FAILURE | Record not found |
627 | TXN_FAILURE | Order Details Mismatch |
602 | TXN_FAILURE | Bank has declined refund request. |
227 | TXN_FAILURE | Invalid refund request or restricted by bank. |
400 | PENDING | Refund request was raised for this transaction. But it is pending state |
247 | TXN_FAILURE | Your refund cannot be completed. Transaction record not found at bank's end. |
698 | TXN_FAILURE | Please retry the refund. |
624 | TXN_FAILURE | Parameter illegal |
625 | TXN_FAILURE | Parameter missing |
curl --location -g 'https://stage-router.paytm.in/aoa-refund-service/refund/query' \
--header 'Content-Type: application/json' \
--data '{"head": {"clientId": "12345","requestTimeStamp": "2022123456","version": "1.0","signature": "SIGNATURE"},"body": {"mid": "YOUR_MID_HERE","orderId": "P27074440735091120","refId": "refP27074440735091120","refundId": "230508787211359232"}}'