API Command: aggregator_check_action_status_txnid
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 mandatory | string Generated by PayU while onboarding. | Your Test Key |
command mandatory | string API Command for this API is aggregator_check_action_status_txnid | aggregator_check_a ction_status_txnid |
hash mandatory | hash Has generated using the following logic:sha512(key|command|var1|salt) sha512 is the encryption method used here. | |
var1 mandatory | string PayU ID of the transaction | 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"
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
{
"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."
}