---
page_source: https://juspay.io/in/docs/ec-api/docs/base-integration/upi-collect-payment
page_title: UPI Collect Payment
---

## API Version: default


# UPI Collect Payment



Create a collect transaction for given VPA. In UPI collect transaction, payment collect request is sent to the UPI app.

> **Note**
> Please use the relevant parameters received from the **Payment Method API in UPI**  for **payment_method_type**  and **payment_method**  fields.

## Endpoints:
- Sandbox: https://payments.sandbox.juspay.in/txns

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

## Request Type: 
POST

## Headers:

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

#### 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:

#### New UPI Collect Request Code Snippet:

```new upi collect request
curl -X POST https://api.juspay.in/txns \
-H 'x-routing-id: customer_1122'\
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=UPI" \
-d "payment_method=UPI_COLLECT" \
-d "payment_channel=ANDROID_APP | ANDROID_WEB | IOS_APP | IOS_WEB | DESKTOP" \
-d "upi_vpa=:vpa" \
-d "redirect_after_payment=true" \
-d "format=json"

```

#### Old UPI Collect Request Code Snippet:

```old upi collect request
curl -X POST https://api.juspay.in/txns \
-H 'x-routing-id: customer_1122'\
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=UPI" \
-d "payment_method=UPI" \
-d "txn_type=UPI_COLLECT" \
-d "payment_channel=ANDROID_APP | ANDROID_WEB | IOS_APP | IOS_WEB | DESKTOP" \
-d "upi_vpa=:vpa" \
-d "redirect_after_payment=true" \
-d "format=json"

```

### Sample Response:

#### Response:
```json
{
  "order_id": ":order_id",
  "txn_id": ":txn_id",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "method": "GET",
      "url": "https://api.juspay.in/pay/start/guest/8646a7a0xxxxxfa99995fec00340a507"
    }
  }
}
```

## Body Parameters:
### Parameters:

#### order_id:
- Description: `order\_id` pertaining to the order for which the payment is started.
- Tags: string, Mandatory

#### merchant_id:
- Description: ID of the merchant_account that you hold with us.
- Tags: string, Mandatory

#### payment_method_type:
- Description: Must be `UPI`.
- Tags: string, Mandatory

#### payment_method:
- Description: Please use the relevant value received from the **Payment Method API in the** **payment_method**  field.
- Tags: string, Mandatory

#### payment_channel:
- Description: The platform from which the transaction is initiated. This is used to share the payment channel with Juspay. Accepted values: `ANDROID_APP`, `ANDROID_WEB`, `IOS_APP`, `IOS_WEB`, `DESKTOP`.

> **Note**
> NPCI has mandated the removal of UPI Collect for most transactions by **January 31st, 2026** . While iOS and PACB flows are currently **exempt** , merchants must update their integration to pass the `payment_channel` in the Transaction API to Juspay. This ensures that valid, exempted transactions are correctly identified and processed.


- Tags: String, Optional

#### txn_type:
- Description: Must be `UPI_COLLECT`for Old UPI Collect Request. This field is obsolete for New UPI Collect Request
- Tags: string, Mandatory

#### upi_vpa:
- Description: VPA to which the collect request must be sent.
- Tags: string, Mandatory

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true and use the redirection flow. If set to `true`, then the user is redirected to the `return\_url` configured for the order. If set to `false`, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: boolean, Mandatory

#### 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, Mandatory

#### offers:
- Description: The key offers should be passed only when juspay offers are being used. The value for this key can set as the offerID which is received from /v1/offers/list api
- Tags: array of strings
## API Responses:
### 200:

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

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

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

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

#### status:
- Description: error
- Tags: string

#### error_message:
- Description: Order timed out
- Tags: string

#### error_code:
- Description: invalid_request
- Tags: string
