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

# Booking pipeline: price check, guests, review, confirmation

> How Omnibeds books a room: the supplier confirms the price, every guest is named by the supplier's rules, the agent reviews, and unconfirmed bookings go to reconciliation.

Omnibeds never books the price a search showed. It asks the supplier to confirm the price first, then books with the guests' names, and only then gives the booking its own `WH-` reference. The same four steps serve a direct booking and a quote being converted. The code is in `lib/booking/service.ts`, and the page in `components/book/`.

Back
Next

## Step 1: the supplier confirms the price

The check-rate step (`checkOffer`) handles every way an offer can have changed since the search:

| What happened | What Omnibeds does |
| - | - |
| The price is the same | Shows it with the agency's selling price and moves on. |
| The price changed | Shows the old and new price side by side. The agent accepts the new one or goes back. |
| The offer's reference expired, or the supplier rejects it | Searches again for the same product and continues with the refreshed offer, with a notice. |
| The product is gone | Says it's no longer available and offers a new search. |
| The offer is held (an option on the room) | A valid hold keeps the price and keeps the offer bookable even after its reference expired. |

For a direct booking, Omnibeds also looks for the same product cheaper from another supplier and offers to switch. A quote books exactly what was quoted, so it skips this.

## Step 2: every guest is named

Each room's guests are named one by one. Saved travellers can fill the rows, and a booking can be added to a trip here.

Before going on, the names are checked against the supplier's own rules, and the rule is shown in the screen. For example, RateHawk accepts letters and a few punctuation marks (no digits), forbids placeholder names, and needs at least one adult with a real name in every room. A name the supplier would refuse blocks the step.

A name still marked as a placeholder ("Dummy", "Test") is asked about at confirmation, not blocked, for suppliers that accept it.

## Step 3: review and confirm

The agent sees the hotel, room, board, dates, every guest, the cancellation timeline and the total, then confirms.

## Step 4: the booking is made

**1. The supplier books**

The adapter sends the booking with every guest, room by room.

**2. If the offer expired at the last moment**

Nothing is booked. Omnibeds checks the price again and answers `OFFER_REFRESHED` (409) with the new check, and the page goes back to step 1. A different price is never booked silently.

**3. The selling price is worked out on the server**

From the price the supplier booked, with the agency's margin rules. The browser never sends the selling price. A selling price the agent set on a quoted option is kept.

**4. Our record is saved**

The booking gets its `WH-` reference, the supplier's reference, every room and traveller, its cancellation policy and a history of events.

### Confirmed, or waiting for the supplier

Some suppliers accept a booking and confirm it a little later. Then the booking is saved as `reconciliation_needed` with a "pending" event, and reconciliation finishes it. See [Reconciliation and jobs](https://demo-travel.webbinghub.io/docs/pipelines/jobs.md).

| Step | What happens |
| - | - |
| 1. Price check | The supplier confirms the price. Changed prices are shown old and new; expired offers are refreshed by searching again; held offers keep their price. |
| 2. Guests | Every guest is named, checked against the supplier's name rules. Saved travellers fill rows; a trip can be chosen. |
| 3. Review | Hotel, room, dates, guests, cancellation timeline and total. Placeholder names are asked about. |
| 4. Book | The supplier books. An offer that expired at the last moment books nothing and returns to step 1. The selling price is computed on the server. |
| 5. Confirmed or pending | Confirmed bookings show both references. Pending ones go to reconciliation. |


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