> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate Transaction Overview

> Send a POST request to initiate_pay_in to start collecting a payment. Supports UPI Intent, QR, VPA, credit card, debit card, and net banking.

To start collecting a payment, send a `POST` request to the initiate endpoint with your chosen payment method, a unique order identifier, and your customer's details. bluSwap validates the request and returns the payment data you need to present the checkout experience — whether that's a UPI intent URL, a QR code payload, or a redirect link to a hosted checkout page.

## Headers

Every request to the initiate endpoint requires the following headers. The device and browser metadata you supply helps bluSwap route the payment correctly and filter out automated or bot activity.

**x-api-key** `string` *required*

Your Merchant Secret Key. Authenticate every request with this key — do not expose it in client-side code.

**user-agent** `string` *required*

The device and browser string for the customer's current session. bluSwap uses this to determine which payment UI to render — for example, surfacing GPay prominently on Android devices.

**x-browser-fingerprint** `string` *required*

A unique string that identifies the customer's specific device. bluSwap uses this to detect bot activity and flag suspicious repeat transactions, ensuring that the person paying is a real human on a known device.

**x-source-channel** `string` *required*

The channel from which the request originates. Pass `web` for browser-based integrations, `ios` for Apple devices, or `android` for Android devices.

```json Sample Headers theme={"dark"}
{
  "x-api-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "Content-Type": "application/json",
  "X-BROWSER-FINGERPRINT": "TW96aWxsYS81LjAgKE1hY2ludG9zaDsg",
  "USER-AGENT": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
  "X-SOURCE-CHANNEL": "web"
}
```

> [!TIP]
>
> You can retrieve sample `user-agent` and `x-browser-fingerprint` values for testing at [https://finex.bluswap.co/headers-display](https://finex.bluswap.co/headers-display).

## Request Parameters

**amount** `number` *required*

The transaction amount to collect from the customer.

**payment\_mode** `string` *required*

The payment method for this collection. Accepted values are `INTENT`, `VPA`, `QR`, `CREDIT_CARD`, `DEBIT_CARD`, and `NET_BANKING`.

**order\_id** `string` *required*

Your unique internal transaction ID. Use this identifier to track the payment and query its status. You must generate a new `order_id` for every transaction.

**customer\_info** `object` *required*

An object containing the customer's identity details. Include the following fields:

* `name` — the customer's full name
* `email` — the customer's email address
* `phone` — the customer's phone number
* `phone_country_code` — the country dialling code (e.g., `+91`)

**device\_os** `string`

**Required when `payment_mode` is `INTENT`.** The operating system of the customer's device. Pass `ANDROID` for Android devices or `IOS` for Apple devices.

**target\_app** `string`

**Required when `payment_mode` is `INTENT`.** The UPI app you want to open on the customer's device. Accepted values are `PHONEPE`, `GPAY`, `PAYTM`, `CRED`, `BHIM`, and `AMAZON`.

**upi\_id** `string`

**Required when `payment_mode` is `VPA`.** The customer's Virtual Payment Address (e.g., `user@upi`). bluSwap sends a collect request to this UPI ID, and the customer approves it in their UPI app.

## Collection Methods

Select the payment method that best fits your integration. Each method has its own sample request, response, and redirection behavior — see the dedicated sub-pages below.

> [card] [UPI Intent](/docs/collections/initiate-transaction/upi-intent.md)
>
> Opens the customer's selected UPI app directly on their Android or iOS device.

> [card] [UPI QR](/docs/collections/initiate-transaction/upi-qr.md)
>
> Returns a QR code payload that customers scan with any UPI app to complete payment.

> [card] [UPI VPA](/docs/collections/initiate-transaction/upi-vpa.md)
>
> Sends a collect request to the customer's UPI ID for approval in their UPI app.

> [card] [Credit Card](/docs/collections/initiate-transaction/credit-card.md)
>
> Returns a hosted checkout URL — redirect the customer there to enter card details.

> [card] [Debit Card](/docs/collections/initiate-transaction/debit-card.md)
>
> Returns a hosted checkout URL — redirect the customer there to enter card details.

> [card] [Net Banking](/docs/collections/initiate-transaction/net-banking.md)
>
> Returns a hosted checkout URL — redirect the customer there to select their bank.

> [!WARNING]
>
> Always verify the final payment status via your callback URL or the Check Transaction Status endpoint before fulfilling any order. The initiation response confirms only that the request was accepted, not that payment has completed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.