Get Settlement Details API

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

EnvironmentURL
Test EnvironmentNot applicable for Test environment
Production Environmenthttps://info.payu.in/merchant/postservice?form=2

Request parameters

ParameterReferenceExample
key mandatoryThis 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.
command mandatoryThis parameter must contain the API command as get_settlement_details.
var1 mandatoryThis parameter must either contain either date for the settlement or UTR (Unique Transaction Reference number).2023-09-26
var2 mandatoryThis parameter must contain the page number to be fetched.5
var3 mandatoryThis 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
var4 optionalThis parameter must contain either L or leave it blank.L
var5 optionalThis parameter must contain the version of the API that can be either 1 or 2.1
hash mandatoryHash logic for this API is:
`sha512(keycommandvar1

Example values

Use the following sample values while trying out the API:

  • var1 (date of the transaction/UTR number): 2020-10-26
  • var2: 5
  • var3: 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

FieldDescriptionExample
payuidThis parameter contains a unique sale transaction id generated by Payu for every sale transaction.403993715521937565
txn_idThis parameter contains the sale transaction ID (merchant reference ID for sale).13818
txn_dateThis parameter contains the date of the transaction.2021-08-10 23:46:25
modeThis parameter contains the mode of the transaction such as credit card, debit card, etc. For more information, refer to Payment Mode Codes.CC
amountThis parameter contains the original amount which was sent in the transaction request by the merchant.100
request_idThis parameter contains the unique request id generated from PayU with any of the following transaction actions: capture/refund/chargeback/refundReversal/chargebackreversal actions actions.131278418
requestdateThis parameter contains the request date and time stamp.2021-08-10 23:49:16
requestactionThis 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 | | Scheme | This parameter contains the scheme. | | | FeeType | This parameter contains fee type if the fee is collected for instant settlements or refunds. | tdrFee | | InstantSettlementTDR | This parameter contains the TDR collected for instant settlement. | 0.0 | | InstantSettlementTDRTax | This parameter contains the tax for the TDR collected for instant settlement. | 0.0 | | InstantSettlementTdrType | This parameter contains the TDR type for instant settlement. | 0.0 | | InstantRefundTDR | This parameter contains the TDR collected for instant refunds. | 0.0 | | InstantRefundTDRTax | This parameter contains the tax for the TDR collected for instant refunds. | 0.0 | | InstantRefundTdrType | This parameter contains the TDR type for instant refund. | 0.0 | | perDayServiceFee | This parameter contains the per day service fee for instant settlement or refunds. | 0,0 | | perDayServiceTax | This parameter contains the per day service tax for instant settlement or refunds. | 0,0 | | pricingDays | This parameter contains the pricing days for instant settlement or refunds. | 1 | | offerServiceFee | This parameter contains the service fee for offer. | 0,0 | | offerServiceTax | This parameter contains the tax for offer service fee. | 0,0 |

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": {
        "1": {
            "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:

{
    "status": 1,
    "msg": "0 transactions settled on 2015-05-01",
    "Txn_details": {}
}

For the possible error codes and their description, refer to Error Codes.