The check_action_status API has another usage too. For a particular PayUID, it returns any of the following the states:
Postman Collection: Access the Check Refund Status with PayU ID API Postman Collection from the following location:
Refund states
- QUEUED : This indicates that the refund is accepted by PayU, but not sent to the downstream banking partner for processing.
- SUCCESS : This indicates that the refund is processed successfully.
- FAILURE : This indicates that refund processing failed. No funds are deducted for such refunds from the merchant’s settlement.
- IN PROGRESS : This indicates that the refund is raised to the bank for processing.
- REQUESTED : This indicates that the refund is sent to the bank for offline processing. In such cases, it takes upto 5-7 business days for the credit to reflect into the customer’s account.
- od_hit (Overdraft Hit): This indicates that the Overdraft has occurred( Insufficient funds in account ) In such cases, it takes upto 5-7 business days for the credit to reflect into the customer’s account.
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"import requests
url = "https://test.payu.in/merchant/postservice?form=2"
headers = {
'accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
data = {
'key': 'JP***g',
'command': 'check_action_status',
'var1': '403993715521937565',
'var2': 'payuid',
'hash': '81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e'
}
response = requests.post(url, headers=headers, data=data)
print(response.json())const axios = require('axios');
const url = 'https://test.payu.in/merchant/postservice?form=2';
const data = new URLSearchParams({
key: 'JP***g',
command: 'check_action_status',
var1: '403993715521937565',
var2: 'payuid',
hash: '81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e'
});
axios.post(url, data, {
headers: {
'accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.then(response => console.log(response.data))
.catch(error => console.error(error));import java.io.*;
import java.net.http.*;
import java.net.*;
public class PayURequest {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String formData = "key=JP***g&command=check_action_status&var1=403993715521937565&var2=payuid&hash=81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://test.payu.in/merchant/postservice?form=2"))
.header("accept", "application/json")
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(formData))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://test.payu.in/merchant/postservice?form=2',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'accept: application/json',
'Content-Type: application/x-www-form-urlencoded'
),
CURLOPT_POSTFIELDS => http_build_query(array(
'key' => 'JP***g',
'command' => 'check_action_status',
'var1' => '403993715521937565',
'var2' => 'payuid',
'hash' => '81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e'
))
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new HttpClient();
var data = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("key", "JP***g"),
new KeyValuePair<string, string>("command", "check_action_status"),
new KeyValuePair<string, string>("var1", "403993715521937565"),
new KeyValuePair<string, string>("var2", "payuid"),
new KeyValuePair<string, string>("hash", "81bdb5b8e625f254398d744269844fc6b9d87b3782670331c2a6b856f42f315b9898f397df7292cfd33a6153abf4acac58ce3ac671e41999ff81d98ce432f48e")
});
client.DefaultRequestHeaders.Add("accept", "application/json");
var response = await client.PostAsync("https://test.payu.in/merchant/postservice?form=2", data);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}Each example sends a POST request with URL-encoded form data to check the action status ✅
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
500Internal server error
