v1

latestOpenAPI 3.0.02026-07-247251950.2 KB
Flight Bookings

2. Complete a booking

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) or bill an enabled credit line (CREDIT)
  • 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 if one already exists for the given prebookId
  • Payments: Stripe uses transactionId from prebook or attach-services after SDK confirmation; credit line uses CREDIT with server-side eligibility checks
  • 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.

post/flights/bookings

Request body

prebookIdstring required

The prebookId returned by POST /flights/prebooks (prebook must have completed the book step).

Example request

{
  "prebookId": "019d0674-834d-7db7-9c8b-93fe8e46e7b8",
  "payment": {
    "transactionId": "tr_ABCzxy91C-a9W123"
  }
}

Response

Booking created successfully

Example response

{
  "data": [
    {
      "booking": {
        "selectedServices": [
          {
            "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
            "quantity": 1
          }
        ]
      }
    }
  ]
}