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

# UPI Deeplink

***

# Create Order & Initiate UPI S2S Payment

Use the Create Order API to generate a new payment order. Once the order is created successfully, use the returned `x_order_id` to initiate a UPI S2S payment.

The UPI S2S flow allows you to initiate a UPI transaction and receive a UPI intent URL and QR code in the API response.

## Payment Flow

1. Create an order using the Create Order API.
2. Extract `x_order_id` from the successful response.
3. Call the Initiate Payment API with the `x_order_id` and UPI payment method.
4. Extract `intent_url` from the response.
5. Redirect the customer to the UPI intent URL or display the QR code.
6. Verify the final transaction status using the Order Status API.

***

## Step 1: Create Order

### Endpoint

```text theme={null}
POST /api/v3/pg/order/create
```

Create the order using the standard authentication headers and required order details.

Refer to:

* [API Resources](https://docs.eliteneobank.com/guide/quick-start/api-resources.md)
* [Headers](https://docs.eliteneobank.com/guide/authentication/headers.md)
* [Signature Generation](https://docs.eliteneobank.com/guide/authentication/security.md)
* [Timestamp Validation](https://docs.eliteneobank.com/guide/authentication/timestamp.md)

### Example Success Response

```text theme={null}
{
  "code": "200",
  "status": "success",
  "message": "Order created successfully",
  "return_data": {
    "x_order_id": "kp_demo_40dec464-7155-43a3-855d-c95c5ab1be71",
    "created_at": "29-10-2026 10:01 AM",
    "order_id": "ORD_DEMO_1001",
    "order_status": "UN_PAID",
    "payment_link": "https://sandbox.example.com/payment/checkout/demo"
  }
}
```

**Important:** Store the returned `x_order_id`. This ID is required for the next API call.

***

## Step 2: Initiate UPI S2S Payment

After creating the order, extract the `x_order_id`from the Create Order API response and pass it to the Initiate Payment API.

### Endpoint

```text theme={null}
POST /api/v3/pg/order/pay
```

The endpoint above is illustrative. Use the actual Initiate Payment endpoint provided in your API environment.

### Request Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `x_order_id` | String | Yes | Order ID returned by the Create Order API |
| `payment_method.upi.channel` | String | Yes | UPI payment channel; use `app` |

### Example Request Body

```text theme={null}
{
  "x_order_id": "kp_demo_40dec464-7155-43a3-855d-c95c5ab1be71",
  "payment_method": {
    "upi": {
      "channel": "app"
    }
  }
}
```

### Example cURL Request

```text theme={null}
curl --request POST \
  --url https://sandbox.eliteneobank.com/api/v3/pg/order/pay \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "X-API-KEY: pk_test_xxxxxxxxx" \
  --header "X-TIMESTAMP: GENERATED_TIMESTAMP" \
  --header "X-SIGNATURE: GENERATED_SIGNATURE" \
  --data '{
    "x_order_id": "kp_demo_40dec464-7155-43a3-855d-c95c5ab1be71",
    "payment_method": {
      "upi": {
        "channel": "app"
      }
    }
  }'
```

Use the authentication and signature-generation process specified in the API documentation.

***

## Step 3: Example Success Response

The Initiate Payment API returns transaction details, the transaction status, and the UPI payment information.

```text theme={null}
{
  "status": true,
  "message": "Transaction initiated successfully",
  "data": {
    "payment_id": "pay_demo_1184a9fe5bef21e",
    "bofin_id": "BOFINPAY20261029100133DEMOCPG",
    "aggregator_txn_id": "pay_demo_1184a9fe5bef21e",
    "merchant_txn_id": "ORD_DEMO_1001",
    "bank_order_id": null,
    "provider_reference_id": "qr_DEMO123456789",
    "amount": "500.00",
    "txn_status": "unknown",
    "pay_type": "upi",
    "pay_mode": "upi_qr",
    "qr": "https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=upi%3A%2F%2Fpay%3Fam%3D500.00%26cu%3DINR%26pa%3Ademo%40upi",
    "intent_url": "upi://pay?pa=demo%40upi&pn=Demo%20Merchant&am=500.00&cu=INR&tn=Payment%20for%20ORD_DEMO_1001&tr=DEMO123456789"
  }
}
```

**Note:** All response values above are illustrative demo values. The `intent_url` and QR code are examples only and are not guaranteed to initiate a real payment.

***

## Step 4: Redirect Customer to UPI

Extract `intent_url` from the Initiate Payment API response.

```text theme={null}
const intentUrl = response.data.intent_url;
window.location.href = intentUrl;
```

For mobile applications, open the returned UPI intent URL using the platform's supported deep-link handling mechanism.

Alternatively, display the returned `qr` URL as a QR code so the customer can scan it using a UPI application.

### Example UPI Intent URL

```text theme={null}
upi://pay?pa=demo%40upi&pn=Demo%20Merchant&am=500.00&cu=INR&tn=Payment%20for%20ORD_DEMO_1001&tr=DEMO123456789
```

The actual `intent_url` must always be taken from the API response. Do not construct a production payment intent using demo values.

***

## Step 5: Transaction Status Handling

The `txn_status` returned by the Initiate Payment API indicates the transaction status at that point in time.

| Status | Description |
| :- | :- |
| `unknown` | Final transaction status is not yet confirmed |
| `PROCESSING` | Transaction is being processed |
| `PAID` | Payment completed successfully |
| `FAILED` | Payment failed |

The statuses listed above are illustrative; confirm the supported status values with the Order Status API documentation.

**Important:** A successful initiation response does not mean the payment has been completed. Always verify the final transaction status using the Order Status API and process webhook notifications according to the integration guidelines.

***

## Important Notes

* Create the order before initiating the UPI payment.
* Use the exact `x_order_id` returned by the Create Order API.
* Send `payment_method.upi.channel` as `app` for this flow.
* Generate authentication signatures on the server side.
* Use the actual API endpoint and environment-specific credentials.
* Treat `intent_url`, QR code, and transaction identifiers returned by the API as dynamic values.
* Do not mark an order as paid solely because the initiation API returned `status: true`.
* Verify the final payment status server-side before fulfilling the order.

***

## Recommended Integration Flow

```text theme={null}
Create Order API
       |
       v
Extract x_order_id
       |
       v
Initiate UPI S2S Payment
       |
       v
Receive intent_url and QR
       |
       v
Open UPI App / Display QR
       |
       v
Customer Completes Payment
       |
       v
Verify Status / Process Webhook
       |
       v
Update Merchant Order
```


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