PayPal Integration
Integrate PayU with PayPal wallets to facilitate international payments. PayPal can be seamlessly integrated with your PayU Hosted or Merchant Hosted Checkout integration. Customers have the option to utilize PayPal Currency Conversion to convert international payments from INR (or other currencies) to their chosen currency. This ensures businesses can continue accepting payments via PayPal. Payments made through PayPal are directly transferred to your PayPal wallet, with settlements processed in INR.
You can accept payments within the transaction limits of your PayU account. Discover more about alternative payment methods and their respective transaction limits. This section describes the following:
Customer journey
- Customer is redirected to PayU Payment page.
- Customer selects the Wallets option.

- Customer selects the Paypal option.

-
Customer selects the preferred currency and clicks PayPal.
The success or failure response is sent back to you by PayU after vaerfication.
Benefits
Incorporating PayU into your Checkout system offers several benefits:
- Improved Success Rates: Experience success rates up to 20% higher.
- Accelerated Settlement: Receive payments on a T+1 settlement schedule.
- Extensive User Base: Access over 30 Crore PayPal users worldwide.
- No Extra Charges: Transaction rates are determined by PayPal.
- Currency Conversion: Facilitate currency conversions from INR to your customers' preferred currencies.
Steps to Integrate
1. Initiate the Payment to PayU
Initiate the payment to PayU with pg=PAYPAL and bankcode=PAYPAL
2. Check response from PayU
Check the response from PayU
3. Verify the payment
Verify the payment using verify_payment and monitor using webhooks
Step 1: Initiate the payment to PayU
You need use bankcode as PAYPAL with the pg as PAYPAL.
Reference: For the Try It experience ), refer to Collect Payments API under API Reference.
Request parameters
Test Environment | https://test.payu.in/_payment |
Production Environment | https://secure.payu.in/_payment |
Parameter | Description | Example |
---|---|---|
key mandatory | String - This parameter is the unique merchant key provided by PayU for your merchant account. For more information, refer to Generate Merchant Key and Salt. | 8488225 |
txnid mandatory | varchar - This parameter is known as Transaction ID (or OrderID). It is the order reference number generated at your (Merchant's) end. It is an identifier which you(merchant) would use to track a particular order. If a transaction using a particular transaction ID has already been successful at PayU, the usage of same Transaction ID again would fail. Hence, it is essential that you post us a unique transaction ID for every new transaction. | fd3e847h2 |
amount mandatory | float - This parameter should contain the payment amount of the particular transaction. Note: Type-cast the amount to float type | 10 |
productinfo mandatory | varchar - This parameter should contain a brief product description. It should be a string describing the product (The description type is entirely your choice). | T-shirt |
firstname mandatory | varchar - This parameter must contain the first name of the customer. | Ankit |
email mandatory | varchar - This parameter must contain the email of the customer | [email protected] |
phone mandatory | integer - Merchant needs to take the customer's GPay registered phone number and pass in this field. This field will be used for further mapping the customer VPA and initiate a collect request. | 9876543210 |
pg mandatory | string - It defines the payment category using the Merchant Hosted Checkout integration. For a Wallet payment, "PAYPAL" must be specified in the pg parameter. | PAYPAL |
bankcode mandatory | string - The merchant must post PAYPAL as the value for this parameter. | PAYPAL |
surl mandatory | 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. | https://apiplayground-response.herokuapp.com/ |
furl mandatory | 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. | https://apiplayground-response.herokuapp.com/ |
hash mandatory | string - The hash calculated by the merchant using the key and salt provided by PayU. The format for calculating the hash: sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|||||SALT) For more information, refer to Generate Hash. | calculated_hash_value |
lastname optional | string - The last name of the customer. | Kumar |
address1 optional | string - The first line of the billing address. | 123 Main St |
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. | Mumbai |
state optional | string - The state where your customer resides as part of the billing address. | Maharashtra |
country optional | string - The country where your customer resides. | India |
zipcode optional | string - Billing address zip code is mandatory for the cardless EMI option. | 400001 |
udf1 optional | string - This parameter has been made for you to keep any information corresponding to the transaction. | custom_data_1 |
udf2 optional | string - This parameter has been made for you to keep any information corresponding to the transaction. | custom_data_2 |
udf3 optional | string - This parameter has been made for you to keep any information corresponding to the transaction. | custom_data_3 |
udf4 optional | string - This parameter has been made for you to keep any information corresponding to the transaction. | custom_data_4 |
udf5 optional | string - This parameter has been made for you to keep any information corresponding to the 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=J****g&txnid=aI1UM19ONxLgPz&amount=10.00&firstname=Ashish&[email protected]&phone=9876543210&productinfo=iPhone&pg=PAYPAL&bankcode=PAYPAL&surl=
https://apiplayground-response.herokuapp.com/&furl=https://apiplayground-response.herokuapp.com/&hash=6840ba0d1a14554f7ee5d20966dfbac6b221718e72dd823f05b6da01420286315b4956c28325898b66520b111604020ea2c547608606674766eb7e4164dc0baa"
Note:Ensure your PayPal account maintains sufficient funds before initiating a refund. Refunds can be initiated either through the PayU Dashboard or the Refund Transasction API. Refunded amounts are deducted from your PayPal account and credited to your customer's PayPal account. For more information, refer to:
Step 2: Check the response from PayU
Sample response
You must look for the following:
- PG_TYPE: PAYPAL-PG
- bankcode: PAYPAL
- field4: Amount collected in the foreign currency
- field5: Foreign currency used
- net_amount_debit: Amount debited in INR
Array
(
[mihpayid] => 403993715527518775
[mode] => PAYPAL
[status] => success
[unmappedstatus] => captured
[key] => J*****g
[txnid] => HC13glcAkssIkl
[amount] => 10.00
[discount] => 0.00
[net_amount_debit] => 10
[addedon] => 2022-10-21 17:45:24
[productinfo] => iPhone
[firstname] => Ashish
[lastname] =>
[address1] =>
[address2] =>
[city] =>
[state] =>
[country] => US
[zipcode] =>
[email] => [email protected]
[phone] => 9876543210
[udf1] =>
[udf2] =>
[udf3] =>
[udf4] =>
[udf5] =>
[udf6] =>
[udf7] =>
[udf8] =>
[udf9] =>
[udf10] =>
[hash] => 007435a716982c7f5eec5cff95701f65eb1bdbff8f852e461224e3b5e17126ad26bb3a3ffdb95cded6a87d3515fe86fc58925cad024595a4a6825adfed2dc436
[field1] =>
[field2] =>
[field3] => MCP8405944934679133147
[field4] => 0.12
[field5] => USD
[field6] =>
[field7] =>
[field8] =>
[field9] => Transaction Completed Successfully
[payment_source] => payu
[PG_TYPE] => PAYPAL-PG
[bank_ref_num] => 540898ed-72e7-40a8-a96e-f17de621cbb4
[bankcode] => PAYPAL
[error] => E000
[error_Message] => No Error
[splitInfo] => {"splitStatus":"splitNotReceived","splitSegments":[]}
)
Step 3: 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 3 days ago