Check Refund Status API with PayU ID

API Command: check_action_status

Check Action Status API (PayUID)

The check_action_status API has another usage too. For a particular PayUID, it returns any of the following the states:

Refund states

Environment

Sample request
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=check_action_status&var1=403993715521937565&var2=payuid&hash=81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e"

Example Values:

  • var1 (mihpayid): 403993715521937565
  • var2: payuid

Failure Scenarios:

If mihpayid is not found:

{
  "status": 0,
  "msg": "0 out of 1 Transactions Fetched Successfully",
  "transaction_details": {
    "13127842": "No action status found"
  }
}

If mihpayid is missing:

{
  "status": 0,
  "msg": "Parameter missing"
}
Sample response

On successful processing from PayU, the response is similar to the following:

{
  "status": 1,
  "msg": "1 out of 1 Transactions Fetched Successfully",
  "transaction_details": {
    "403993715521937565": {
      "131278418": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "399900",
        "request_id": "131278418",
        "amt": "100.00",
        "mode": "CC",
        "action": "capture",
        "token": "",
        "status": "SUCCESS",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "-"
      },
      "131278422": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278422",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken1",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278430": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278430",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken2",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278458": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278458",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken3",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278471": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278471",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken4",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278484": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278484",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken5",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278499": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278499",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken6",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131278515": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131278515",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken7",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131287648": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131287648",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken8",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131295795": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131295795",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken9",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      },
      "131297379": {
        "mihpayid": "403993715521937565",
        "bank_ref_num": "527013524405",
        "request_id": "131297379",
        "amt": "10.00",
        "mode": "CC",
        "action": "refund",
        "token": "RefundToken10",
        "status": "success",
        "bank_arn": null,
        "settlement_id": null,
        "amount_settled": null,
        "UTR_no": null,
        "value_date": null,
        "refund_mode": "Back to Source"
      }
    }
  }
}
Response parameters

The transaction_details parameter of the response is in JSON format. For more information, refer to Additional Info for General APIs.

ParameterDescription
statusIndicates the success (1) or failure (0) of the API call
msgDescriptive message about the API response status
transaction_detailsJSON object containing all transaction details for the requested PayUID
mihpayidUnique reference number created for each transaction at PayU's end
bank_ref_numBank reference number generated by the bank for the transaction
request_idThe Request ID associated with each action on the transaction
amtAmount of the transaction or refund action
modePayment method used for the transaction (CC for Credit Card, DC for Debit Card, etc.)
actionType of action performed (e.g., "capture", "refund")
tokenSecurity token associated with the transaction
statusCurrent status of the action/transaction
bank_arnBank Acquirer Reference Number (if available)
settlement_idSettlement identifier (if available)
amount_settledAmount that has been settled (if available)
UTR_noUnique Transaction Reference number (if available)
value_dateValue date of the transaction (if available)
refund_modeMode of refund processing (e.g., "Back to Source")

Request parameters

Additional Info for 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

Required Parameters:

  • key - Merchant key provided by PayU
  • command - Set to "check_action_status" for this API
  • var1 - The PayUID (mihpayid) for which to retrieve action status
  • var2 - Should be set to "payuid" to indicate the PayUID lookup mode
  • hash - Hash value for security validation

Example Values: Use the following sample values while trying out the API:

  • var1 (mihpayid): 403993715521937565
  • var2: payuid

Hash Calculation: The hash should be calculated using the sha512 algorithm with the format: sha512(key|command|var1|salt)

Important Notes:

  1. This API usage returns all actions associated with a particular PayUID
  2. Unlike the request_id lookup, this returns the complete transaction history
  3. The response includes details of capture and all refunds associated with the transaction
  4. Multiple refund actions will be listed with their individual request_ids and statuses
Language
Click Try It! to start a request and see the response here!