PayU Hosted Checkout Integration
The following diagram depicts the steps involved in the end-to-end integration process of International payments.
Note: You need to contact your PayU Key Account Manager to enable Dynamic Currency Conversion.
Reference: For the list of supported currencies, Supported Currencies for International Payments.
Before you begin:Register for a account with PayU before you start integration. For more information, refer to Register for a Merchant Account.

Steps to Integrate:
Step 1: Make the transaction request to PayU and check the response
With the POST REQUEST, the customer will be redirected to the PayU's payment page. The customer now selects the credit card payment option on PayU's page and clicks the Pay Now button. PayU redirects the customer to the chosen payment method. The customer enters an international credit card number, and PayU displays the conversion. For the description of the request and response parameters, refer to Response Parameters section of Collect Payment API - PayU Hosted Checkout.
PayU marks the transaction status based on the response received from the bank. PayU provides the final transaction response string to the merchant through a POST RESPONSE. The parameters in this response are covered in the subsequent sections.
Reference: For a list of card details for testing dynamic currency conversion, refer to Test Cards, UPI ID and Wallets.
Notes:
- For DCC eligible transactions, no changes are required in the existing integration of Query transactions or Refund transactions. In case of refunds, the merchant can initiate refunds in INR (original amount and currency) only. PayU will internally convert the same into the final amount and currency charged to the consumer using the FX rate, which was applied on the date of sale.
- There is no change required in handling the response from PayU as the response parameters are similar to the regular transaction
- It is recommended to collect the customer's e-mail address, phone, address, city, state, and country and then post those details along with the payment request with PayU. This will help in checking the risk of the transaction based on these data.
Request parameters
Parameter | Description | Example |
---|---|---|
key mandatory |
String Merchant key provided by PayU during onboarding. |
JP***g |
txnid mandatory |
String The transaction ID is a reference number for a specific order that is generated by the merchant. |
PQI6MqpYrjEefU |
amount mandatory |
String The payment amount for the transaction. |
10.00 |
productinfo mandatory |
String A brief description of the product. |
iPhone |
firstname mandatory |
String The first name of the customer. |
PayU User |
email mandatory |
String The email address of the customer. |
[email protected] |
phone mandatory |
String The phone number of the customer. |
9876543210 |
surl mandatory |
String The success URL, which is the page PayU will redirect to if the transaction is successful. |
https://apiplayground-response.herokuapp.com/ |
furl mandatory |
String The failure URL, which is the page PayU will redirect to if the transaction is failed. |
https://apiplayground-response.herokuapp.com |
hash mandatory |
String It is the hash calculated by the merchant. The hash calculation logic is:sha512(key|txnid|amount|productinfo| |
05a397501918ec5c36ae52 daa3b3e49b43e986b86940e10 9d060076e467c3ea7536617df742 0e0e6863dced8c5b45f9ff f15c13bdf0335512c05f0210b31b072 |
address1 optional |
String The first line of the billing address.For Fraud Detection: This information is helpful when it comes to issues related to fraud detection and chargebacks. Hence, it is must to provide the correct information. |
123 Main Street |
address2 optional |
String The second line of the billing address. |
Apt 4B |
city optional |
String The city where your customer resides as part of the billing address. |
New Delhi |
state optional |
String The state where your customer resides as part of the billing address. |
Delhi |
country optional |
String The country where your customer resides. |
India |
zipcode optional |
String Billing address zip code is mandatory for the cardless EMI option.Character Limit : 20 |
110001 |
udf1 optional |
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. |
Custom Data 1 |
udf2 optional |
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. |
Custom Data 2 |
udf3 optional |
String User-defined fields (udf) are used to store any information corresponding to a particular transaction. |
Custom Data 3 |
udf4 optional |
String User-defined fields (udf) are used to store any information corresponding to a particular transaction. |
Custom Data 4 |
udf5 optional |
String User-defined fields (udf) are used to store any information corresponding to a particular transaction. |
Custom Data 5 |
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&surl=
https://apiplayground-response.herokuapp.com/
&furl=https://apiplayground-response.herokuapp.com
&hash=05a397501918ec5c36ae52daa3b3e49b43e986b86940e109d060076e467c3ea7536617df7420e0e6863dced8c5b45f9fff15c13bdf0335512c05f0210b31b072"
Sample response
Array
(
[mihpayid] => 403993715527769337
[mode] => CC
[status] => success
[unmappedstatus] => captured
[key] => smsplus
[txnid] => 86e836b84be8dc6f7894
[amount] => 10.00
[cardCategory] => domestic
[discount] => 0.00
[net_amount_debit] => 10
[addedon] => 2022-11-25 11:30:36
[productinfo] => Product Info
[firstname] => Payu-Admin
[lastname] =>
[address1] =>
[address2] =>
[city] =>
[state] =>
[country] =>
[zipcode] =>
[email] => [email protected]
[phone] => 1234567890
[udf1] =>
[udf2] =>
[udf3] =>
[udf4] =>
[udf5] =>
[udf6] =>
[udf7] =>
[udf8] =>
[udf9] =>
[udf10] =>
[hash] => df565fdcbdd0172c42bf1ba1429c3f48e7215933574f932f37bb133ec4ac89d93535a1bf7674ec4514ffd238ec36e39524142b8d2415554ac7ced49707ea6940
[field1] =>
[field2] =>
[field3] =>
[field4] =>
[field5] =>
[field6] =>
[field7] =>
[field8] =>
[field9] => Transaction Completed Successfully
[payment_source] => payu
[PG_TYPE] => CC-PG
[bank_ref_num] => e0e4a0ca-e356-412a-8f3a-9d69cede5a04
[bankcode] => MASTCC
[error] => E000
[error_Message] => No Error
[success_at] => 2022-11-25 11:33:41
[cardnum] => XXXXXXXXXXXX1287
[cardhash] => This field is no longer supported in postback params.
)
Step 2: Verify the payment
Upon receiving the response, we recommend performing a reconciliation step to validate all transaction details.
You can verify your payments using either of the following methods:
Configure the webhooks to monitor the status of payments.
Webhooks enable a server to communicate with another server by sending an HTTP callback or message.
These callbacks are triggered by specific events or instances and operate at the server-to-server (S2S) level.
👉 For more details, refer to Webhooks for Payments.
Updated 6 days ago