---
page_title: OmniChannel API flow
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/googlepay-integrations-and-flows/omnichannel-api-flow
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fgooglepay-integrations-and-flows%2Fomnichannel-api-flow
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# OmniChannel API flow



Merchants can use the Omnichannel API to request and accept payments from customers through Google Pay by requesting a single identifier (like a phone number) in their purchase flow. This API provides a server-side interface for merchants to initiate a payment call to Google and complete the transaction.

Merchants can pre-populate the user's phone numbers (or ask for input) on their app or website.Once the user confirms the populated information, the merchant makes a server call to request paymentThe Google Pay app directs the user to complete the payment.The merchant verifies the payment status with their PSP before proceeding to confirm the purchase. 

The User Experience is handled by the merchant when using mobile number based push payments on GooglePay. Please refer to GooglePay brand guidelines before implementing it.

Step 1: User selects GooglePay as the preferred Payment Option

Step 2: User is asked to enter the Mobile Number linked to GooglePay in the payment page. Merchants can choose to autofill this field.

Step 3: User clicks on “PAY”. The /txns API is called on click. This triggers a request to the GooglePay account linked to the mobile Number passed.

Step 4a: The response contains the field “url”. The URL needs to be loaded on a browser. The URL checks Juspay order status. As soon as the user confirms the payment on GooglePay, the browser will redirect to the merchant redirection page.

Step 4b: Instead of loading the URL passed in the response, merchants can handle UI natively and check Juspay order status API for the order confirmation. Once the user pays on GooglePay, the status API will return “CHARGED”. Until then, the status will be “PENDING_VBV”.## Endpoints:
- Sandbox: https://sandbox.juspay.in/txns

- Production: https://api.juspay.in/txns

## Request Type: 
POST

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Mandatory
## Headers:

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl --request POST \
     --url https://api.juspay.in/txns \
     --header 'accept: application/json' \
     --header 'authorization: Basic OUU4QkxxxxxxxxxxxxxxxTQzMEM2RkFDMjcyQjM5Og==' \
     --header 'x-routing-id: customer_1122'\
     --header 'content-type: application/x-www-form-urlencoded'

```

### Sample Response:

#### Response:
```json
{
  "txn_uuid": "euljee4mruLZTzrdM",
  "txn_id": "TEST1592138494",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "url": "https://api.juspay.in/v2/pay/start/merchantId/euljee4mruLZTzrdM",
      "method": "GET"
    }
  },
  "order_id": "TEST1592138494"
}
```

## Body Parameters:
### Parameters:

#### merchant_id:
- Description: The merchant id you hold at Juspay
- Tags: string, Required

#### order_id:
- Description: The order id against which the transaction has to be initiated
- Tags: string, Required

#### payment_method_type:
- Description: Must be WALLET
- Tags: string, Required

#### payment_method:
- Description: Must be GOOGLEPAY
- Tags: string, Required

#### mobile_number:
- Description: The number to which PUSH notification has to be sent
- Tags: string, Required

#### txn_type:
- Description: Must be PUSH_PAY
- Tags: string, Required

#### format:
- Description: If it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
- Tags: string
## API Responses:
### 200:

#### txn_uuid:
- Description: euljee4mruLZTzrdM
- Tags: string

#### txn_id:
- Description: TEST1592138494
- Tags: string

#### status:
- Description: PENDING_VBV
- Tags: string

#### payment:
- Value:
  - **Authentication.url**:
    - Tags: string
  - **Authentication.method**:
    - Tags: String
- Tags: object

#### order_id:
- Description: TEST1592138494
- Tags: string


---

## See Also

- [GooglePay Integration](https://juspay.io/in/docs/api-reference/docs/googlepay-integrations-and-flows/googlepay-integration)
- [Pre Auth API](https://juspay.io/in/docs/api-reference/docs/preauth-and-capture/pre-auth-api)
