post https://test.payu.in/merchant/postservice.php
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
Environment | URL |
---|---|
Test Environment | https://test.payu.in/merchant/postservice.php?form=2 |
Production Environment | https://info.payu.in/merchant/postservice?form=2 |
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): 403993715521937565var2
: 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.
Parameter | Description |
---|---|
status | Indicates the success (1) or failure (0) of the API call |
msg | Descriptive message about the API response status |
transaction_details | JSON object containing all transaction details for the requested PayUID |
mihpayid | Unique reference number created for each transaction at PayU's end |
bank_ref_num | Bank reference number generated by the bank for the transaction |
request_id | The Request ID associated with each action on the transaction |
amt | Amount of the transaction or refund action |
mode | Payment method used for the transaction (CC for Credit Card, DC for Debit Card, etc.) |
action | Type of action performed (e.g., "capture", "refund") |
token | Security token associated with the transaction |
status | Current status of the action/transaction |
bank_arn | Bank Acquirer Reference Number (if available) |
settlement_id | Settlement identifier (if available) |
amount_settled | Amount that has been settled (if available) |
UTR_no | Unique Transaction Reference number (if available) |
value_date | Value date of the transaction (if available) |
refund_mode | Mode of refund processing (e.g., "Back to Source") |
Request parameters
Additional Info for Request parameters
Reference Information for Request Parameters
Parameter | Reference |
---|---|
key | For 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 |
hash | Hash logic for this API is: sha512(key|command|var1|salt) sha512 |
Required Parameters:
key
- Merchant key provided by PayUcommand
- Set to "check_action_status" for this APIvar1
- The PayUID (mihpayid) for which to retrieve action statusvar2
- Should be set to "payuid" to indicate the PayUID lookup modehash
- Hash value for security validation
Example Values: Use the following sample values while trying out the API:
var1
(mihpayid): 403993715521937565var2
: payuid
Hash Calculation: The hash should be calculated using the sha512 algorithm with the format: sha512(key|command|var1|salt)
Important Notes:
- This API usage returns all actions associated with a particular PayUID
- Unlike the request_id lookup, this returns the complete transaction history
- The response includes details of capture and all refunds associated with the transaction
- Multiple refund actions will be listed with their individual request_ids and statuses