post
https://test.payu.in/payment
PayU’s _payment API supports LRS transactions using lrs_service_type parameter.
Sample Request
curl --location 'https://test.payu.in/_payment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=PRiQvJ' \
--data-urlencode 'txnid=my_order_64240' \
--data-urlencode 'amount=5' \
--data-urlencode 'productinfo=Product Information' \
--data-urlencode '[email protected]' \
--data-urlencode 'phone=8688359250' \
--data-urlencode 'firstname=John' \
--data-urlencode 'lastname=Doe' \
--data-urlencode 'address1=34 Saikripa Estate' \
--data-urlencode 'city=Mumbai' \
--data-urlencode 'state=Maharashtra' \
--data-urlencode 'country=India' \
--data-urlencode 'zipcode=400009' \
--data-urlencode 'surl=https://example.com/success' \
--data-urlencode 'furl=https://example.com/failure' \
--data-urlencode 'buyer_type_business=travel' \
--data-urlencode 'udf1=AELPR1234EX' \
--data-urlencode 'udf3=12-05-1985' \
--data-urlencode 'udf4=XYZ Pvt. Ltd.' \
--data-urlencode 'udf5=INV123456' \
--data-urlencode 'lrs_service_type=travel' \
--data-urlencode 'hash=sdfdsafadsfkjsdhfkjsfsdfdfdffdsfsadfsdfdsfdsafdsfasefasdfdsafdfdsfgdsfdshfksdf' Sample Response
Success Response
{
"mihpayid": "403993715524069222",
"status": "success",
"unmappedstatus": "captured",
"key": "PRiQvJ",
"txnid": "my_order_64240",
"amount": "5.00",
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"productinfo": "Product Information",
"cardCategory": "domestic",
"payment_source": "payu",
"PG_TYPE": "CC-PG",
"bank_ref_num": "0608273386032718000015",
"hash": "ad18e8fa57e5b5423bb9fbba93e64b83f04b05b9065351ecf43f83073afb4994"
}Failure Response
{
"mihpayid": "20869277619",
"status": "failure",
"unmappedstatus": "failed",
"key": "PRiQvJ",
"txnid": "my_order_64240",
"amount": "5.00",
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]",
"productinfo": "Product Information",
"error": "E1903",
"error_Message": "Authorization failed at Bank",
"payment_source": "payu",
"PG_TYPE": "CC-PG",
"bank_ref_num": null,
"hash": "de66b49826ae6835bfc1d7117fff896f99a03e0023be8b64734e7a7df29e1d18"
}Response Parameters
| Parameter | Description |
|---|---|
mihpayid | Unique Payment ID generated by PayU |
status | Status of the transaction: success, failure, pending |
unmappedstatus | Detailed status of the transaction (e.g., captured, failed) |
key | Merchant key used in the request |
txnid | Unique transaction ID provided in the request |
amount | Amount paid by the user |
firstname | Customer's first name as captured in the request |
lastname | Customer's last name as captured in the request |
email | Customer's email address |
productinfo | Product information as provided in the request |
cardCategory | Category of the card used (e.g., domestic, international) |
payment_source | Source of payment (e.g., PayU) |
PG_TYPE | Payment Gateway type (e.g., CC-PG for credit card, DC-PG for debit card) |
bank_ref_num | Reference number returned by the bank |
hash | Hash returned by PayU for verifying the response |
error | Error code if the transaction fails (optional, only present in failure cases) |
error_Message | Description corresponding to the error code (optional, only present in failure cases) |
Important Notes
- The response hash should be verified using the same algorithm used for request hash generation
- In case of failure, additional error parameters (
erroranderror_Message) are included - The
bank_ref_nummay be null in case of transaction failures - Status values can be
success,failure, orpending
