Get Transaction Info API

The Get Transaction Info API (gettransaction_info) can take input as the exact time in terms of minutes and seconds the output would be in the same format as *get_Transaction_Details*_ API output.

Environment

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=get_Transaction_Details&var1=2020-10-20&var2=2020-10-27&hash=0545c11641bd91ed7ba2b5c937480b0f8737962ccc4959994f2aa950ca16212283e7c440a4251ffebd725e0c2c2c03701186eec82c8dd667e75dfbb3cba8e634"
Sample response
  • Success scenario
{
      "status": 1,
      "msg": "Transaction Fetched Successfully",
      "Transaction_details": [
            {
                  "id": "403993715521889443",
                  "action": "capture",
                  "status": "SUCCESS",
                  "issuing_bank": "HDFC",
                  "transaction_fee": "10.00",
                  "key": "JPM7Fg",
                  "merchantname": "demo",
                  "txnid": "02fdb4f0a0decd1e4937",
                  "firstname": "Ashish",
                  "lastname": "Kumar",
                  "addedon": "2020-10-26 13:54:52",
                  "bank_name": "Credit Card",
                  "payment_gateway": "AXISPG",
                  "phone": "9876543210",
                  "email": "[email protected]",
                  "amount": "10.00",
                  "discount": "0.00",
                  "additional_charges": "0.00",
                  "productinfo": "iPhone",
                  "error_code": "E000",
                  "bank_ref_no": "895255",
                  "ibibo_code": "CC",
                  "mode": "CC",
                  "ip": "106.202.49.52",
                  "card_no": "512345XXXXXX2346",
                  "cardtype": "domestic",
                  "offer_key": "",
                  "field2": "171519",
                  "udf1": "",
                  "pg_mid": null,
                  "offer_type": null,
                  "failure_reason": null,
                  "mer_service_fee": "0.00",
                  "mer_service_tax": "0.00"
            },
            {
                  "id": "403993715521889530",
                  "action": "capture",
                  "status": "SUCCESS",
                  "issuing_bank": "HDFC",
                  "transaction_fee": "10.00",
                  "key": "JPM7Fg",
                  "merchantname": "demo",
                  "txnid": "7fa6c4783a363b3da573",
                  "firstname": "K",
                  "lastname": "K",
                  "addedon": "2020-10-26 14:12:13",
                  "bank_name": "Credit Card",
                  "payment_gateway": "AXISPG",
                  "phone": "09599736876",
                  "email": "[email protected]",
                  "amount": "10.00",
                  "discount": "0.00",
                  "additional_charges": "0.00",
                  "productinfo": "Test",
                  "error_code": "E000",
                  "bank_ref_no": "721522",
                  "ibibo_code": "CC",
                  "mode": "CC",
                  "ip": "106.202.49.52",
                  "card_no": "512345XXXXXX2346",
                  "cardtype": "domestic",
                  "offer_key": "",
                  "field2": "177047",
                  "udf1": "",
                  "pg_mid": null,
                  "offer_type": null,
                  "failure_reason": null,
                  "mer_service_fee": "0.00",
                  "mer_service_tax": "0.00"
            }
      ]
}
  • Failure scenario

If transaction is not found, the response is similar to the following:

{
      "status": 1,
      "msg": "Transaction Fetched Successfully",
      "Transaction_details": []
}

If invalid date is posted, the response is similar to the following:

{
      "status": 0,
      "msg": "Invalid Date Entered. Date format should be yyyy-mm-dd"
}
Response parameters

For the details of fields in the JSON, refer to Additional Info for General APIs.

To learn more about the possible error codes and their description, refer to Error Codes.

Request parameters

Reference information for request parameters
ParameterReference
keyFor 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
hashHash logic for this API is:
sha512(key|command|var1|salt)
sha512

Sample values

Use the following sample values while trying out the API:

  • var1: 2020-10-20 16:00:00
  • var2: 2020-10-26 18:00:00
Language
Click Try It! to start a request and see the response here!