Check Refund Status API with Request ID

API Command: check_action_status

Whenever the cancel_refund_transaction API is executed successfully to cancel a transaction, a Request ID is returned in the output parameters for that particular request. For more information on the cancel_refund_transaction API, refer to Refund Transaction.

In check_action_status API, you need to input this Request ID to get the current status of the request. The return parameters are MIHPayID, Amount, Discount, Mode, and Status of transaction.

Environment

Sample request
curl --location --request POST 'https://test.info.payu.in/merchant/postservice.php?form=2' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data
'key=JF****g&hash=9f5faabedb7f5d41f519db3a223cf5318ecc0b7e669f49e0a699d4c4879e1ccaed5b99f5cd
8be4f2cbddefe5272ec983abd8f38480d9c2609a29447f750a3158&command=check_action_status_txnid&var
1=7043873219"
Sample response

Success scenario

if successfully fetched

{
      "status": 1,
      "msg": "1 out of 1 Transactions Fetched Successfully",
      "transaction_details": {
            "131278422": {
                  "131278422": {
                        "mihpayid": "403993715521937565",
                        "bank_ref_num": "527013524405",
                        "request_id": "131278422",
                        "amt": "10.00",
                        "mode": "CC",
                        "action": "refund",
                        "token": "20201105secrettokenatur",
                        "status": "success",
                        "bank_arn": null,
                        "settlement_id": null,
                        "amount_settled": null,
                        "UTR_no": null,
                        "value_date": null,
                        "refund_mode": "Back to Source"
                  }
            }
      }
}

Failure scenarios

  • If mihpayid is not found, the response is similar to the following:
{
      "status": 0,
      "msg": "0 out of 1 Transactions Fetched Successfully",
      "transaction_details": {
            "13127842": "No action status found"
      }
}
  • If mihpayid is missing, the response is similar to the following:
{
      "status": 0,
      "msg": "Parameter missing"
}
Response parameters and sample response

📘

Note:

The error_code ​value 102​ should be treated as a success; the rest are failures. For the list of error codes, refer to Error Codes for Refund Initiation.

Request parameters

Reference information for request parameters
ParameterReference
keyFor more information on how to generate the Key and Salt, refer to any of the following:

- Production: Generate Merchant Key and Salt
- Test: Generate Test Merchant Key and Salt
hashHash logic for this API is:
sha512(key|command|var1|salt)
sha512

Example value

Use the following sample values while trying out the API:

  • var1 (request_id): 131278422
Language
Click Try It! to start a request and see the response here!