Integrate Import with UPI Autopay for PayUBiz

UPI Autopay integration for Cross-Border Import involves the following steps:

  1. Post a Registration transaction (one-time only)
  2. 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

ParameterDescriptionExample
key mandatoryStringMerchant key provided by PayU during onboarding. JPg****f
txnid mandatoryStringThe transaction ID is a reference number for a specific order that is generated by the merchant. ypl938459435
amount mandatoryStringThe payment amount for the transaction.10.00 
productinfo
mandatory
StringA brief description of the product. iPhone
firstname
mandatory
String The first name of the customer.Ashish
lastname
mandatory
String The last name of the customer.Kumar
email
mandatory
StringThe email address of the customer. [email protected]
phone
mandatory
StringThe phone number of the customer. 
address1
mandatory
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
address2
mandatory
String The second line of the billing address.
city
mandatory
String The city where your customer resides as part of the billing address.Mumbai
state
mandatory
String The state where your customer resides as part of the billing address,Maharashtra
country
mandatory
String The country where your customer resides.India
zipcode
mandatory
String Billing address zip code is mandatory for the cardless EMI option.
`Character Limit-20
400004
pg
mandatory for seamless/s2s flow
String It defines the payment category and post UPI. UPI
bankcode
mandatory for seamless/s2s flow
String Each payment option is identified with a unique bank code at PayU. For UPI Autopay, post UPI.UPI
surl
mandatory
String The success URL, which is the page PayU will redirect to if the transaction is successful.
furl
mandatory
StringThe Failure URL, which is the page PayU will redirect to if the transaction is failed.
udf1
mandatory 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'sDOBAAAPZ1234C||22/08/1972
udf3
mandatory 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:

  1. 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.
  2. 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.
ParameterDescription
udf1This 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.
udf3This 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 
  1. 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.
  2. 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.