Integrate Import with UPI Autopay for PayUBiz
UPI Autopay integration for Cross-Border Import involves the following steps:
- Post a Registration transaction (one-time only)
- Post a Recurring transaction (repeat transaction flow)
Post a Registration transaction (one-time)
The following parameters (mandatory) must be posted using the _payment API:
Request parameters
The following are the additional request parameter required for cross-border payments with all of the above integrations.
Environment
Test Environment | https://test.payu.in/_payment |
Production Environment | https://secure.payu.in/_payment |
Parameter | Description | Example |
---|---|---|
key mandatory | String Merchant key provided by PayU during onboarding. | JPg****f |
txnid mandatory | String The transaction ID is a reference number for a specific order that is generated by the merchant. | ypl938459435 |
amount mandatory | String The payment amount for the transaction. | 10.00 |
productinfomandatory | String A brief description of the product. | iPhone |
firstnamemandatory | String The first name of the customer. | Ashish |
lastnamemandatory | String The last name of the customer. | Kumar |
emailmandatory | String The email address of the customer. | [email protected] |
phonemandatory | String The phone number of the customer. | |
address1mandatory | String The first line of the billing address.H.No- 17, Block C, Kalyan Bldg, Khardilkar Road, Mumbai Note: This information is helpful when it comes to issues related to fraud detection and chargebacks. Hence, it is must to provide the correct information. | 34 Saikripa-Estate, Tilak Nagar |
address2mandatory | String The second line of the billing address. | |
citymandatory | String The city where your customer resides as part of the billing address. | Mumbai |
statemandatory | String The state where your customer resides as part of the billing address, | Maharashtra |
countrymandatory | String The country where your customer resides. | India |
zipcodemandatory | String Billing address zip code is mandatory for the cardless EMI option.`Character Limit-20 | 400004 |
pgmandatory for seamless/s2s flow | String It defines the payment category and post UPI. | UPI |
bankcodemandatory for seamless/s2s flow | String Each payment option is identified with a unique bank code at PayU. For UPI Autopay, post UPI. | UPI |
surlmandatory | String The success URL, which is the page PayU will redirect to if the transaction is successful. | |
furlmandatory | String The Failure URL, which is the page PayU will redirect to if the transaction is failed. | |
udf1mandatory if AD bank request this detail | String This parameter must contain the Buyer's PAN and date of birth in the following format (separated by two pipe characters): Buyer's PAN||Buyer'sDOB | AAAPZ1234C||22/08/1972 |
udf3mandatory if AD bank request this detail | String This parameter must contain the invoice ID of the transaction (generated by the merchant) and merchant name in the following format (separated by two pipe characters):Invoice ID||MerchantName | INV-123_1231||MerchantName |
Notes:
For udf1 and udf3, the following are applicable:
- if first value is absent, then UDF param will be sent as
NULL || <VALUE>- If second value is absent, then UDF param will be sent as
<VALUE>- If both values are absent, nothing will be sent in UDF param.
Sample request
curl --location 'https://test.payu.in/_payment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=PRiQvJ' \
--data-urlencode 'txnid=my_order_64240' \
--data-urlencode 'amount=5' \
--data-urlencode 'productinfo=asfas' \
--data-urlencode '[email protected]' \
--data-urlencode 'phone=8688359250' \
--data-urlencode 'txn_s2s_flow=4' \
--data-urlencode 'hash={{hash}}' \
--data-urlencode 'pg=UPI' \
--data-urlencode 'bankcode=UPI' \
--data-urlencode 'surl=https://test.payu.in/admin/test_response' \
--data-urlencode 'furl=https://test.payu.in/admin/test_response' \
--data-urlencode 'udf1=' \
--data-urlencode 'udf2=' \
--data-urlencode 'udf3=' \
--data-urlencode 'udf4=' \
--data-urlencode 'udf5=' \
--data-urlencode 'si_details={"billingAmount":"10.00","billingCurrency":"INR","billingCycle":"ADHOC","billingInterval": 1,"paymentStartDate":"2024-11-19","paymentEndDate":"2025-12-01"}' \
--data-urlencode 'api_version=7' \
--data-urlencode 'si=1' \
--data-urlencode 'vpa=9999999999@upi' \
--data-urlencode 'firstname=sudhanshu' \
--data-urlencode 'lastname=kr' \
--data-urlencode 'address1=308,third floor' \
--data-urlencode 'address2=testing' \
--data-urlencode 'city=ggn' \
--data-urlencode 'state=UP' \
--data-urlencode 'country=IND' \
--data-urlencode 'zipcode=122018'
Post a Recurring transaction
To post a recurring transaction:
- Post the pre-debit notification before 48 hours of the actual debit to notify the customer. For more information, refer to Pre-Debit Notification API.
- Initiate recurring using the Recurring Payment Transaction API including the below UDF params under var1 object required for PACB flow. For more information, refer to Recurring Payment Transaction API.
Parameter | Description |
---|---|
udf1 | This parameter must include the PAN and DOB of the buyer in the following format: PAN||DOB Note: The PAN and DOB are separated with two pipe (||) characters. |
udf3 | This parameter must include the invoice_id and the seller name(for PACB reseller use case) in the following format: invoice_id||sellerName Note: The invoice_id and seller name are separated with two pipe (||) characters. |
Notes:
For the UDFs above:
- If first value is absent, then UDF param will be sent as NULL ||
- If second value is absent, then UDF param will be sent as
- If the Invoice ID value was unavailable when posting the transaction at Step 1, it can be updated using the UDF Update API by posting it in the UDF5 parameter. For more information, refer to UDF Update API.
- According to the RBI guidelines, the invoice file must be shared with PayU within 10 days of the transaction. The invoices can be uploaded using the Invoice Upload API. For more information, refer to Invoice Upload API.
Updated about 15 hours ago