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

# Book with your own payment UI

> Lodge travellers yourself and take payment inside your own app.

Open the session as in [Skye checkout](https://docs.flyskye.ai/checkout.md), send the travellers yourself, then take payment with one of the methods
below.

> [!NOTE]
>
> Travellers must be lodged before any payment, so a dropped connection after payment can still be ticketed or refunded.

## 1. Send travellers

`POST /bookings/session/{id}/details`

```json theme={"system"}
{
  "contact": { "email": "asha@example.com", "phoneNumber": "9876543210" },
  "travellers": [
    { "title": "Ms", "givenName": "Asha", "familyName": "Rao", "bornOn": "1992-04-18", "gender": "female" }
  ]
}
```

**contact.email** `string` *required*

The traveller's email. The e-ticket goes here.

**contact.phoneNumber** `string`

Required before payment.

**travellers** `object[]` *required*

One traveller per seat (adults, children and infants).

**traveller**

**givenName** `string` *required*

First and middle names.

**familyName** `string` *required*

Surname.

**bornOn** `string` *required*

`YYYY-MM-DD`.

**title** `string`

For example `Mr`, `Ms` or `Mrs`.

**gender** `string`

`male` or `female`.

**passportNumber** `string`

Required on international trips.

**passportExpiry** `string`

`YYYY-MM-DD`, valid on the travel date. Required on international trips.

**passportCountry** `string`

Issuing country. Required on international trips.

**nationality** `string`

When the fare asks for it.

**passportIssueDate** `string`

When the fare asks for it.

**pan** `string`

When the fare asks for it.

Returns `{ "travelerIds": [...] }`.

## 2. Take payment

> [tab] Razorpay order
>
> `POST /bookings/session/{id}/payment`
>
> Returns `razorpayKeyId`, `orderId`, `amount` (in paise) and `currency`. Open Razorpay Checkout with them, then
> [confirm](#3-confirm) with the result.
>
> ```json theme={"system"}
> { "test": false, "razorpayKeyId": "rzp_live_...", "orderId": "order_...", "amount": 641200, "currency": "INR" }
> ```

> [tab] UPI QR
>
> `POST /bookings/session/{id}/payment/qr`
>
> INR only. The user scans it from another device; the booking completes on its own.
>
> ```json theme={"system"}
> { "test": false, "paymentId": "qr_...", "qrImageUrl": "https://...", "qrString": null, "amount": 6412, "currency": "INR", "expiresAt": "..." }
> ```
>
> In test mode `qrImageUrl` is null and `qrString` holds the `upi://` string to render yourself.

> [tab] Payment link
>
> `POST /bookings/session/{id}/payment/link`
>
> Optional body `{ "callbackUrl": "https://..." }`. Cards, UPI and netbanking; the booking completes on its own.
>
> ```json theme={"system"}
> { "test": false, "paymentId": "plink_...", "url": "https://rzp.io/...", "amount": 6412, "currency": "INR", "expiresAt": "..." }
> ```
>
> Treat the webhook or the status call as the truth, not the redirect to `callbackUrl`.

> [tab] UPI intent
>
> `POST /bookings/session/{id}/payment/upi`
>
> INR only. Returns an `intentUrl` (`upi://pay?...`) to open in the user's UPI app.
>
> > [!WARNING]
> >
> > Test mode only for now. Live keys get `501 upi_not_enabled`.

## 3. Confirm

Only for the Razorpay order flow. For QR and link payments you do not call confirm: watch the [webhook](https://docs.flyskye.ai/webhooks.md) or
[poll the status](https://docs.flyskye.ai/booking-status.md).

`POST /bookings/session/{id}/confirm`

```json Request theme={"system"}
{ "razorpay": { "orderId": "order_...", "paymentId": "pay_...", "signature": "..." } }
```

```json Response theme={"system"}
{ "bookingId": "...", "pnr": "ABC123", "status": "confirmed", "pending": false }
```

Payment is authorised first and captured only once the fare is checked again at booking time. If the fare moved or
ticketing fails, the traveller is refunded automatically.


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