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

# Confirm a booking

> For the Razorpay order flow only. Verifies the payment, checks the fare again and issues the ticket. If the fare moved or ticketing fails, the traveller is refunded automatically.



## OpenAPI

````yaml /api-reference/openapi.yaml post /bookings/session/{id}/confirm
openapi: 3.1.0
info:
  title: Skye Flights API
  version: '1.0'
  description: Search and book real flights for your users. Skye is the Merchant of Record.
servers:
  - url: https://api.flyskye.ai/v1
security:
  - accessToken: []
tags:
  - name: Authentication
  - name: Flights
  - name: Booking sessions
  - name: Payments
  - name: Bookings
paths:
  /bookings/session/{id}/confirm:
    post:
      tags:
        - Payments
      summary: Confirm a booking
      description: >-
        For the Razorpay order flow only. Verifies the payment, checks the fare
        again and issues the ticket. If the fare moved or ticketing fails, the
        traveller is refunded automatically.
      parameters:
        - $ref: '#/components/parameters/SessionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - razorpay
              properties:
                razorpay:
                  type: object
                  required:
                    - orderId
                    - paymentId
                    - signature
                  properties:
                    orderId:
                      type: string
                    paymentId:
                      type: string
                    signature:
                      type: string
      responses:
        '200':
          description: The booking.
          content:
            application/json:
              schema:
                type: object
                properties:
                  bookingId:
                    type: string
                  pnr:
                    type:
                      - string
                      - 'null'
                    example: ABC123
                  status:
                    type: string
                    example: confirmed
                  pending:
                    type: boolean
                    description: Paid and waiting on the airline to confirm.
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    SessionId:
      name: id
      in: path
      required: true
      description: The `sessionId` from `POST /bookings/session`.
      schema:
        type: string
  responses:
    BadRequest:
      description: '`invalid_json`, `invalid_request` or `traveller_count`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The session or booking is not in a state that allows this. See the error
        code.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: departDate cannot be in the past
            field:
              type: string
              example: departDate
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: An access token (`sat_...`) from `POST /token`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.