Subscription TPV Integration
PayU Hosted Checkout integration for TPV (Third Party Verification) Payment Mode supports both Net Banking (NB) and Unified Payment Interface (UPI) payment methods for subscription-based or autopay payments.
Customer journey
The customer journey involves three key steps:
- Checkout Initiation: Customer begins the payment process on the merchant's checkout page

- PayU Redirect: Customer is redirected to PayU's hosted checkout page for payment completion

- Payment Processing: Customer completes the payment using their preferred payment method (Net Banking or UPI)

Environment
Environment | URL |
---|---|
Test | https://test.payu.in/_payment |
Production | https://secure.payu.in/_payment |
Step 1: Create Transaction with Beneficiary and SI Details
Create a transaction request with the required beneficiary details and Standing Instruction (SI) parameters for autopay functionality.
Step 2: Post Transaction Parameters
Submit the transaction parameters to PayU's payment gateway using the appropriate environment URL.
Request parameters
Parameter | Description | Example |
---|---|---|
keymandatory |
String - Merchant key provided by PayU during onboarding | "JPg***r" |
txnidmandatory |
String - Unique transaction ID for each order | "ypl938459435" |
amountmandatory |
String - Transaction amount | "100" |
productinfomandatory |
String - Product description | "Test Product" |
firstnamemandatory |
String - Customer's first name | "John" |
emailmandatory |
String - Customer's email address | "[email protected]" |
phonemandatory |
String - Customer's phone number | "9999999999" |
beneficiarydetailmandatory |
JSON Object - Account numbers and associated details for verification | See structure below |
si_detailsmandatory |
JSON Object - Standing instruction details for autopay | See structure below |
free_trialoptional |
String - Parameter to setup free trial periods | "1" |
surlmandatory |
String - Success URL for transaction response | "https://www.yoursurl.com" |
furlmandatory |
String - Failure URL for transaction response | "https://www.yourfailureurl.com" |
hashmandatory |
String - SHA512 Hash for securing the transaction request. For more information, refer to | Generated using hash formula |
Hash calculation
If UDF parameters are defined in the hash calculation, the same UDF fields must be included in the request sent to PayU.
sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5| |||||beneficiarydetail|SALT)
WithOut UDF Parameters.
sha512(key|txnid|amount|productinfo|firstname|email|||||||||||beneficiarydetail|SAL T)
Replace SALT with the salt value provided during onboarding.
Beneficiary Detail JSON Structure
{"beneficiaryName": "Sachin Tendulkar|Nitin Jaisingh|Somya|Nikita","beneficiaryAccountNumber": "1211450021|002001600674|1234673939|87669286932","beneficiaryAccountType": "SAVINGS|SAVINGS|CURRENT|CURRENT","beneficiaryIfscCode": "ICIC0000046|HDFC0000726|ICIC0000046|SBIN0098292","verificationMode": "DEBIT_CARD|NET_BANKING| |AADHAR"}
Field | Description | Example |
---|---|---|
beneficiaryName | String List of Beneficiary name separated by pipe symbol (|). Maximum 4 names. |
"Sachin Tendulkar|Nitin Jaisingh| Somya|Nikita" |
beneficiaryAccountNumber | String List of account numbers separated by pipe symbol (|). Maximum 4 accounts. |
"002001600674| 00000031957292212| 00000035955239352| 00000035955239352" |
beneficiaryAccountType | String List of corresponding account type separated by pipe symbol (|). Maximum 4 types in the same order as account numbers. | "SAVINGS|SAVINGS| CURRENT|CURRENT" |
ifscCode | String List of corresponding IFSC codes separated by pipe symbol (|). Maximum 4 IFSC codes in the same order as account numbers. | "ICIC0000046| HDFC0000726| ICIC0000046| SBIN0098292" |
verificationMode | String List of verification mode separated by pipe symbol (|). Maximum 4 modes in the same order as account numbers. | "DEBIT_CARD|NET_BANKING | |AADHAR" |
Standing Instruction (SI) Details JSON Structure
{
"billingAmount": "100.00",
"billingCurrency": "INR",
"billingCycle": "monthly",
"paymentStartDate": "2024-01-15",
"paymentEndDate": "2025-01-15",
"billingInterval": "1"
}
Sample request
curl --location 'https://test.payu.in/_payment' \
--data 'key=JPg***r&txnid=ypl938459435&amount=100&productinfo=Test Product&firstname=John&[email protected]&phone=9999999999&beneficiarydetail={"beneficiaryName":"John Doe","beneficiaryAccountNumber":"002001600674","ifscCode":"KTKB0000046"}&si_details={"billingAmount":"100.00","billingCurrency":"INR","billingCycle":"monthly"}&surl=https://www.yoursurl.com&furl=https://www.yourfailureurl.com&hash=generated_hash_value'
Step 3: Handle and Validate Response
Process the response from PayU and perform reverse hash validation to ensure transaction authenticity.
Response Hash Validation (Reverse Hash):The
beneficiarydetail
parameter is excluded during reverse hash calculation:With UDFs:
sha512(SALT|status||||||udf5|udf4|udf3|udf2|udf1|email|firstname|productinfo|amount|txnid|key)
Without UDFs:
sha512(SALT|status|||||||||||email|firstname|productinfo|amount|txnid|key)
Response parameters
Parameter | Description | Example |
---|---|---|
mihpayid | Unique reference number created for the transaction on PayU's system | "99995401486671" |
merchantid | Merchant's unique ID | "12345" |
txnid | Transaction ID provided in the request | "ypl938459435" |
status | Status of the transaction | "success" , "failure" , "pending" |
amount | Transaction amount post adjustments | "100.00" |
bankcode | Bank code used in the transaction | "SBITPV" , "UPITPV" |
error | Error code indicating issues with the transaction | "E000" |
error_Message | Description of any errors | "Transaction failed" |
payment_source | Indicates the payment source | "payu" |
hash | Hash provided in the response for validation | Generated hash string |
Net Banking transaction
Array(
[mihpayid] => 99995401486671
[status] => success
[key] => travelibibo
[txnid] => 4245248agh5519827ec
[amount] => 100.00
[bankcode] => SBITPV
[hash] => e9272f99eace9f6e0a52c871cc0226ac...
[payment_source] => payu
)
UPI transaction
Array(
[mihpayid] => 99995401486672
[status] => success
[key] => merchant_key
[txnid] => upi_txn_12345
[amount] => 100.00
[bankcode] => UPITPV
[hash] => d8374b99face8e6e0b53d981dd0337bd...
[payment_source] => payu
)
Sample webhook response
Net Banking webhook:
mihpayid=99995401486671&mode=NB&status=success&key=merchant_key&txnid=4245248agh5519827ec&amount=100.00&hash=validation_hash
UPI webhook:
amount=100.00&PG_TYPE=UPI-COLLECT&payment_source=payu&bankcode=UPITPV&mihpayid=99995401486672&status=success&hash=validation_hash
Updated about 10 hours ago