1. Home
  2. Docs
  3. Developers Guide
  4. Integration APIs
  5. Transaction Details APIs

Transaction Details APIs

Transaction details API is used to extract the transaction details between two given time periods.

Transactions Details can be fetched in two ways:

  1. get_Transaction_Details: basis input as two dates (initial and final), between which the transaction details are needed. The output would consist of the status of the API (success or failed) and all the transaction details in an array format
  2. get_transaction_info: API can take input as the exact time in terms of minutes and seconds also. Output would be in the same format as get_Transaction_Details API output

get_Transaction_Details

API Endpoint: POST https://test.payu.in/merchant/postservice?form=2

Request Parameters

ParameterDescriptionValue
keyMerchant key provided by PayU. Please refer to the first entry in the Post Parameters table for a detailed description of this parameter JPTXg
command This parameter must have the name of the web-service. get_Transaction_Details
var1 Starting Date (From when the transaction details are needed) in yyyy-mm-dd format 2020-10-20
var2  End Date (Till when the transaction details are needed) in yyyy-mm-dd format 2020-10-27
hashThis parameter must contain the hash value to be calculated at your end. The string used for calculating the hash is mentioned below:
sha512(key|command|var1|salt)
sha512 is the encryption method used here
2a04a44ed058ca724a
17b4e4d4639aa15254a
343e0

Request body

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"

Response Format

a. If successfully fetched

{
      "status": 1,
      "msg": "Transaction Fetched Successfully",
      "Transaction_details": [
            {
                  "id": "403993715521889443",
                  "status": "captured",
                  "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": "ashish25@mailinator.com",
                  "transaction_fee": "10.00",
                  "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": "403993715521889519",
                  "status": "failed",
                  "key": "JPM7Fg",
                  "merchantname": "demo",
                  "txnid": "4c5355da12224188d0ff",
                  "firstname": "K",
                  "lastname": "K",
                  "addedon": "2020-10-26 14:10:02",
                  "bank_name": "Credit Card",
                  "payment_gateway": "AXISPG",
                  "phone": "09599736876",
                  "email": "ashish.25cca@gmail.com",
                  "transaction_fee": "10.00",
                  "amount": "10.00",
                  "discount": "0.00",
                  "additional_charges": "0.00",
                  "productinfo": "i Phone",
                  "error_code": null,
                  "bank_ref_no": "372218",
                  "ibibo_code": "CC",
                  "mode": "CC",
                  "ip": "106.202.49.52",
                  "card_no": "512345XXXXXX2346",
                  "cardtype": "domestic",
                  "offer_key": "",
                  "field2": "603129",
                  "udf1": "",
                  "pg_mid": null,
                  "offer_type": null,
                  "failure_reason": null,
                  "mer_service_fee": null,
                  "mer_service_tax": null
            },
            {
                  "id": "403993715521891555",
                  "status": "captured",
                  "key": "JPM7Fg",
                  "merchantname": "demo",
                  "txnid": "e3bb0408ef94af722de5",
                  "firstname": "Ashish",
                  "lastname": "Kumar",
                  "addedon": "2020-10-26 20:59:41",
                  "bank_name": "Credit Card",
                  "payment_gateway": "AXISPG",
                  "phone": "0987654321",
                  "email": "ashish.kumar@payu.in",
                  "transaction_fee": "10.00",
                  "amount": "10.00",
                  "discount": "0.00",
                  "additional_charges": "0.00",
                  "productinfo": "iPhone",
                  "error_code": "E000",
                  "bank_ref_no": "734154",
                  "ibibo_code": "CC",
                  "mode": "CC",
                  "ip": "106.202.39.89",
                  "card_no": "512345XXXXXX2346",
                  "cardtype": "domestic",
                  "offer_key": "",
                  "field2": "157887",
                  "udf1": "",
                  "pg_mid": null,
                  "offer_type": null,
                  "failure_reason": null,
                  "mer_service_fee": "0.00",
                  "mer_service_tax": "0.00"
            }
      ]
}

b. No transaction

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

c. Invalid date

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

get_transaction_info

API Endpoint: POST https://test.payu.in/merchant/postservice?form=2

Request Parameters

ParameterDescriptionValue
keyMerchant key provided by PayU. Please refer to the first entry in the Post Parameters table for a detailed description of this parameter JPTXg
command This parameter must have the name of the web-service. get_transaction_info
var1 Starting Time (From when the transaction details are needed) in yyyy-mm-dd hh:mm:ss format 2014-01-12 16:00:00
var2  End Time (Till when the transaction details are needed) in yyyy-mm-dd hh:mm:ss format 2014-01-12 16:15:00
hashThis parameter must contain the hash value to be calculated at your end. The string used for calculating the hash is mentioned below:
sha512(key|command|var1|salt)
sha512 is the encryption method used here
2a04a44ed058ca724a
17b4e4d4639aa15254a
343e0

Request body

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"

Response Body

a. If successfully fetched

{
      "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": "ashish25@mailinator.com",
                  "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": "ashish.25cca@gmail.com",
                  "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"
            }
      ]
}

b. No transaction

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

c. Invalid date

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