Flight Bookings

1. Create a checkout session (PREBOOK)

Overview

Initiate a flight booking session by reserving the offer with the provider, creating a payment intent when you use the Stripe SDK, and discovering available ancillary services — all in a single request.

When to Use

  • Start the booking flow once a user has confirmed their flight selection
  • Collect passenger details and initiate payment processing
  • Discover add-ons like seat selection and extra baggage before final confirmation

What You Get

  • Prebook ID required to complete the booking at /flights/bookings
  • Payment intent (transactionId, secretKey) when usePaymentSdk is true — for Stripe SDK integration
  • Credit line snapshot (creditLine in the response) when you set includeCreditBalance: true and your account has an enabled credit line with payment bypass
  • Available services (servicesAttachable) including seats and baggage options
  • Booking confirmation from the provider with reservation details

Key Features

  • End-to-end prebook flow: Verifies offer → payment setup (Stripe payment intent or credit line) → books with provider → fetches services
  • Payment options: usePaymentSdk: true uses the Stripe SDK. usePaymentSdk: false is allowed when your user has payment bypass (sandbox or whitelabel) and either an enabled credit line or a whitelabel/CMI checkout (no Stripe intent; complete payment via WL and call /flights/bookings with payment.method: THIRD_PARTY and payment.token)
  • Ancillary services: Returns attachable services (seats, baggage) that can be added before final booking
  • Same shape as /book: Uses offerId instead of prebookId

Quick Start

Required fields: offerId (from search/verify), contact (name, email, phoneCountryCode, phone), passengers (with passengerType, birthday, gender, nationality, document, and name details).

Payment: Send usePaymentSdk: true for Stripe (typical). Send usePaymentSdk: false when paying on credit line or via whitelabel/CMI (requires payment bypass); otherwise you receive a validation error.

Tip: Use the servicesAttachable in the response to offer seat selection or extra baggage before calling /flights/bookings.

post/flights/prebooks

Request

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

Request body

offerIdstring required

The offerId from the search results (msgpack-encoded; unpacks to provider offerId)

usePaymentSdkboolean

If true, a Stripe payment intent is created (transactionId, secretKey). If false, payment bypass must apply and the account must use credit line or whitelabel/CMI checkout (no Stripe intent); otherwise the request is rejected.

includeCreditBalanceboolean

Optional flag to include credit line information in the response. When set to true, credit line details will be returned if the user has a credit line available.

voucherCodestring

An optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts

travelPurpose'LEISURE' | 'BUSINESS'

Optional purpose of the trip.

Example request

{
  "offerId": "h6NwaWTZJDAxOWQwNjZhLWNjMTktNzcyNi04ODM1LTEyMjFjNWRjN2UxNaJ0cMtAh471wo9cKaJtdctAJAAAAAAAAKNjdXKjVVNEo3VpZM0CeaJkZKoyMDI2LTA3LTAyonJkqjIwMjYtMDgtMDI=",
  "usePaymentSdk": true,
  "payment": {
    "descriptorSuffix": "FLIGHT",
    "paymentMethodConfiguration": "pmc_1J2K3L4M5N6O7P8Q"
  },
  "travelPurpose": "BUSINESS",
  "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"
  },
  "contact": {
    "email": "j.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "middleName": "Joshua",
    "phoneCountryCode": "33",
    "phoneNumber": "670-355-3640"
  },
  "passengers": [
    {
      "birthday": "1996-04-28",
      "documentExpiry": "2030-04-28",
      "documentIssueCountry": "US",
      "documentNumber": "123456789",
      "documentType": "passport",
      "firstName": "John",
      "gender": "M",
      "lastName": "Doe",
      "middleName": "Joshua",
      "nationality": "US",
      "title": "MR",
      "loyaltyPrograms": [
        {
          "airlineCode": "BA",
          "programNumber": "BA1234567"
        }
      ]
    }
  ]
}

Response

Prebook created successfully

Example response

{
  "data": [
    {
      "booking": {
        "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"
        },
        "selectedServices": [
          {
            "serviceId": "g6Rwc2lk2SQwMTlkMDY3NC1hMzQzLTc0OGEtYmYyYS1jMDk4ZmNjMTk2ZGGhcMtAfB6PXCj1w6Fjo1VTRA==",
            "quantity": 1
          }
        ]
      },
      "servicesAttachable": {
        "metadata": {
          "ancillaryExclusions": [
            {
              "type": "selectOne",
              "scope": "perPassenger",
              "reason": "These options are alternatives - select at most one."
            }
          ]
        }
      }
    }
  ]
}

Changes

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