> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mysubwallet.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Book Flight

> Confirm price, debit wallet and issue a ticket. Requires KYC. Auto-refunds on failure.



## OpenAPI

````yaml POST /api/flight/book
openapi: 3.1.0
info:
  title: mySubwallet API
  version: 1.0.0
  description: >-
    Buy data, airtime, cable, electricity, exam pins, bulk SMS, betting, eSIM,
    flights, recharge/data cards and more, funded from your wallet. Test
    everything safely with your sandbox (sk_test_) key — no wallet charge.
servers:
  - url: https://api.mysubwallet.ng
    description: Production (live — charges your wallet)
  - url: https://sandbox.mysubwallet.ng
    description: Sandbox (test — simulated, no wallet charge)
security:
  - TokenAuth: []
tags:
  - name: Purchases
  - name: Verification
  - name: Betting
  - name: eSIM
  - name: Flights
  - name: Wallet
  - name: Catalogs
  - name: Account
paths:
  /api/flight/book:
    post:
      tags:
        - Flights
      summary: Book Flight
      description: >-
        Confirm price, debit wallet and issue a ticket. Requires KYC.
        Auto-refunds on failure.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - flight_id
                - passengers
              properties:
                flight_id:
                  type: string
                  description: Offer id from Search Flights.
                  example: offer_123
                passengers:
                  type: array
                  items:
                    type: object
                    properties:
                      passenger_type:
                        type: string
                        enum:
                          - adult
                          - child
                          - infant
                      title:
                        type: string
                        enum:
                          - mr
                          - mrs
                          - miss
                          - ms
                      first_name:
                        type: string
                      last_name:
                        type: string
                      dob:
                        type: string
                        format: date
                      gender:
                        type: string
                        enum:
                          - male
                          - female
                      email:
                        type: string
                      phone_number:
                        type: string
      responses:
        '200':
          description: Booking
          content:
            application/json:
              example:
                status: success
                data:
                  reference: MSW123
                  pnr: ABC123
                  status: issued
                  amount: 85000
components:
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your API key as `Token <your_api_key>`.


        Use your **live key** for real transactions, or your **sandbox key**
        (`sk_test_…`) to test — sandbox calls return a realistic simulated
        result and never touch your wallet. Add `"sandbox_status": "fail"` to
        any sandbox request to simulate a failure.

````