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), bill an enabled credit line (CREDIT), pay with a credit card (CREDIT_CARD via the secure endpoint), or charge the card stored on your account (ACC_CREDIT_CARD)
  • 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 given prebookId. 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 transactionId from prebook or attach-services after SDK confirmation; credit line uses CREDIT with server-side eligibility checks; CREDIT_CARD charges the provided card immediately — send card details in billingInfo via https://pci-book.liteapi.travel (contact the team to enable this on your API key); ACC_CREDIT_CARD charges the card saved on your account immediately, with no card details in the request (in sandbox it simulates the booking without a charge)
  • 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

  • Base URL
    https://api.liteapi.travel/v3.0
  • URL
    https://api.liteapi.travel/v3.0/flights/bookings
  • Auth
    API key in header X-API-Key

Request body

prebookIdstring required

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

customTagsobject

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.

Example request

{
  "prebookId": "019d0674-834d-7db7-9c8b-93fe8e46e7b8",
  "payment": {
    "transactionId": "tr_cts_t0LaZePPxdCM_Kyskafml"
  },
  "customTags": {
    "SOURCE": "EXAMPLE",
    "TIER": "GOLD"
  },
  "metadata": {
    "ip": "203.112.45.67",
    "country": "FR",
    "language": "fr-FR",
    "platform": "Windows",
    "device_id": "device-abc-789",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
    "utm_medium": "organic",
    "utm_source": "bing",
    "utm_campaign": "spring_2026"
  }
}

Response

Idempotent replay — an existing booking for this prebookId is returned

Example response

{
  "data": [
    {
      "booking": {
        "customTags": {
          "SOURCE": "EXAMPLE",
          "TIER": "GOLD"
        },
        "status": "CONFIRMED",
        "journey": {
          "segments": [
            {
              "stops": [
                {
                  "airportCode": "GIG",
                  "airportName": "Rio Galeão – Tom Jobim International Airport",
                  "arrivalTime": "2026-10-17T18:35:00",
                  "departureTime": "2026-10-17T19:25:00",
                  "duration": {
                    "iso8601": "PT50M",
                    "minutes": 50
                  }
                }
              ]
            }
          ],
          "baggage": {
            "included": [
              {
                "bagType": "cabin",
                "description": "1 cabin bag up to 8 kg",
                "passengerType": "ADT",
                "pieces": 1,
                "size": "55x40x20",
                "unit": "kg",
                "weightKg": 8
              }
            ],
            "paid": [
              {
                "bagType": "cabin",
                "description": "1 cabin bag up to 8 kg",
                "passengerType": "ADT",
                "pieces": 1,
                "size": "55x40x20",
                "unit": "kg",
                "weightKg": 8
              }
            ]
          },
          "terms": {
            "summary": [
              {
                "level": "warning",
                "message": "Changes allowed with fee"
              }
            ]
          },
          "cabinClass": "ECONOMY"
        },
        "ticketedServices": [
          {
            "services": [
              {
                "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
                "quantity": 1
              }
            ],
            "soldServices": [
              {
                "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
                "quantity": 1
              }
            ]
          }
        ]
      },
      "message": "a booking already exists for this prebookId; returning the existing booking"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.