The Load and Pay Transaction API is designed to handle wallet transactions where the wallet balance is insufficient. It enables users to first load money into their wallet and then directly proceed with the payment (debiting the wallet) in a single streamlined transaction.
Environment URL Test https://test.payu.in/_paymentProduction https://secure.payu.in/_payment
HTTP Method : POST
Parameter Description Content-Typemandatory String application/x-www-form-urlencoded
Parameter
Description
Example
keymandatory
String Merchant key provided by PayU during onboarding
KOEfPI
txnidmandatory
Alphanumeric Unique transaction ID generated for each load and pay transaction
ram1234
amountmandatory
Numeric Transaction amount in implied decimals (₹41.00 → 4100)
4100
productinfomandatory
String Description and details about the product being purchased
eCommerce
firstnamemandatory
String Customer's first name
John
lastnameoptional
String Customer's last name
Doe
emailmandatory
String Email ID associated with the customer wallet/account
[email protected]
phonemandatory
Numeric Customer's phone number with country code
919988776655
surlmandatory
String Success URL where customer will be redirected upon successful transaction
https://merchant.com/success
furlmandatory
String Failure URL where customer will be redirected upon failed transaction
https://merchant.com/failure
pgmandatory
String Constant parameter indicating the payment gateway (CLW)
CLW
bankcodemandatory
String Bank code indicating the payment option used for the transaction
PAY
customer_idconditional
Numeric Unique wallet/customer ID for wallet integration
70000000008
walleturnconditional
Numeric URN (Unique Reference Number) for wallet transactions
123456789
loadmoneymandatory
Numeric Amount to be loaded into the wallet if existing balance is insufficient
1000
txn_s2s_flowmandatory
Numeric Identifies the merchant-hosted transaction flow (constant value 4)
4
hashmandatory
String SHA512 hash for securing the API request. For more information, refer to Hash Calculation
84bbbf...f5c9
📘 Note : Either customer_id or walleturn must be provided to identify the wallet.
The hash is calculated using SHA512 with the following string:
key|txnid|amount|productinfo|firstname|email|||||||||||||{salt}
Bash
curl --location --request POST 'https://test.payu.in/_payment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=KOEfPI' \
--data-urlencode 'txnid=ram1234' \
--data-urlencode 'amount=41.00' \
--data-urlencode 'productinfo=eCommerce' \
--data-urlencode 'firstname=John' \
--data-urlencode 'lastname=Doe' \
--data-urlencode '[email protected] ' \
--data-urlencode 'phone=919988776655' \
--data-urlencode 'surl=https://merchant.com/success' \
--data-urlencode 'furl=https://merchant.com/failure' \
--data-urlencode 'pg=CLW' \
--data-urlencode 'bankcode=PAY' \
--data-urlencode 'walleturn=123456789' \
--data-urlencode 'loadmoney=1000' \
--data-urlencode 'txn_s2s_flow=4' \
--data-urlencode 'hash=84bbbf...f5c9'
JSON
{
"mihpayid": "1735903830180094",
"status": "success",
"key": "KOEfPI",
"txnid": "ram1234",
"amount": "41.00",
"addedon": "2025-01-13 18:24:06",
"net_amount_debit": "40.00",
"hash": "6e640b16...2b2a",
"bank_ref_num": "1099",
"PG_TYPE": "CLW-PG",
"error": "E000",
"error_message": "No Error",
"firstname": "John",
"lastname": "Doe",
"email": "[email protected] ",
"phone": "919988776655"
}
JSON
{
"mihpayid": "1735903830180095",
"status": "failure",
"key": "KOEfPI",
"txnid": "ram1235",
"amount": "41.00",
"error": "E001",
"error_message": "Payment gateway error",
"hash": "xyz789abc123..."
}
Parameter Description Example mihpayid Unique PayU-generated transaction reference number 1735903830180094 status Transaction final status (success, failure, pending) success key Merchant key (echoed back) KOEfPI txnid Transaction ID (echoed back) ram1234 amount Transaction amount debited from the wallet 41.00 addedon Time and date when the transaction was completed 2025-01-13 18:24:06 net_amount_debit Final successfully paid amount after processing fees 40.00 hash Response hash generated by PayU for verification 6e640b16...2b2a bank_ref_num Unique reference number generated by the bank 1099 PG_TYPE Payment gateway used for the transaction CLW-PG error Error code if the transaction fails E000 error_message Detailed error description No Error firstname Customer's first name John lastname Customer's last name Doe email Customer's email [email protected] phone Customer's phone number 919988776655
Status Code Description 200 OK - Request processed successfully 400 Bad Request - Invalid request parameters 401 Unauthorized - Authentication failed 500 Internal Server Error
Error Description Solution Payment gateway failure PG load transaction failed Retry with different payment method Insufficient load amount loadmoney less than requiredIncrease load amount Invalid wallet Customer ID or wallet URN not found Verify wallet details Transaction limit exceeded Amount exceeds allowed limits Check transaction limits Hash mismatch Invalid hash in request Verify hash calculation