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.

<PaymentAPIEnvironment />

Parameter

Description

Example

key ```

mandatory

</td>

<td>
`String`Merchant key provided by PayU during onboarding.
</td>

<td>
 JPg\*\*\*\*f
</td>
</tr>

<tr>
<td>
txnid ```

mandatory

StringThe transaction ID is a reference number for a specific order that is generated by the merchant.

 ypl938459435

amount ```

mandatory

</td>

<td>
`String`The payment amount for the transaction.
</td>

<td>
10.00 
</td>
</tr>

<tr>
<td>
productinfo\
`mandatory`
</td>

<td>
`String`A brief description of the product.
</td>

<td>
 iPhone
</td>
</tr>

<tr>
<td>
firstname\
`mandatory`
</td>

<td>
`String` The first name of the customer.
</td>

<td>
Ashish
</td>
</tr>

<tr>
<td>
lastname\
`mandatory`
</td>

<td>
`String` The last name of the customer.
</td>

<td>
Kumar
</td>
</tr>

<tr>
<td>
email\
 `mandatory`
</td>

<td>
`String`The email address of the customer.
</td>

<td>
 [[email protected]](mailto:[email protected])
</td>
</tr>

<tr>
<td>
phone\
 `mandatory`
</td>

<td>
`String`The phone number of the customer.
</td>

<td>
 
</td>
</tr>

<tr>
<td>
address1\
  `mandatory`
</td>

<td>
`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.
</td>

<td>
34 Saikripa-Estate, Tilak Nagar
</td>
</tr>

<tr>
<td>
address2\
  `mandatory`
</td>

<td>
`String` The second line of the billing address.
</td>

<td>

</td>
</tr>

<tr>
<td>
city\
`mandatory`
</td>

<td>
`String` The city where your customer resides as part of the billing address.
</td>

<td>
Mumbai
</td>
</tr>

<tr>
<td>
state\
`mandatory`
</td>

<td>
`String` The state where your customer resides as part of the billing address,
</td>

<td>
Maharashtra
</td>
</tr>

<tr>
<td>
country\
 `mandatory`
</td>

<td>
`String` The country where your customer resides.
</td>

<td>
India
</td>
</tr>

<tr>
<td>
zipcode\
`mandatory`
</td>

<td>
`String` Billing address zip code is mandatory for the cardless EMI option.\
\`Character Limit-20
</td>

<td>
400004
</td>
</tr>

<tr>
<td>
pg\
`mandatory for seamless/s2s flow`
</td>

<td>
`String` It defines the payment category and post **UPI**. 
</td>

<td>
UPI
</td>
</tr>

<tr>
<td>
bankcode\
`mandatory for seamless/s2s flow`
</td>

<td>
`String` Each payment option is identified with a unique bank code at PayU. For UPI Autopay, post **UPI**.
</td>

<td>
UPI
</td>
</tr>

<tr>
<td>
surl\
`mandatory`
</td>

<td>
`String` The success URL, which is the page PayU will redirect to if the transaction is successful.
</td>

<td>

</td>
</tr>

<tr>
<td>
furl\
`mandatory`
</td>

<td>
`String`The Failure URL, which is the page PayU will redirect to if the transaction is failed.
</td>

<td>

</td>
</tr>

<tr>
<td>
udf1\
`mandatory if AD bank request this detail`
</td>

<td>
`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

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.

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 || <VALUE> 
  • If second value is absent, then UDF param will be sent as \ <VALUE>
  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.