---
updatedAt: 2026-09-02T04:55:35.000Z
agentTools:
  projectIndex: https://docs.payu.in/llms.txt
---

# UPI Omnichannel S2S Integration

***

title: UPI Omnichannel S2S Integration
excerpt: ''
deprecated: false
hidden: false
metadata:
title: ''
description: ''
robots: index
next:
description: ''
---------------

This section describes how to integrate UPI for Omnichannel with S2S integration:

<Cards columns={2}>
  <Card title="1. Initiate Payment" href="https://docs.payu.in/docs/upi-omnichannel-integration#step-1-Initiate-payment">
    Initiate the UPI Omnichannel payment request with required parameters
  </Card>
  <Card title="2. Check UPI Transaction Status" href="https://docs.payu.in/docs/upi-omnichannel-integration#step-2-check-upi-transaction-status">
    Monitor and check the real-time status of the UPI transaction
  </Card>
  <Card title="3. PayU Sends S2S Call Back Response" href="https://docs.payu.in/docs/upi-omnichannel-integration#step-3-payu-sends-s2s-callback-response">
    Receive and handle the server-to-server callback response from PayU
  </Card>
  <Card title="4. Verify the payment" href="https://docs.payu.in/docs/upi-omnichannel-integration#step-4-verify-payment">
    Verify the payment status and ensure successful transaction completion
  </Card>
</Cards>

<Callout icon="👍" theme="okay">
  ### Before you begin:
  Register for an account with PayU before you start integration. For more information, refer to <a href="https://docs.payu.in/v1/docs/register-for-a-merchant-account-on-dashboard" target="_blank">Register for a Merchant Account</a>.
</Callout>

## Step 1: Initiate payment

### Environment

|                            |                                   |
| :------------------------- | :-------------------------------- |
| **Test Environment**       | `https://test.payu.in/_payment`   |
| **Production Environment** | `https://secure.payu.in/_payment` |

The Omni Channel API allows you to call the service request using the specific bank codes.

For the complete list of parameters, refer to <Anchor label="UPI Collection – S2S" target="_blank" href="ref:_payment_s2s_upi_collection">UPI Collection – S2S</Anchor>.

<Tabs>
  <Tab title="Request Parameters">

**Mandatory Parameters**

| Parameter | Description | Example |
| :--- | :--- | :--- |
| <Glossary>key</Glossary> | `String` The merchant key is provided by PayU and acts as a unique identifier for a specific merchant account in PayU's database. | Your Test Key |
| <Glossary>txnid</Glossary> | `String` The transaction ID is the order reference number generated by the merchant to track a particular order. It can be used only once and PayU's system does not accept a duplicate Transaction ID. | s7hhDQVWvbhBdN |
| amount | `float` It should contain the payment amount of the particular transaction. The amount must be greater than Rs. 8000 for the cardless <Glossary>EMI</Glossary> option. | 10.00 |
| <Glossary>productinfo</Glossary> | `String` It should be a string containing a brief description of the product. | iPhone |
| email | `String` The email of the customer. | test@gmail.com |
| phone | `String` The phone number of the customer. | 9876543210 |
| <Glossary>surl</Glossary> | `String` Success URL – PayU will redirect the final response here if the transaction is successful. | https://apiplayground-response.herokuapp.com/ |
| <Glossary>furl</Glossary> | `String` Failure URL – PayU will redirect the final response here if the transaction fails. | https://apiplayground-response.herokuapp.com/ |
| <Glossary>hash</Glossary> | `String` It is the hash calculated by the merchant. <Glossary>SHA-512</Glossary>(key\|txnid\|amount\|productinfo\|firstname\|email\|udf1\|udf2\|udf3\|udf4\|udf5\|\|\|\|\|\|<Glossary>Salt</Glossary>) | — |
| <Glossary>pg</Glossary> | `String` The payment gateway. For <Glossary>UPI</Glossary> Omnichannel, use UPI. | UPI |
| <Glossary>bankcode</Glossary> | `String` The bank code identifying the payment option. Contact PayU Support for the list of bank codes. | UPITEZ |
| <Glossary>vpa</Glossary> | `String` The Virtual Payment Address of the customer. | test@okhdfcbank |
| <Glossary>s2s_client_ip</Glossary> | `String` The IP address of the client device initiating the transaction. | 10.200.12.12 |
| <Glossary>s2s_device_info</Glossary> | `String` Device information/user-agent string of the client. | Mozilla/5.0 |

**Optional Parameters**

| Parameter | Description | Example |
| :--- | :--- | :--- |
| api_version | `String` The API version for this API. | 1 |
| address1 | `String` The first line of the billing address. | — |
| address2 | `String` The second line of the billing address. | — |
| city | `String` The city where the customer resides. | — |
| state | `String` The state where the customer resides. | — |
| country | `String` The country where the customer resides. | — |
| zipcode | `String` Billing address zip code. Mandatory for cardless EMI option. Character Limit: 20. | — |
| udf1–udf5 | `String` <Glossary>User Defined Field</Glossary>s used to store any information corresponding to a particular transaction. | — |
| <Glossary>notifyurl</Glossary> | `String` The URL where PayU sends the server-to-server callback response. | https://yourwebsite.com/notify |

  </Tab>

  <Tab title="Sample Request">

```curl
curl --location 'https://test.payu.in/_payment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=YOUR_MERCHANT_KEY' \
--data-urlencode 'txnid=TXN_12345' \
--data-urlencode 'amount=10.00' \
--data-urlencode 'productinfo=iPhone' \
--data-urlencode 'firstname=Ashish' \
--data-urlencode 'email=test@gmail.com' \
--data-urlencode 'phone=9876543210' \
--data-urlencode 'pg=UPI' \
--data-urlencode 'bankcode=UPITEZ' \
--data-urlencode 'vpa=test@okhdfcbank' \
--data-urlencode 'surl=https://apiplayground-response.herokuapp.com/' \
--data-urlencode 'furl=https://apiplayground-response.herokuapp.com/' \
--data-urlencode 's2s_client_ip=10.200.12.12' \
--data-urlencode 's2s_device_info=Mozilla/5.0' \
--data-urlencode 'hash=YOUR_HASH_VALUE'
```
```python
import requests

url = "https://test.payu.in/_payment"
headers = {"Content-Type": "application/x-www-form-urlencoded"}
data = {
    "key": "YOUR_MERCHANT_KEY",
    "txnid": "TXN_12345",
    "amount": "10.00",
    "productinfo": "iPhone",
    "firstname": "Ashish",
    "email": "test@gmail.com",
    "phone": "9876543210",
    "pg": "UPI",
    "bankcode": "UPITEZ",
    "vpa": "test@okhdfcbank",
    "surl": "https://apiplayground-response.herokuapp.com/",
    "furl": "https://apiplayground-response.herokuapp.com/",
    "s2s_client_ip": "10.200.12.12",
    "s2s_device_info": "Mozilla/5.0",
    "hash": "YOUR_HASH_VALUE"
}
response = requests.post(url, headers=headers, data=data)
print(response.status_code)
print(response.text)
```
```php
<?php
$url = "https://test.payu.in/_payment";
$data = http_build_query([
    "key"            => "YOUR_MERCHANT_KEY",
    "txnid"          => "TXN_12345",
    "amount"         => "10.00",
    "productinfo"    => "iPhone",
    "firstname"      => "Ashish",
    "email"          => "test@gmail.com",
    "phone"          => "9876543210",
    "pg"             => "UPI",
    "bankcode"       => "UPITEZ",
    "vpa"            => "test@okhdfcbank",
    "surl"           => "https://apiplayground-response.herokuapp.com/",
    "furl"           => "https://apiplayground-response.herokuapp.com/",
    "s2s_client_ip"  => "10.200.12.12",
    "s2s_device_info"=> "Mozilla/5.0",
    "hash"           => "YOUR_HASH_VALUE"
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/x-www-form-urlencoded"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo "Status: " . curl_getinfo($ch, CURLINFO_HTTP_CODE) . "\n";
echo $response;
curl_close($ch);
?>
```
```java
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
public class UpiOmnichannelS2S {
    public static void main(String[] args) throws Exception {
        Map<String, String> params = new LinkedHashMap<>();
        params.put("key","YOUR_MERCHANT_KEY"); params.put("txnid","TXN_12345");
        params.put("amount","10.00"); params.put("productinfo","iPhone");
        params.put("firstname","Ashish"); params.put("email","test@gmail.com");
        params.put("phone","9876543210"); params.put("pg","UPI");
        params.put("bankcode","UPITEZ"); params.put("vpa","test@okhdfcbank");
        params.put("surl","https://apiplayground-response.herokuapp.com/");
        params.put("furl","https://apiplayground-response.herokuapp.com/");
        params.put("s2s_client_ip","10.200.12.12"); params.put("s2s_device_info","Mozilla/5.0");
        params.put("hash","YOUR_HASH_VALUE");
        StringJoiner sj = new StringJoiner("&");
        for (Map.Entry<String,String> e : params.entrySet())
            sj.add(URLEncoder.encode(e.getKey(),StandardCharsets.UTF_8)+"="+URLEncoder.encode(e.getValue(),StandardCharsets.UTF_8));
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://test.payu.in/_payment"))
            .header("Content-Type","application/x-www-form-urlencoded")
            .POST(HttpRequest.BodyPublishers.ofString(sj.toString())).build();
        HttpResponse<String> response = client.send(request,HttpResponse.BodyHandlers.ofString());
        System.out.println("Status: "+response.statusCode()); System.out.println(response.body());
    }
}
```
```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
class UpiOmnichannelS2S {
    static async Task Main() {
        using var client = new HttpClient();
        var data = new FormUrlEncodedContent(new Dictionary<string,string> {
            {"key","YOUR_MERCHANT_KEY"},{"txnid","TXN_12345"},{"amount","10.00"},
            {"productinfo","iPhone"},{"firstname","Ashish"},{"email","test@gmail.com"},
            {"phone","9876543210"},{"pg","UPI"},{"bankcode","UPITEZ"},
            {"vpa","test@okhdfcbank"},
            {"surl","https://apiplayground-response.herokuapp.com/"},
            {"furl","https://apiplayground-response.herokuapp.com/"},
            {"s2s_client_ip","10.200.12.12"},{"s2s_device_info","Mozilla/5.0"},
            {"hash","YOUR_HASH_VALUE"}
        });
        var response = await client.PostAsync("https://test.payu.in/_payment", data);
        Console.WriteLine("Status: "+(int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
```

  </Tab>
</Tabs>

## Step 2: Check UPI Transaction Status

After initiating the payment, check the UPI transaction status using the **getNetBankingStatus** API or polling mechanism. For more information, refer to <Anchor label="UPI Collection – S2S" target="_blank" href="ref:_payment_s2s_upi_collection">UPI Collection – S2S</Anchor>.

## Step 3: PayU Sends S2S Callback Response

<Accordion title="S2S Callback Details" icon="fa-code">
  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.
</Accordion>

<Accordion title="Sample response" icon="fa-file-code">
  ```plaintext
  unmappedstatus=success&phone=9999999999&txnid=FCDA1R100870163781&status=success&mode=DC&amount=800.00&mihpayid=175477248
  ```
</Accordion>

<Accordion title="Whitelisting required" icon="fa-shield">
  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.
</Accordion>

## Step 4. Verify the payment

Upon receiving the response, PayU recommends you performing a reconciliation step to validate all transaction details.<br/>

You can verify your payments using either of the following methods:<br/>

<Tabs>
  <Tab title="1. Verify using Webhooks">
    Configure the webhooks to monitor the status of payments.<br />Webhooks enable a server to communicate with another server by sending an HTTP callback or message.<br />These callbacks are triggered by specific events or instances and operate at the server-to-server (S2S) level.

    <br />

    Know how to manage [Webhooks for Payments](https://docs.payu.in/reference/webhooks).
  </Tab>

  <Tab title="2. Verify using Verify Payments API">
    **Environment**

    |                        |                                                                                                              |
    | :--------------------- | :----------------------------------------------------------------------------------------------------------- |
    | Test Environment       | [https://test.payu.in/merchant/postservice.php?form=2](https://test.payu.in/merchant/postservice.php?form=2) |
    | Production Environment | [https://info.payu.in/merchant/postservice.php?form=2](https://info.payu.in/merchant/postservice.php?form=2) |

    > Note: The hash logic for Verify Payment API is:
    > `sha512(key|command|var1|salt)
    > sha512`

    <Accordion title="Sample request" icon="fa-code">
      curl --request POST <br />--url '[https://test.payu.in/merchant/postservice?form=2](https://test.payu.in/merchant/postservice?form=2)' <br />--header 'Content-Type: application/x-www-form-urlencoded' <br />--data key=JPM7Fg <br />--data command=verify_payment <br />--data var1=IhfgcZnXR4o4nB <br />--data hash=a0ae79fdd66c875af6e9b21c4a67f1822deb00f2df5e9f0b1948f3222f536a9bf741b24efbb1874ca0f84f76b036e6c0d641581d0100f7abe4aeed2f3264f5c9
    </Accordion>

    <Accordion title="Sample response" icon="fa-reply">
      <br />

      If credit card payment is made, the response is similar to the following:

      ```json Success Response
      {
        "status":0,
        "msg":"0 out of 1 Transactions Fetched Successfully",
        "transaction_details":
      {
      "IhfgcZnXR4o4nB":
      {
      "mihpayid":"Not Found",
      "status":"Not Found"
      }
      }
      }
      ```

      If txnID is not found, the response is similar to the following:

      ```json Failure Response

      {
          "status":0,
          "msg":"0 out of 1 Transactions Fetched Successfully",
            "transaction_details":
            {	
                            "IhfgcZnXR4o4nB":
              {
                                    "mihpayid":"Not Found",
                  "status":"Not Found"
                }
                            }
      }
      ```
    </Accordion>

    <Accordion title="Response parameters" icon="fa-list">
      <Table align={["left","left","left"]}>
        <thead>
          <tr>
            <th>
              **Parameter**
            </th>

            <th>
              **Description**
            </th>

            <th>
              **Example**
            </th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td>
              status
            </td>

            <td>
              This parameter returns the status of web service call. The status can be any of the following:

              * 0 - If web service call failed.
              * 1 - If web service call succeeded
            </td>

            <td>
              0
            </td>
          </tr>

          <tr>
            <td>
              msg
            </td>

            <td>
              This parameter returns the reason string.
            </td>

            <td>
              For example, any of the following messages are displayed:

              * Parameter missing
              * Token is empty
              * Amount is empty
              * Transaction not exists
            </td>
          </tr>

          <tr>
            <td>
              transaction_details
            </td>

            <td>
              This parameter contains the response in a JSON format. For more information refer to [JSON fields description for transaction_details parameter ](https://docs.payu.in/reference/addl-info-general-apis).
            </td>

            <td>

            </td>
          </tr>

          <tr>
            <td>
              request_id
            </td>

            <td>
              PayU Request ID for a request in a Transaction. For example, a transaction can have a refund request.
            </td>

            <td>
              7800456
            </td>
          </tr>

          <tr>
            <td>
              bank_ref_num
            </td>

            <td>
              This parameter returns the bank reference number. If the bank provides after a successful action.
            </td>

            <td>
              204519474956
            </td>
          </tr>
        </tbody>
      </Table>

      To learn more about the possible error codes and their description, refer to [Error Codes](https://docs.payu.in/reference/error-codes).
    </Accordion>
  </Tab>
</Tabs>

<br />