You can use the Get Settlement Details API to retrieve settlement details which the bank has to settle for you. The input is the date for which settlement details are required, where the var1 parameter is the date you want to know the settlement status or UTR (Unique Transaction Reference number). This API can be posted with version (1 or 2) in the var5 parameter.
Environment
Test Environment | Not applicable for Test environment |
Production Environment | https://info.payu.in/merchant/postservice?form=2 |
Request parameters
Parameter | Reference | Example |
---|---|---|
keymandatory | This parameter must contain the key provided by PayU. For more information on how to generate the Key and Salt, refer to Generate Merchant Key and Salt. | |
commandmandatory | This parameter must contain the API command as get_settlement_details. | |
var1mandatory | This parameter must either contain either date for the settlement or UTR (Unique Transaction Reference number). | 2023-09-26 |
var2mandatory | This parameter must contain the page number to be fetched. | 5 |
var3mandatory | This parameter must contain the number of records to be paginated on each page is specified in this parameter. If not specified, 2000 records will be fetched. | 1000 |
var4optional | This parameter must contain either L or leave it blank. | L |
var5optional | This parameter must contain the version of the API that can be either 1 or 2. | 1 |
hashmandatory | Hash logic for this API is:sha512(key|command|var1|salt)β¨sha512 |
Example values
Use the following sample values while trying out the API:
var1
(date of the transaction/UTR number): 2020-10-26var2
: 5var3
: 2000 or more
Sample request
For version 1
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=get_settlement_details&var1=2021-08-10&hash=259ded5457ad8d078b3c06294413680d0b9eb341682a4f0eecad17256388c2e096f37f5077480e3a56000cc0a3585f7cd73a7d2d10d8225a05b3b93cd27fd5f8"
For version 2
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=get_settlement_details&var1=2021-08-10&hash=259ded5457ad8d078b3c06294413680d0b9eb341682a4f0eecad17256388c2e096f37f5077480e3a56000cc0a3585f7cd73a7d2d10d8225a05b3b93cd27fd5f8&var2&var3&var4=L&var5=2"
Note
The dates queried in the above requests using version 1 or version 2 are the same. The second sample request (under Sample Request for Version 2) includes the var5 parameter with the value 2 to indicate that it is for version 2.
Response parameters description
Field | Description | Example |
---|---|---|
payuid | This parameter contains a unique reference number created for each transaction at PayUβs end. You must note this transaction ID as this will be used as a reference for all the future actions on this transaction like Inquiry or Refund. | 403993715521937565 |
txn_id | This parameter contains the transaction ID of the transaction. | 13818 |
txn_date | This parameter contains the date of the transaction. | 2021-08-10 23:46:25 |
mode | This parameter contains the mode of the transaction such as credit card, debit card, etc. For more information, refer toΒ Payment Mode Codes. | CC |
amount | This parameter contains the original amount which was sent in the transaction request by the merchant. | 100 |
requestid | This parameter contains the request ID value posted by the merchant during the transaction request. | 131278418 |
requestdate | This parameter contains the request date and time stamp. | 2021-08-10 23:49:16 |
requestaction | This parameter contains the action taken on the transaction. The action can be any of the following: capture⨠refund⨠cancel chargeback chargeback reversal refundreversal | refund |
requestamount | The parameter contains the amount requested by the merchant to the bank. | 100 |
mer_UTR | This parameter contains the merchant Unique Transaction Reference (UTR) number. | N223211598444659 |
mer_service_fee | This parameter contains the service fee paid by the merchant to the bank. for the transaction | 239.6000 |
mer_service_tax | This parameter contains the tax on service fee paid by the merchant to the bank. for the transaction | 43.1300 |
mer_net_amount | This parameter contains the net amount to be settled by bank to merchant. | 100 |
bank_name | This parameter contains the bank name or the card type based on the transaction. | MAST |
issuing_bank | This parameter contains the card issuing bank name is displayed. | SBI |
merchant_subvention_amount | This parameter contains merchant subvention amount. | 100 |
cgst | This parameter contains the CGST (Central GST) for the transaction. | 43.13000 |
igst | This parameter contains the IGST (Integrated GST) for the transaction. | 43.13000 |
sgst | This parameter contains the SGST (State GST) for the transaction where the supplier or merchant is from a different state of the customer. | 43.13000 |
PG_TYPE | This parameter contains the payment gateway type is displayed in this transaction. | HDFC_Internal_Plus |
Card Type | This parameter indicates whether the card is international or domestic | Domestic. |
SettlementType | This describes about the charges whether its regular processing fee or instant charges | Regular or Instant |
Sample response
Success Scenario
On successful processing from PayU, the response is similar to the following:
(
[status] => 1
[msg] => 1 transactions settled on 2021-08-11
[Txn_details] => Array
(
[1] => Array
(
[payuid] => 13799177287
[txnid] => 13818
[txndate] => 2021-08-10 23:46:25
[mode] => DC
[amount] => 11979.88
[requestid] => 9586840660
[requestdate] => 2021-08-10 23:49:16
[requestaction] => capture
[requestamount] => 11979.88
[mer_utr] => N223211598444659
[mer_service_fee] => 239.6000
[mer_service_tax] => 43.1300
[mer_net_amount] => 11697.1500
[bank_name] => MAST
[issuing_bank] => SBI
[merchant_subvention_amount] => 0.00
[cgst] => 0.00000
[igst] => 43.13000
[sgst] => 0.00000
[PG_TYPE] => HDFC_Internal_Plus
[Card Type] =>
[token] =>
)
)
)
Failure scenario
If the date format is incorrect:
{
"status": 0,
"msg": "Please check date format it should be YYYY-MM-DD"
}
If no data found for the particular date queried:
Array
(
[status] => 1
[msg] => 0 transactions settled on 2015-05-01
[Txn_details] => Array
(
)
)
To learn more about the possible error codes and their description, refer to Error Codes.