PayU Hosted Checkout with Pre-Authorize Payment

The pre_authorize parameter is used to pre-authorize payments using the PayU Hosted Checkout integration.

👍

Experience the end-to-end PayU Hosted Checkout flow and instantly generate the complete code for seamless, zero-coding integration into your website.


Postman Collection

Accelerate your integration workflow with our Postman collection for PayU Hosted Checkout. Click the Download Postman Collection button below to download and get started.



Sample request
curl -X POST "https://test.payu.in/_payment
-H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d
"key=JP***g&txnid=PQI6MqpYrjEefU&amount=10.00
&firstname=PayU User&[email protected]&phone=9876543210
&productinfo=iPhone&pre_authorize=1&pg=cc&bankcode=CC&surl=
https://apiplayground-response.herokuapp.com/
&furl=https://apiplayground-response.herokuapp.com/
&pre_authorize=1&hash=05a397501918ec5c36ae52daa3b3e49b43e986b86940e109d060076e467c3ea7536617df7420e0e6863dced8c5b45f9fff15c13bdf0335512c05f0210b31b072"
Sample response

By default, the response in HTML format. The formatted sample response body is similar to the following, and you need to look for the following parameters:

  • PG_TYPE: CC PG
  • bankcode: CC
  • unamappedstatus: auth
mihpayid: 403993715523615328
mode: CC
status: success
unmappedstatus: auth
key: JPM7Fg
txnid: 50QJq6lBJBmx14
amount: 10.00
cardCategory: domestic
discount: 0.00
net_amount_debit: 10
addedon: 2021-07-28 15:11:37
productinfo: iPhone
firstname: PayU User
lastname: 
address1: 
address2: 
city: 
state: 
country: 
zipcode: 
email: [email protected]
phone: 9876543210
udf1: 
udf2: 
udf3: 
udf4: 
udf5: 
udf6: 
udf7: 
udf8: 
udf9: 
udf10: 
hash: afeab9dcf4e43d47f8fbf5a6838d393c70694a58e30ada08e6cb86ac943236c05717c5f5e4872d671fe81d0d9b2d9facd44e9a061ba621aff6f20c4343ea5dfa
field1: 
field2: 
field3: 
field4: 
field5: 
field6: 
field7: 
field8: 
field9: Transaction Completed Successfully
payment_source: payu
PG_TYPE: CC-PG
bank_ref_num: 7f0d5ada-59bb-41d7-9e41-20a6af2406c9
bankcode: CC
error: E000
error_Message: No Error
name_on_card: test
cardnum: 411111XXXXXX1111
cardhash: This field is no longer supported in postback params.

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:
hashHash logic for this API is:
sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||SALT)
📘

Reference:


Form Data
const
enum
required

This parameter must contain the merchant key that was provided by PayU while onboarding.

Allowed:
string
required

The transaction ID is a reference number for a specific order that is generated by the merchant. It is used to track the order and must be unique. PayU's system will not accept duplicate transaction IDs.

integer
required

This field should contain the payment amount for the transaction.

string
required

This field should be a string containing a brief description of the product.

string
required

The first name of the customer.

string
required

The email address of the customer.

number
required

The phone number of the customer.

const
enum
required

This field must contain value as 1 to pre-authorize payments.

Allowed:
const
enum
required

The "surl" field is the success URL, which is the page PayU will redirect to if the transaction is successful. The merchant can handle the response at this URL after the customer is redirected there.

Allowed:
const
enum
required

The "furl" field is the Failure URL, which is the page PayU will redirect to if the transaction is failed. The merchant can handle the response at this URL after the customer is redirected there.

Allowed:
string
required

This parameter must contain the hash value to be calculated at merchant end.

const
enum
required

This parameter must contain the hash value to be calculated at merchant end.

Allowed:
string

Last name of the customer (must only contains alphabets).

string

The "curl" field is the Cancel URL, which is the page PayU will redirect to if the transaction is canceled by the customer. The merchant can handle the response at this URL after the customer is redirected there.

string

User-defined fields (udf) are used to store any information corresponding to a particular transaction. You can use up to five udfs in the post designated as udf1, udf2, udf3, udf4, udf5.

string

User-defined fields (udf) are used to store any information corresponding to a particular transaction. You can use up to five udfs in the post designated as udf1, udf2, udf3, udf4, udf5.

string

User-defined fields (udf) are used to store any information corresponding to a particular transaction. You can use up to five udfs in the post designated as udf1, udf2, udf3, udf4, udf5.

string
string

User-defined fields (udf) are used to store any information corresponding to a particular transaction. You can use up to five udfs in the post designated as udf1, udf2, udf3, udf4, udf5.

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain