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

# Book a Flight

> Confirm a flight booking with passenger details



## OpenAPI

````yaml api-reference/openapi.json POST /pms/api/external/request/flights/book/
openapi: 3.1.0
info:
  title: PayVessel API
  description: >-
    PayVessel API for accepting payments, sending money, verifying identities,
    and managing wallets
  version: 1.0.0
servers:
  - url: https://api.payvessel.com
  - url: https://sandbox.payvessel.com
security:
  - {}
paths:
  /pms/api/external/request/flights/book/:
    post:
      tags:
        - Flights
      summary: Book a Flight
      description: >-
        Book a selected flight with full passenger details. Returns a PayVessel
        reference and a booking ID. Issue the ticket after collecting payment
        from your customer.
      operationId: flightBook
      parameters:
        - name: api-key
          in: header
          description: Your PayVessel public API key
          required: true
          schema:
            type: string
        - name: api-secret
          in: header
          description: Your PayVessel API secret
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightBookRequest'
            examples:
              adultSinglePax:
                summary: Single adult passenger
                value:
                  flightKey: a1b2c3d4e5f6...
                  contactEmail: traveller@example.com
                  contactPhone: '08031234567'
                  passengers:
                    - firstName: Amina
                      lastName: Ibrahim
                      title: Mrs
                      dateOfBirth: '1988-03-22'
                      gender: Female
                      passengerType: Adult
                      nationality: NGA
                      passportNumber: A12345678
                      passportExpiryDate: '2030-03-22'
                      email: amina.ibrahim@example.com
                      phoneNumber: '08031234567'
      responses:
        '201':
          description: Flight booked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlightBookResponse'
              examples:
                booked:
                  summary: Booking confirmed
                  value:
                    status: true
                    message: Flight booked successfully
                    data:
                      reference: FLT-A1B2C3D4E5F6
                      booking:
                        bookingId: BK-20260820-98765
                        status: BOOKED
                        airline: Arik Air
                        flightNumber: W3 204
                        origin: LOS
                        destination: ABV
                        departureTime: '2026-08-20T06:30:00'
                        passengers:
                          - firstName: Amina
                            lastName: Ibrahim
                            passengerType: Adult
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — flight booking access not enabled for this business
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Flight service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FlightBookRequest:
      type: object
      required:
        - flightKey
        - passengers
        - contactEmail
        - contactPhone
      properties:
        flightKey:
          type: string
        contactEmail:
          type: string
          format: email
        contactPhone:
          type: string
        passengers:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/FlightPassenger'
    FlightBookResponse:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            reference:
              type: string
              description: PayVessel booking reference
            booking:
              type: object
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    FlightPassenger:
      type: object
      required:
        - firstName
        - lastName
        - title
        - dateOfBirth
        - gender
        - passengerType
        - nationality
      properties:
        firstName:
          type: string
        lastName:
          type: string
        title:
          type: string
          enum:
            - Mr
            - Mrs
            - Ms
            - Dr
            - Prof
        dateOfBirth:
          type: string
          format: date
        gender:
          type: string
          enum:
            - Male
            - Female
        passengerType:
          type: string
          enum:
            - Adult
            - Child
            - Infant
        nationality:
          type: string
          description: ISO 3-letter country code (e.g. NGA)
        passportNumber:
          type: string
          description: Required for international flights
        passportExpiryDate:
          type: string
          format: date
        email:
          type: string
          format: email
        phoneNumber:
          type: string

````