The aggregator_check_action_status_txnid API helps you to fetch the refund status of transactions where the refunds are for split payments.
Note: The aggregator_check_action_status_txnid must be used only to check the split transactions' refund status.
HTTP Method: POST
Environment
| Test Environment | https://test.payu.in/merchant/ |
| Production Environment | https://info.payu.in/merchant/ |
Request parameters
| Parameter | Description | Example |
|---|---|---|
key |
|
Your Test Key |
command |
|
aggregator_check_a |
hash |
|
|
var1 |
|
143034342 |
The valid values for subvention_mode are listed in the following table:
| Refund mode | Value | Description |
|---|---|---|
| Source | 1 | Refunds with Normal or to card |
| IMPS | 3 | Refunds with IMPS method |
| NEFT | 4 | Refunds with NEFT method |
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=A6lB8r&command=aggregator_check_action_status_txnid&hash=2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848&var1=14370578416"import requests
url = "https://test.payu.in/merchant/postservice?form=2"
headers = {
'accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
data = {
'key': 'A6lB8r',
'command': 'aggregator_check_action_status_txnid',
'hash': '2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848',
'var1': '14370578416'
}
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: 'A6lB8r',
command: 'aggregator_check_action_status_txnid',
hash: '2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848',
var1: '14370578416'
});
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=A6lB8r&command=aggregator_check_action_status_txnid&hash=2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848&var1=14370578416";
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());
}
}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", "A6lB8r"),
new KeyValuePair<string, string>("command", "aggregator_check_action_status_txnid"),
new KeyValuePair<string, string>("hash", "2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848"),
new KeyValuePair<string, string>("var1", "14370578416")
});
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);
}
}use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
my $ua = LWP::UserAgent->new;
my $url = 'https://test.payu.in/merchant/postservice?form=2';
my $response = $ua->request(
POST $url,
'accept' => 'application/json',
'Content-Type' => 'application/x-www-form-urlencoded',
Content => {
key => 'A6lB8r',
command => 'aggregator_check_action_status_txnid',
hash => '2a04a44ed058ca724a17b4e4d4639aa15254a343e047c9085687810d815845aed5183ae7792adbc8c9c4991f978ee2f15ea4284706dfa3fbcd42d36491369848',
var1 => '14370578416'
}
);
print $response->content;Response parameters
| Parameter | Description | Example |
|---|---|---|
| status | This parameter returns the status of web service call. The status can be any of the following: 0 - If web service call failed. 1 - If web service call succeeded | 1 |
| msg | Displays the response message. | |
| payuid | Displays the PayU ID that was submitted in the request. | 14370578416 |
| transactionItems | A JSON returning the details of transaction before the split. | Refer to transactionItems |
| splitItems | A JSON returning the details of transaction and refunds against each merchant key (including child key) | Refer to splititems JSON |
transactionItems JSON
The transactionItems JSON that is part of the response for a successful transaction is similar to the following:
"transactionItems": {
"iDJYfd": {
"capture": {
"txnid": "PB21524761S",
"merKey": "iDJYfd",
"mihpayid": "14706907828",
"bank_ref_num": "220448967168",
"request_id": "10208412464",
"amt": "2445.00",
"payu_code": "NB",
"action": "capture",
"token": "",
"status": "SUCCESS",
"bank_arn": null,
"settlement_id": null,
"isSubvention": "0",
"amount_settled": "0.0000",
"UTR_no": null,
"value_date": null,
"prev_status": null,
"refund_mode": "-"
}
}
}splitItems JSON
The splitItems JSON that is part of the response for a successful transaction is similar to the following:
"splitItems": {
"Slcv2Q": {
"capture": {
"mihpayid": "14707170968",
"bank_ref_num": "220448967168",
"request_id": "10208598167",
"amt": "2445.00",
"payu_code": "NB",
"action": "capture",
"token": null,
"status": "SUCCESS",
"bank_arn": null,
"settlement_id": "202202151245",
"isSubvention": "0",
"amount_settled": "2445.0000",
"UTR_no": "202150832553",
"value_date": "2022-02-15",
"refund_mode": "-"
},
"refund": {
"969750": {
"mihpayid": "14707170968",
"bank_ref_num": null,
"request_id": "10241480197",
"amt": "2445.00",
"payu_code": "NB",
"action": "refund",
"token": "969750",
"status": "SUCCESS",
"bank_arn": "220448967168",
"settlement_id": "202202251245",
"isSubvention": "0",
"amount_settled": "-2445.0000",
"UTR_no": "202254321504",
"value_date": "2022-02-25",
"refund_mode": "Back to Source"
}
}
}
}Sample response
Success scenario
{
"status": 1,
"payuid": "14706907828",
"transactionItems": {
"iDJYfd": {
"capture": {
"txnid": "PB21524761S",
"merKey": "iDJYfd",
"mihpayid": "14706907828",
"bank_ref_num": "220448967168",
"request_id": "10208412464",
"amt": "2445.00",
"payu_code": "NB",
"action": "capture",
"token": "",
"status": "SUCCESS",
"bank_arn": null,
"settlement_id": null,
"isSubvention": "0",
"amount_settled": "0.0000",
"UTR_no": null,
"value_date": null,
"prev_status": null,
"refund_mode": "-"
}
}
},
"splitItems": {
"Slcv2Q": {
"capture": {
"mihpayid": "14707170968",
"bank_ref_num": "220448967168",
"request_id": "10208598167",
"amt": "2445.00",
"payu_code": "NB",
"action": "capture",
"token": null,
"status": "SUCCESS",
"bank_arn": null,
"settlement_id": "202202151245",
"isSubvention": "0",
"amount_settled": "2445.0000",
"UTR_no": "202150832553",
"value_date": "2022-02-15",
"refund_mode": "-"
},
"refund": {
"969750": {
"mihpayid": "14707170968",
"bank_ref_num": null,
"request_id": "10241480197",
"amt": "2445.00",
"payu_code": "NB",
"action": "refund",
"token": "969750",
"status": "SUCCESS",
"bank_arn": "220448967168",
"settlement_id": "202202251245",
"isSubvention": "0",
"amount_settled": "-2445.0000",
"UTR_no": "202254321504",
"value_date": "2022-02-25",
"refund_mode": "Back to Source"
}
}
}
}
}Failure scenarios
- Merchant not authorized
{
"status": 0,
"msg": "Merchant is not authorized to use PayU API"
}- Invalid hash
{
"status": 0,
"msg": "Invalid Hash."
}