1. Home
  2. Docs
  3. Developers Guide
  4. Integration APIs
  5. Refund APIs
  6. getAllRefundsFromTxnIds

getAllRefundsFromTxnIds

This command is used to retrieve status of all the refund requests fired for a particular Transaction ID. The output of this API provides the request ID, the PG used, the status of refund request and creation of refund date information.

ParameterDescriptionValue
keyMerchant key provided by PayU. Please refer to the first entry in the Post Parameters table for a detailed description of this parameter JPTXg
command This parameter must have the name of the web-service. getAllRefundsFromTxnIds
var1 In this parameter, you need to pass the Transaction ID (txnid) of the transaction.
8000123
hashThis parameter must contain the hash value to be calculated at your end. The string used for calculating the hash is mentioned below:
sha512(key|command|var1|salt)
sha512 is the encryption method used here
c24ee06c7cf40314ede424
b1fcc2b97a12f97a7d3dd2
06876eef16660eb09fd374
fd82861f66d8152e

Request body

curl -X POST "https://test.payu.in/merchant/postservice?form=2
-H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d

"key=JP***g&command=getAllRefundsFromTxnIds&var1=db97dd56eff7296e5061&hash=69543c08018121cc882d2f8b1761567367c1806becde3db7f54ab552362677cc08d8dfa4b9411e234e4876e6aba80c05a32e75ed499aff458c7f6027bf4ef2a8"

Response Format

a. If successfully fetched:

{
      "status": 1,
      "msg": "Refunds fetched successfully.",
      "Refund Details": {
            "403993715521937565": [
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278422",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 01:23:19",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 01:24:04"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278430",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 01:29:13",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 01:30:08"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278458",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 01:47:36",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 01:49:04"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278471",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 01:53:28",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 01:55:05"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278484",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 01:58:32",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 02:00:09"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278499",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 02:05:42",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 02:07:04"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131278515",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-05 02:15:11",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2020-11-05 02:16:03"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131287648",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-06 19:21:32",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2021-01-28 10:25:17"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131295795",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-09 18:59:45",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2021-02-10 01:01:14"
                  },
                  {
                        "PayuID": "403993715521937565",
                        "RequestID": "131297379",
                        "RefundToken": "20201105secrettokenatur",
                        "PaymentGateway": "AXISPG",
                        "Amount": "10.00",
                        "Status": "success",
                        "RefundCreationDate": "2020-11-10 09:39:33",
                        "bank_ref_no": "527013524405",
                        "bank_arn": null,
                        "success_at": "2021-02-01 15:50:25"
                  }
            ]
      }
}

b. If no refunds found:

{
      "status": 1,
      "msg": "No Refunds Found for the transaction."
}