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

# How booking works

> Offers, sessions and the two ways to take payment.

Every booking runs through a **booking session**: a 30 minute lock on one offer, its price and its travellers. You choose who
collects travellers and payment.

> [card] [Skye checkout](https://docs.flyskye.ai/checkout.md)
>
> **Recommended.** Send the user a link. Skye collects travellers, passports and payment. You never touch card data or
> documents.

> [card] [Your own payment UI](https://docs.flyskye.ai/payments.md)
>
> Send travellers through the API and take payment inside your app, by Razorpay order, UPI QR or payment link.

## The lifecycle

**1. Offer**

`POST /search` returns offers. An offer is advisory: it is priced again live when you open a session.

**2. Session**

`POST /bookings/session` locks the offer and returns a `quote`. `quote.displayAmount` in `quote.displayCurrency` is
exactly what the traveller pays.

**3. Travellers**

One traveller per seat. International trips need a passport valid on the travel date.

**4. Payment**

Payment is authorised first and captured only once the fare is checked again at booking time.

**5. Ticket**

Skye issues the ticket and emails it to the traveller. You get a `booking.ticketed` webhook with the PNR.

## Payment and booking states

[`GET /bookings/session/{id}/payment`](https://docs.flyskye.ai/booking-status) reports both.

| `state` | Meaning |
| - | - |
| `pending` | Waiting for the traveller to pay |
| `paid` | Payment taken |
| `failed` | Payment or booking failed. Any money taken is refunded. |
| `expired` | The 30 minutes ran out before payment |

| `booking.state` | Meaning |
| - | - |
| `none` | No booking yet |
| `ticketing` | Paid, ticket being issued |
| `ticketed` | Ticket issued. `booking.pnr` is set. |
| `failed` | Ticketing failed. The traveller is refunded. |

> [!NOTE]
>
> If the fare moves or ticketing fails after payment, the traveller is refunded automatically. You never need to issue a
> refund yourself.


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