UPI Omnichannel S2S Integration
Steps to Integrate
Before you begin:
Register for an account with PayU before you start integration. For more information, refer to Register for a Merchant Account.
Step 1: Initiate payment
Environment
The Omni Channel API allows you to call the service request using the specific bank codes.
Post the initiatePayment API to initiate payment with all the required parameters as in the following Parameters table.
Request parameters
For the complete list of parameters, refer to UPI Collection – S2S.
Parameter | Description | Example |
---|---|---|
key |
Production: Generate Production Merchant Key and Sat. Test: Generate Test Merchant Key and Salt. |
Your Test Key |
api_version |
|
1 |
txnid |
|
s7hhDQVWvbhBdN |
amount |
|
10.00 |
productinfo |
|
iPhone |
email |
|
|
phone |
|
9876543210 |
surl |
String Success URL(surl) – It must contain the URL on which PayU will redirect the final response if the transaction is successful. |
|
furl |
|
|
<glossary:pg> |
|
UPI |
<glossary:bankcode> |
|
INTENT |
txn_s2s_flow |
|
4 |
firstname |
|
Ashish |
lastname |
|
Verma |
address1 |
|
H.No- 17, Block C, Kalyan Bldg, Khardilkar Road, Mumbai |
address2 |
|
34 Saikripa-Estate, Tilak Nagar |
city |
|
Mumbai |
state |
|
Maharashtra |
country |
|
India |
zipcode |
|
400004 |
hash |
|
eabec285da28fd 0e3054d41a4d24fe 9f7599c9d0b6664 6f7a9984303fd612 4044b6206daf831 e9a8bda28a6200d 318293a13d6c193 109b60bd4b4f8b09 c90972 |
udf1 |
|
Payment Preference |
udf2 |
|
Shipping Method |
udf3 |
|
Shipping Address1 |
udf4 |
|
Shipping City |
udf5 |
|
Shipping Zip Code |
s2s_client_ip |
|
|
s2s_device_info |
|
|
upiAppName |
For Specific Intent, merchant should share the app name which is selected by customer on the merchant check-out page. The following are the enum’s expected for major apps: |
|
vpa |
|
8800411088@upi |
This needs to be a server-to-server curl call request. This API is used for both Cards and UPI for generating a new transaction.
If specific intent has to be opened instead of Generic Intent, the bankcode values will change accordingly as listed in the following table:
App/Mode | bankcode |
---|---|
Omnichannel Flow | TEZOMNI |
Generic Intent | INTENT |
GPay | TEZ |
PhonePe | PPINTENT |
Note:
User VPA is not required for this flow. The different parameters and their descriptions are in the following table.
Collect the response in the UPI Collection - S2S. under API Reference. The response for the S2S payment request is not similar to Merchant Hosted or PayU Hosted Checkout. For description of response parameters, refer to Additional Info for Payment APIs.
Step 2: Check UPI transaction status
After receiving a successful response from the above API, the need to check the status of the transaction using the **Verify Payment **API. Web services can be accessed by making a server to server call on the following PayU URLs. For a sample request or response, refer to Verify Payment API under API Reference.
Step 3: PayU sends S2S callback response
PayU can also send a server-to-server callback response whenever the transaction status gets updated.
Implementation
The server to server response would be sent by PayU on a pre-set URL, which has to be provided by the merchant. PayU will configure it at the back-end for the merchant.
This response would be sent in key/value pair separated by the ampersand (&) character. In case any parameter is empty or not used, PayU will send it back to the merchant with an empty string.
Sample response
unmappedstatus=success&phone=9999999999&txnid=FCDA1R100870163781&hash=84e3 35094bbcb2ddaa0f9a488eb338e143b273765d89c9dfa502402562d0b6f3c7935e28194ca92f7 380be7c84c3695415b106dcf52cb016a15fcf6adc98d724&status=success&curl=https://www. abc.in/payment/handlepayuresposne&firstname=NA&card_no=519619XXXXXX5049&furl= https://www.abc.in/payment/handlepayuresposne&productinfo=2&mode=DC&amount=800. 00&field4=6807112311042810&field3=6807112311042810&field2=838264&field9=SUCC ESS&email=NA&mihpayid=175477248&surl=https://www.ABC.in/payment/handlepayuresp osne&card_hash=9e88cb0573d4a826b61d808c0a870ed4a990682459b0ec9e95ea421e8e47b e8c&field1=42812
The parameter list includes:
mihpayid, mode, status, key, txnid, amount, productinfo, firstname, lastname, address1, address2, cit y, state, country, zipcode, email, phone, udf1, udf2, udf3, udf4, udf5, udf6, udf7, udf8, udf9, udf10, car d_token,card_no, field0, field1, field2, field3, field4, field5, field6, field7, field8, field9, offer, discou nt, offer_availed,unmappedstatus, hash, bank_ref_no, surl, curl, furl, and card_hash
Whitelisting required
Whitelisting is required at both merchant’s and PayU’s end to establish this connection.
- You need to white list the following IP address on your Firewall:
- 180.179.174.1
- 180.179.174.2
- PayU will white list merchant server side IP address that you have provided to PayU.
Updated 6 days ago