post_flights_bookings
Overview
Complete a flight reservation by confirming a prebook and processing payment. This is the final step in the booking flow.
When to Use
Final booking confirmation - Convert a prebook into a confirmed booking
Payment completion - Confirm with Stripe (
TRANSACTION_ID), bill an enabled credit line (CREDIT), or pay with a credit card (CREDIT_CARDvia the secure endpoint)After service selection - Book after optionally attaching seats or baggage via the services endpoint
What You Get
Confirmed booking with a unique booking ID
Payment confirmation with transaction details
Full itinerary including all segments and passenger assignments
Provider confirmation reference number
Key Features
Idempotent: Returns the existing booking (HTTP 200 +
data[0].message) if one already exists for the givenprebookId. Transient book failures are retried in place without exposing a terminal failure status. Concurrent duplicate requests while a book is in progress return HTTP 409 (45035).Payments: Stripe uses
transactionIdfrom prebook or attach-services after SDK confirmation; credit line usesCREDITwith server-side eligibility checks;CREDIT_CARDcharges the provided card immediately — send card details inbillingInfoviahttps://pci-book.liteapi.travel(contact the team to enable this on your API key)Provider confirmation: Finalizes the reservation on the provider side
Quick Start
Required fields: prebookId (from POST /flights/prebooks), payment with method and, for Stripe, transactionId
Tip: If you used POST /flights/prebooks/{prebookId}/services to attach ancillary services, use the new transactionId from that response, not the original prebook transactionId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payment | Yes | Payment for `POST /flights/bookings`: Stripe (`TRANSACTION_ID` + `transactionId`), credit line (`CREDIT`), whitelabel/CMI (`THIRD_PARTY` + `token`), or direct card via the secure endpoint (`CREDIT_CARD` + `billingInfo`). | |
| metadata | No | Optional. Encapsulates essential booking metadata, including IP, location, language, device details, and marketing parameters. | |
| prebookId | Yes | The prebookId returned by `POST /flights/prebooks` (prebook must have completed the book step). | |
| customTags | No | Optional bag of up to 5 user-defined key/value labels persisted with the booking. Keys must match `^[A-Z0-9_-]+$` (uppercase letters, digits, `-`, `_`). Values are arbitrary strings up to 255 characters. |