> ## 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.

# Create a Razorpay order

> Returns a Razorpay order for the session's locked amount. Open Razorpay Checkout with it, then call `/confirm` with the result. Payment is authorised first and captured only after the fare is checked again.



## OpenAPI

````yaml /api-reference/openapi.yaml post /bookings/session/{id}/payment
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}/payment:
    post:
      tags:
        - Payments
      summary: Create a Razorpay order
      description: >-
        Returns a Razorpay order for the session's locked amount. Open Razorpay
        Checkout with it, then call `/confirm` with the result. Payment is
        authorised first and captured only after the fare is checked again.
      parameters:
        - $ref: '#/components/parameters/SessionId'
      responses:
        '200':
          description: The order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '410':
          $ref: '#/components/responses/Expired'
        '502':
          $ref: '#/components/responses/Upstream'
components:
  parameters:
    SessionId:
      name: id
      in: path
      required: true
      description: The `sessionId` from `POST /bookings/session`.
      schema:
        type: string
  schemas:
    Order:
      type: object
      properties:
        test:
          type: boolean
        razorpayKeyId:
          type:
            - string
            - 'null'
        orderId:
          type: string
          example: order_...
        amount:
          type: integer
          description: In the smallest unit (paise for INR).
          example: 641200
        currency:
          type: string
          example: INR
    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
  responses:
    NotFound:
      description: No such session or booking for your account.
      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'
    Expired:
      description: '`session_expired`: sessions last 30 minutes.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Upstream:
      description: Temporarily unavailable. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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.