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

# Booking Life Cycle

> How Jinko moves from search to a confirmed booking.

Jinko turns a travel request into a confirmed booking. A **trip** brings the selected products, travelers, and options together until payment and fulfillment.

## The booking flow

```mermaid theme={null}
flowchart LR
  A["Search"] --> B["Build trip"]
  B --> C["Checkout"]
  C --> D["Payment"]
  D --> E["Fulfillment"]

  classDef step fill:#FFF8ED,stroke:#FF4F00,color:#171717,stroke-width:1.5px;
  class A,B,C,D,E step;
```

1. **Search** finds an available flight, hotel, or rental car.
2. **Build trip** brings the selected products, travelers, and ancillaries into one place.
3. **Checkout** verifies the trip and returns the available payment options.
4. **Payment** can be completed by the traveler or programmatically.
5. **Fulfillment** books each item and returns its confirmation.

## The trip

A trip holds one travel request. It can contain flights, hotels, rental cars, and their ancillaries. It also holds the traveler and contact information needed to book them.

All items in the trip go through one checkout and one payment. You do not need to rebuild the trip between steps.

See [Trips and checkout](https://docs.gojinko.com/guides/trips-and-checkout.md) for the complete model.

### Trip and quote

1. **Trip** holds the items, travelers, and contact for one request, identified by `trip_id`.
2. **Quote** is the priced snapshot created at checkout, identified by `quote_id`. It has an expiry time, but it is not a price hold. A supplier can still change the price or remove availability. Running checkout again creates a new quote.

## Checkout and payment

Checkout verifies the trip, prices it, and returns the information needed to pay. The traveler can complete payment on a hosted page, or an agent can submit an authorized programmatic payment.

Your system does not need to collect or store card details. See [Payments](https://docs.gojinko.com/guides/payments.md) for the supported payment paths.

## Fulfillment

Fulfillment starts after payment. Jinko books each item in the trip and updates its status as confirmations arrive.

Some bookings confirm immediately. Others can take longer because they depend on the supplier. Jinko emails the traveler when the booking is confirmed.

## Trip status and booking state

A trip has three status fields with different roles:

1. **`status`** shows the lifecycle of the whole trip.
2. **`booking_state`** summarizes the booking after payment starts. It is absent before payment.
3. **`fulfillment.status`** gives the detailed booking status behind `booking_state`. It is also absent before payment.

| Trip `status` | Meaning | `booking_state` |
| - | - | - |
| `draft` | The trip is still being built or priced. | Absent, or `awaiting_payment` once payment starts |
| `fulfilling` | Payment was submitted and booking is in progress. | `awaiting_payment` or `processing` |
| `fulfilled` | Every item was booked. | `completed` |
| `partially_fulfilled` | Some items were booked and others failed. | `partial` |
| `failed` | Nothing was booked. | `failed` |
| `cancelled` | The trip was replaced during a re-shop. | Absent |
| `expired` | The trip expired before booking. | Absent |

The booking values of `status` (`fulfilling`, `fulfilled`, `partially_fulfilled`, `failed`) are deprecated in favour of `booking_state` and still sent. `booking_state` can also read `cancelled`, or `needs_review` while a person at Jinko resolves the booking; `needs_review` is not final. `quoting`, `quoted` and `fulfillment_prepared` are reserved and not currently set: quote progress is in `quote.status`.

## Essential identifiers

| Identifier | What it identifies |
| - | - |
| `offer_token` | A cached flight found during exploration. It cannot be added to a trip: price-check it with `flight_search`, which returns a `trip_item_token`. |
| `trip_item_token` | A live-priced flight fare, hotel rate, or rental car offer that can be added to a trip. |
| `trip_id` | The trip throughout checkout, payment, and fulfillment. |
| `item_id` | An item in the trip, before it is booked. |
| `quote_id` | The priced quote checkout created. Pass it to pay exactly that quote. |
| `booking_ref` | The customer-facing booking reference created after payment starts. Its presence does not mean fulfillment is complete. |
| `booked_item_id` | A booked item, for refunds, cancellations, and exchanges. |
| `supplier_references` | The supplier confirmations for a booked item: the airline's record locator for each airline, the hotel's confirmation number, or the rental reservation number. Empty when none is known. |

These identifiers have different scopes. Use the identifier returned for the current step instead of storing an earlier search result indefinitely.

Treat every identifier as an opaque string and do not parse it. A `quote_id` is accepted only on the trip whose checkout created it; any other trip refuses it. Payment attempt answers write `trip_id` with a `trip_` prefix (`trip_1048576`), while the other answers write the same trip as `1048576`: strip the prefix to compare them.

## Lifetimes and expiry

Offers, trips, quotes, and checkout links expire on separate timelines:

| Object | What to do when it expires |
| - | - |
| Offer | Search again and replace the item in the trip. |
| Trip | Start a new trip with fresh offers. |
| Quote | Run checkout again to refresh the price and payment terms. |
| Checkout link | Run checkout again to create a new link. |

Always use a returned `expires_at` value when one is available. A valid checkout link does not mean its quote is still valid, and a valid quote does not guarantee that the supplier will keep the offer available.

See [Errors and troubleshooting](https://docs.gojinko.com/concepts/errors.md) for recovery steps.


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