travel_book_flight
Pay the escrow and request booking with passenger details. Booking is ASYNCHRONOUS: a successful response means the request was accepted, not that the ticket is issued. After this call, poll travel_get_booking_intent until intent.status is 'booked' (ticketed) or 'refunded' (booking failed and escrow was auto-refunded). Pass passengers as an array with LEAD FIRST — the lead receives all emails and refund requests authenticate against the lead's family name. The count MUST equal the offer's passenger_count (= adults searched); duplicate travellers (same name + birth date) are refused with 400 duplicate_passenger. Round-trip offers cover both directions with a single /air/book and a single escrow. The airline rejects malformed passenger fields (title not lowercase, gender not m/f, phone not E.164, …) with a 400; fix the field per the response and retry. Three 409 codes are checked BEFORE x402 settlement (refusal is free, no USDC spent): intent_expired (booking window closed — start a fresh travel_search_flights → travel_create_booking_intent flow), offer_expired (the offer left the airline's inventory — same fix, re-search), offer_repriced (live airline price no longer matches the intent; detail carries expected_ticket_amount and current_ticket_amount — quote the delta to the user and, if they accept, re-run travel_create_booking_intent so the escrow is sized to the new price). If a prior /book succeeded for this intent, retrying returns 409 booking_already_requested — do not retry; poll travel_get_booking_intent instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent_id | Yes | Booking intent ID returned by travel_create_booking_intent. | |
| passengers | Yes | Passenger list, 1 to 9 entries, LEAD PASSENGER FIRST. Must contain EXACTLY as many entries as the offer's passenger_count (= adults searched); a mismatch is rejected. The lead passenger (index 0) receives all booking emails, and refund requests authenticate against the LEAD's family name. Duplicate travellers (same given_name + family_name + born_on) are refused with 400 duplicate_passenger. All refunds are all-or-nothing per booking; there is no per-passenger cancellation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||