1. Home
  2. Docs
  3. Developers Guide
  4. Integration APIs
  5. Verify APIs
  6. check_payment

check_payment

This API gives you the status of the transaction similar to verify_payment API. The only difference is that the input parameter in this API (i.e. var1) is the PayUID (MihpayID) generated at PayU’s end whereas the input parameter in verify_payment API is the TxnID (Transaction ID generated at your end).

Request Parameters

ParameterDescriptionValue
keyMerchant key provided by PayU. Please refer to the first entry in the Post Parameters table for detailed description of this parameter JPTXg
command This parameter must have name of the web-service. check_payment
var1 In this parameter, you need to pass the Payu id (mihpayid) of the transaction 403993715521889530
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
c24ee06c7cf40314ede424
b1fcc2b97a12f97a7d3dd2
06876eef16660eb09fd374
fd82861f66d8152e72d1c9
e3ee37fc691d47d6a38750
2872b03c7338a50880

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= check_payment &var1= 403993715521889530 &hash= a63cb64b86afebfbbb4e586bd834ae1784f82d33533706b00d19dfcc2cc54a30379ccebd38c159259a3db3a8e636d4c9d5012d79bfafd91fe616686ef847bbd4 "

Response Parameters

a. If successfully fetched:

{
      "status": 1,
      "msg": "Transaction Fetched Successfully",
      "transaction_details": {
            "request_id": "131242054",
            "bank_ref_num": "721522",
            "net_amount": null,
            "mihpayid": 403993715521889540,
            "amt": "10.00",
            "disc": "0.00",
            "mode": "CC",
            "txnid": "7fa6c4783a363b3da573",
            "amount": "10.00",
            "amount_paid": "10.00",
            "discount": "0.00",
            "additional_charges": "0.00",
            "udf1": "",
            "udf2": "",
            "udf3": "",
            "udf4": "",
            "udf5": "",
            "field1": "721522",
            "field2": "177047",
            "field3": "2056",
            "field4": "0",
            "field5": "211939174867",
            "field6": "00",
            "field7": "AUTHPOSITIVE",
            "field8": "Approved or completed successfully",
            "field9": "No Error",
            "addedon": "2020-10-26 14:12:13",
            "status": "success",
            "net_amount_debit": 10,
            "unmappedstatus": "captured",
            "firstname": "K",
            "bankcode": "CC",
            "productinfo": "Test",
            "name_on_card": "Test",
            "card_no": "512345XXXXXX2346",
            "PG_TYPE": "AXISPG",
            "Merchant_UTR": null,
            "Settled_At": null
      }
}

b. If mihpayid is missing:

{
      "status": 0,
      "msg": "Invalid Merchant Key"
}