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

# Order Pay

> Use this API when you have already created the orders and want Cashfree to process the payment. To use this API S2S flag needs to be enabled
from the backend. In case you want to use the cards payment option the PCI
DSS flag is required, reach out to us by filling out the [Support Form](https://merchant.cashfree.com/merchants/landing?env=prod&raise_issue=1)".




## OpenAPI

````yaml /openapi/payments/v2023-08-01.yaml post /orders/sessions
openapi: 3.0.0
info:
  version: '2023-08-01'
  title: Cashfree Payment Gateway APIs
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  description: >-
    Cashfree's Payment Gateway APIs provide developers with a streamlined
    pathway to integrate advanced payment processing capabilities into their
    applications, platforms and websites.
servers:
  - url: https://sandbox.cashfree.com/pg
    description: Sandbox server
  - url: https://api.cashfree.com/pg
    description: Production server
security: []
tags:
  - name: Orders
    description: Collection of APIs to handle orders.
  - name: Payments
    description: Collection of APIs to handle payments.
  - name: Refunds
    description: Collection of APIs to handle refunds.
  - name: Settlements
    description: Collection of APIs to handle settlements.
  - name: Payment Links
    description: Collection of APIs to handle payment links.
  - name: Token Vault
    description: >-
      Collection of APIs to use Cashfree's token Vault. This helps you save
      cards and tokenize them in a PCI complaint manner. We support creation of
      network tokens which can be used across acquiring banks
  - name: softPOS
    description: Collection of APIs to manage softPOS' agent and order
  - name: Offers
    description: Collection of APIs to handle offers
  - name: Eligibility
    description: >-
      Collection of APIs to check eligibile entities - payment methods, offer,
      affordibility
  - name: Settlement Reconciliation
    description: Collection of APIs to handle settlements
  - name: PG Reconciliation
    description: Collection of APIs to handle reconciliation
  - name: Customers
    description: Collection of APIs to handle customers.
  - name: Easy-Split
    description: Collection of APIs to handle Easy-Split.
  - name: Simulation
    description: Collection of APIs to handle simulation.
  - name: Disputes
    description: Collection of APIs to handle disputes.
externalDocs:
  url: https://api.cashfree.com/pg
  description: This url will have the information of all the APIs.
paths:
  /orders/sessions:
    post:
      tags:
        - Payments
      summary: Order Pay
      description: >
        Use this API when you have already created the orders and want Cashfree
        to process the payment. To use this API S2S flag needs to be enabled

        from the backend. In case you want to use the cards payment option the
        PCI

        DSS flag is required, reach out to us by filling out the [Support
        Form](https://merchant.cashfree.com/merchants/landing?env=prod&raise_issue=1)".
      operationId: PGPayOrder
      parameters:
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
      requestBody:
        $ref: '#/components/requestBodies/PayOrderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayOrderEntity'
          headers:
            x-api-version:
              $ref: '#/components/headers/x-api-version'
            x-ratelimit-limit:
              $ref: '#/components/headers/x-ratelimit-limit'
            x-ratelimit-remaining:
              $ref: '#/components/headers/x-ratelimit-remaining'
            x-ratelimit-retry:
              $ref: '#/components/headers/x-ratelimit-retry'
            x-ratelimit-type:
              $ref: '#/components/headers/x-ratelimit-type'
            x-request-id:
              $ref: '#/components/headers/x-request-id'
            x-idempotency-key:
              $ref: '#/components/headers/x-idempotency-key'
            x-idempotency-replayed:
              $ref: '#/components/headers/x-idempotency-replayed'
        '400':
          $ref: '#/components/responses/Response400'
        '401':
          $ref: '#/components/responses/Response401'
        '404':
          $ref: '#/components/responses/Response404'
        '409':
          $ref: '#/components/responses/Response409'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500'
        '502':
          $ref: '#/components/responses/Response502'
      deprecated: false
      security: []
components:
  parameters:
    apiVersionHeader:
      in: header
      name: x-api-version
      required: true
      description: API version to be used. Format is in YYYY-MM-DD
      schema:
        type: string
        description: API version to be used
        default: '2023-08-01'
      example: '2023-08-01'
    xRequestIDHeader:
      in: header
      name: x-request-id
      description: >-
        Request id for the API call. Can be used to resolve tech issues.
        Communicate this in your tech related queries to cashfree
      required: false
      schema:
        type: string
      example: 4dfb9780-46fe-11ee-be56-0242ac120002
    xIdempotencyKeyHeader:
      in: header
      name: x-idempotency-key
      required: false
      description: >
        An idempotency key is a unique identifier you include with your API
        call.

        If the request fails or times out, you can safely retry it using the
        same key to avoid duplicate actions.
      schema:
        type: string
        format: UUID
      example: 47bf8872-46fe-11ee-be56-0242ac120002
  requestBodies:
    PayOrderRequest:
      description: >-
        Request body to create a transaction at cashfree using
        `payment_session_id`
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayOrderRequest'
          examples:
            issuer_guest_checkout_token_number:
              $ref: '#/components/examples/issuer_guest_checkout_token_number'
            issuer_token_number:
              $ref: '#/components/examples/issuer_token_number'
            network_guest_checkout_token_number:
              $ref: '#/components/examples/network_guest_checkout_token_number'
            plain_card:
              $ref: '#/components/examples/plain_card'
            save_card_during_payment:
              $ref: '#/components/examples/save_card_during_payment'
            saved_card:
              $ref: '#/components/examples/saved_card'
            token_card:
              $ref: '#/components/examples/token_card'
            pay_upi_intent:
              $ref: '#/components/examples/pay_upi_intent'
            pay_upi_collect:
              $ref: '#/components/examples/pay_upi_collect'
            pay_netbanking:
              $ref: '#/components/examples/pay_netbanking'
            pay_netbanking_code:
              $ref: '#/components/examples/pay_netbanking_code'
            pay_ccemi:
              $ref: '#/components/examples/pay_ccemi'
            pay_wallet_app:
              $ref: '#/components/examples/pay_wallet_app'
            pay_upi_collect_redirect:
              $ref: '#/components/examples/pay_upi_collect_redirect'
            pay_upi_qr:
              $ref: '#/components/examples/pay_upi_qr'
            pay_upi_podqr:
              $ref: '#/components/examples/pay_upi_podqr'
            pay_card_headless:
              $ref: '#/components/examples/pay_card_headless'
  schemas:
    PayOrderEntity:
      title: PayOrderEntity
      type: object
      description: Order Pay response once you create a transaction for that order
      example:
        payment_method: card
        channel: link
        action: link
        cf_payment_id: '91235'
        payment_amount: 22.42
        data:
          url: >-
            https://sandbox.cashfree.com/pg/view/gateway/FHsuvhayLM5mmhINoqri7ba296e2ebca8b98e6119f6223021a13
          payload:
            name: card
          content_type: application/x-www-form-urlencoded
          method: post
      properties:
        payment_amount:
          type: number
          description: total amount payable
        cf_payment_id:
          type: string
          description: Payment identifier created by Cashfree
          format: int64
        payment_method:
          type: string
          enum:
            - netbanking
            - card
            - upi
            - app
            - cardless_emi
            - paylater
            - banktransfer
          description: >-
            One of ["upi", "netbanking", "card", "app", "cardless_emi",
            "paylater", "banktransfer"]
        channel:
          type: string
          enum:
            - link
            - collect
            - qrcode
            - podQrCode
            - post
          description: >-
            One of ["link", "collect", "qrcode", "podQrCode"]. In an older
            version we used to support different channels like 'gpay', 'phonepe'
            etc. However, we now support only the following channels - link,
            collect, qrcode and podQrCode. To process payments using gpay, you
            will have to provide channel as 'link' and provider as 'gpay'
        action:
          type: string
          enum:
            - link
            - custom
            - form
            - post
          description: One of ["link", "custom", "form"]
        data:
          $ref: '#/components/schemas/OrderPayData'
    PayOrderRequest:
      title: PayOrderRequest
      type: object
      description: Complete object for the pay api that uses payment method objects
      properties:
        payment_session_id:
          type: string
          example: >-
            session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
        payment_method:
          oneOf:
            - $ref: '#/components/schemas/CardPaymentMethod'
            - $ref: '#/components/schemas/UPIPaymentMethod'
            - $ref: '#/components/schemas/NetBankingPaymentMethod'
            - $ref: '#/components/schemas/AppPaymentMethod'
            - $ref: '#/components/schemas/CardEMIPaymentMethod'
            - $ref: '#/components/schemas/CardlessEMIPaymentMethod'
            - $ref: '#/components/schemas/PaylaterPaymentMethod'
            - $ref: '#/components/schemas/BanktransferPaymentMethod'
          example:
            card:
              channel: link
              card_number: '4111111111111111'
              card_expiry_mm: '03'
              card_expiry_yy: '28'
              card_cvv: '123'
        save_instrument:
          type: boolean
        offer_id:
          type: string
          description: This is required if any offers needs to be applied to the order.
          example: faa6cc05-d1e2-401c-b0cf-0c9db3ff0f0b
      required:
        - payment_session_id
        - payment_method
    OrderPayData:
      title: OrderPayData
      type: object
      description: the data object pay api
      example:
        url: https://examplebank.com/sendTo/897?q
        payload:
          MD: 89811231231
          PaReq: 89123l1j2l3j1ljkkl=
        content_type: application/x-www-form-encoded
        method: post
      properties:
        url:
          type: string
        payload:
          type: object
        content_type:
          type: string
        method:
          type: string
    BadRequestError:
      title: BadRequestError
      description: Invalid request received from client
      example:
        message: bad URL, please check API documentation
        code: request_failed
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
    AuthenticationError:
      title: AuthenticationError
      description: Error if api keys are wrong
      example:
        message: authentication Failed
        code: request_failed
        type: authentication_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          description: authentication_error
    ApiError404:
      title: ApiError404
      description: Error when resource requested is not found
      example:
        message: something is not found
        code: somethind_not_found
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    ApiError409:
      title: ApiError409
      description: duplicate request
      example:
        message: order with same id is already present
        code: order_already_exists
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
          description: invalid_request_error
    IdempotencyError:
      title: IdempotencyError
      description: >-
        Error when idempotency fails. Different request body with the same
        idempotent key
      example:
        message: something is not found
        code: request_invalid
        type: idempotency_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - idempotency_error
          description: idempotency_error
    RateLimitError:
      title: RateLimitError
      description: Error when rate limit is breached for your api
      example:
        message: Too many requests from IP. Check headers
        code: request_failed
        type: rate_limit_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - rate_limit_error
          description: rate_limit_error
    ApiError:
      title: ApiError
      description: Error at cashfree's server
      example:
        message: internal Server Error
        code: internal_error
        type: api_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        type:
          type: string
          enum:
            - api_error
          description: api_error
    ApiError502:
      title: ApiError502
      description: Error when there is error at partner bank
      example:
        message: something is not found
        code: bank_processing_failure
        type: api_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          description: >
            `bank_processing_failure` will be returned here to denote failure at
            bank.
        type:
          type: string
          enum:
            - api_error
          description: api_error
    CardPaymentMethod:
      title: CardPaymentMethod
      description: >-
        The card payment object is used to make payment using either plain card
        number, saved card instrument id or using cryptogram
      example:
        card:
          channel: link
          card_number: '4111111111111111'
          card_holder_name: Tushar Gupta
          card_expiry_mm: '06'
          card_expiry_yy: '22'
          card_cvv: '900'
      type: object
      properties:
        card:
          $ref: '#/components/schemas/Card'
      required:
        - card
    UPIPaymentMethod:
      title: UPIPaymentMethod
      description: Complete payment method for UPI collect
      example:
        upi:
          channel: collect
          upi_id: rajnandan1@okxdfcbank
      type: object
      properties:
        upi:
          $ref: '#/components/schemas/Upi'
      required:
        - upi
    NetBankingPaymentMethod:
      title: NetBankingPaymentMethod
      description: Payment method for netbanking object
      example:
        netbanking:
          channel: link
          netbanking_bank_code: 3022
      type: object
      properties:
        netbanking:
          $ref: '#/components/schemas/Netbanking'
      required:
        - netbanking
    AppPaymentMethod:
      title: AppPaymentMethod
      description: App payment method
      example:
        app:
          channel: link
          provider: gpay
          phone: '8474090552'
      type: object
      properties:
        app:
          $ref: '#/components/schemas/App'
      required:
        - app
    CardEMIPaymentMethod:
      title: CardEMIPaymentMethod
      description: Complete card emi payment method
      example:
        emi:
          channel: link
          card_number: '4111111111111111'
          card_holder_name: Tushar Gupta
          card_expiry_mm: '06'
          card_expiry_yy: '22'
          card_cvv: '900'
          card_bank_name: kotak
          emi_tenure: 3
      type: object
      properties:
        emi:
          $ref: '#/components/schemas/CardEMI'
      required:
        - emi
    CardlessEMIPaymentMethod:
      title: CardlessEMIPaymentMethod
      description: cardless EMI payment method object
      example:
        channel: link
        provider: flexmoney
        phone: 781234121
      type: object
      properties:
        cardless_emi:
          $ref: '#/components/schemas/CardlessEMI'
      required:
        - cardless_emi
    PaylaterPaymentMethod:
      title: PaylaterPaymentMethod
      description: paylater payment method
      example:
        paylater:
          channel: link
          phone: '781234121'
          provider: lazypay
      type: object
      properties:
        paylater:
          $ref: '#/components/schemas/Paylater'
      required:
        - paylater
    BanktransferPaymentMethod:
      title: BanktransferPaymentMethod
      description: banktransfer payment method
      example:
        banktransfer:
          channel: link
      type: object
      properties:
        banktransfer:
          $ref: '#/components/schemas/Banktransfer'
      required:
        - banktransfer
    Card:
      title: Card
      description: Card Payment method
      required:
        - channel
      example:
        channel: link
        card_number: '4111111111111111'
        card_holder_name: Tushar Gupta
        card_expiry_mm: '06'
        card_expiry_yy: '22'
        card_cvv: '900'
      type: object
      properties:
        channel:
          type: string
          enum:
            - link
            - post
          description: >-
            The channel for card payments can be "link" or "post". Post is used
            for seamless OTP payments where merchant captures OTP on their own
            page.
        card_number:
          type: string
          description: >-
            Customer card number for plain card transactions. Token pan number
            for tokenized card transactions.
        card_holder_name:
          type: string
          description: Customer name mentioned on the card.
        card_expiry_mm:
          type: string
          description: >-
            Card expiry month for plain card transactions. Token expiry month
            for tokenized card transactions.
        card_expiry_yy:
          type: string
          description: >-
            Card expiry year for plain card transactions. Token expiry year for
            tokenized card transactions.
        card_cvv:
          type: string
          description: CVV mentioned on the card.
        instrument_id:
          type: string
          description: >-
            instrument id of saved card. Required only to make payment using
            saved instrument.
        cryptogram:
          type: string
          description: >-
            cryptogram received from card network. Required only for tokenized
            card transactions.
        token_requestor_id:
          type: string
          description: >-
            TRID issued by card networks. Required only for tokenized card
            transactions.
        token_reference_id:
          type: string
          description: >-
            Token Reference Id provided by Diners for Guest Checkout Token. 
            Required only for Diners cards.
        token_type:
          enum:
            - ISSUER_TOKEN
            - NETWORK_GC_TOKEN
            - ISSUER_GC_TOKEN
          type: string
        card_display:
          type: string
          description: >-
            last 4 digits of original card number. Required only for tokenized
            card transactions.
        card_alias:
          type: string
          description: Card alias as returned by Cashfree Vault API.
        card_bank_name:
          type: string
          enum:
            - Kotak
            - ICICI
            - RBL
            - BOB
            - Standard Chartered
          description: >-
            One of ["Kotak", "ICICI", "RBL", "BOB", "Standard Chartered"]. Card
            bank name, required for EMI payments. This is the bank user has
            selected for EMI
        emi_tenure:
          type: integer
          description: EMI tenure selected by the user
    Upi:
      title: Upi
      description: UPI collect payment method object
      example:
        channel: collect
        upi_id: john@okxdfcbak
        upi_expiry_minutes: 10
      type: object
      properties:
        channel:
          type: string
          enum:
            - link
            - collect
            - qrcode
            - podQrCode
          description: >-
            Specify the channel through which the payment must be processed. Can
            be one of ["link", "collect", "qrcode", "podQrCode"]
        upi_id:
          type: string
          description: |
            Customer UPI VPA to process payment. 
            ### Important
            This is a required parameter for channel = `collect`
        upi_redirect_url:
          type: boolean
          description: >
            use this if you want cashfree to show a loader. Sample response
            below. It is only supported for collect

            `action:collect` will be returned with `data.url` having the link
            for redirection
        upi_expiry_minutes:
          type: number
          description: >-
            The UPI request remains valid for the specified expiry time,
            measured in minutes. This parameter applies to all UPI collect
            payment requests, with a default expiry time of 5 minutes. The
            expiry time must be set within a range of 5 to 15 minutes. For UPI
            link or QR code requests, the default expiry time depends on the
            transaction completion time. While the expiry duration can be
            configured for any number of minutes, this feature is supported only
            by banking partners that allow it.
        authorize_only:
          type: boolean
          description: >-
            For one time mandate on UPI. Set this as authorize_only = true.
            Please note that you can only use the "collect" channel if you are
            sending a one time mandate request
        authorization:
          $ref: '#/components/schemas/UPIAuthorizeDetails'
      required:
        - channel
    Netbanking:
      title: Netbanking
      description: Netbanking payment method request body
      example:
        channel: link
        netbanking_bank_code: 3022
      type: object
      properties:
        channel:
          type: string
          description: The channel for netbanking will always be `link`
        netbanking_bank_code:
          type: integer
          format: int32
          description: Bank code
          pattern: ^\d{4}$
        netbanking_bank_name:
          type: string
          format: BANKR
          description: String code for bank
          pattern: ^[A-Z]{5}$
      required:
        - channel
    App:
      title: App
      description: App payment method
      example:
        channel: link
        provider: gpay
        phone: '8474090552'
      type: object
      properties:
        channel:
          type: string
          description: Specify the channel through which the payment must be processed.
        provider:
          type: string
          enum:
            - gpay
            - phonepe
            - ola
            - paytm
            - amazon
            - airtel
            - freecharge
            - mobikwik
            - jio
          description: Specify the provider through which the payment must be processed.
        phone:
          type: string
          description: Customer phone number associated with a wallet for payment.
      required:
        - channel
        - provider
        - phone
    CardEMI:
      title: CardEMI
      description: Payment method for card emi
      required:
        - channel
        - card_number
        - card_expiry_mm
        - card_expiry_yy
        - card_cvv
        - card_bank_name
        - emi_tenure
      example:
        channel: link
        card_bank_name: hdfc
        card_number: '4111111111111111'
        card_holder_name: Tushar Gupta
        card_expiry_mm: '06'
        card_expiry_yy: '22'
        card_cvv: '900'
        emi_tenure: 3
      type: object
      properties:
        channel:
          type: string
          description: The channel for card payments will always be "link"
        card_number:
          type: string
          description: Customer card number.
        card_holder_name:
          type: string
          description: Customer name mentioned on the card.
        card_expiry_mm:
          type: string
          description: Card expiry month.
        card_expiry_yy:
          type: string
          description: Card expiry year.
        card_cvv:
          type: string
          description: CVV mentioned on the card.
        card_alias:
          type: string
          description: Card alias as returned by Cashfree Vault API
        card_bank_name:
          type: string
          enum:
            - hdfc
            - kotak
            - icici
            - rbl
            - bob
            - standard chartered
            - axis
            - au
            - 'yes'
            - sbi
            - fed
            - hsbc
            - citi
            - amex
          description: >-
            Card bank name, required for EMI payments. This is the bank user has
            selected for EMI. One of ["hdfc, "kotak", "icici", "rbl", "bob",
            "standard chartered", "axis", "au", "yes", "sbi", "fed", "hsbc",
            "citi", "amex"]
        emi_tenure:
          type: integer
          description: EMI tenure selected by the user
    CardlessEMI:
      title: CardlessEMI
      description: Request body for cardless emi payment method
      example:
        channel: link
        provider: kotak
        phone: '7768913241'
        emi_tenure: 3
      type: object
      properties:
        channel:
          type: string
          description: The channel for cardless EMI is always `link`
        provider:
          type: string
          enum:
            - flexmoney
            - zestmoney
            - hdfc
            - icici
            - cashe
            - idfc
            - kotak
            - snapmint
            - bharatx
          description: >-
            One of [`flexmoney`, `zestmoney`, `hdfc`, `icici`, `cashe`, `idfc`,
            `kotak`, `snapmint`, `bharatx`]
        phone:
          type: string
          description: >-
            Customers phone number for this payment instrument. If the customer
            is not eligible you will receive a 400 error with type as
            'invalid_request_error' and code as 'invalid_request_error'
        emi_tenure:
          type: integer
          description: >-
            EMI tenure for the selected provider. This is mandatory when
            provider is one of [`hdfc`, `icici`, `cashe`, `idfc`, `kotak`]
    Paylater:
      title: Paylater
      description: Paylater payment method
      example:
        channel: link
        provider: kotak
        phone: '7789112345'
      type: object
      properties:
        channel:
          type: string
          description: The channel for cardless EMI is always `link`
        provider:
          type: string
          enum:
            - kotak
            - flexipay
            - zestmoney
            - lazypay
            - olapostpaid
            - simpl
            - freechargepaylater
          description: >-
            One of ["kotak", "flexipay", "zestmoney", "lazypay",
            "olapostpaid","simpl", "freechargepaylater"]. Please note that
            Flexipay is offered by HDFC bank
        phone:
          type: string
          description: >-
            Customers phone number for this payment instrument. If the customer
            is not eligible you will receive a 400 error with type as
            'invalid_request_error' and code as 'invalid_request_error'
    Banktransfer:
      title: Banktransfer
      description: Banktransfer payment method
      example:
        channel: link
      type: object
      properties:
        channel:
          type: string
          description: The channel for cardless EMI is always `link`
    UPIAuthorizeDetails:
      title: UPIAuthorizeDetails
      description: object when you are using preauth in UPI in order pay
      example:
        authorization:
          approve_by: '2022-07-02T10:20:12+05:30'
          start_time: '2022-09-21T12:34:34Z'
          end_time: '2022-10-22T12:34:34Z'
      type: object
      properties:
        approve_by:
          type: string
          description: Time by which this authorization should be approved by the customer.
        start_time:
          type: string
          description: This is the time when the UPI one time mandate will start
        end_time:
          type: string
          description: >-
            This is the time when the UPI mandate will be over. If the mandate
            has not been executed by this time, the funds will be returned back
            to the customer after this time.
  headers:
    x-api-version:
      schema:
        type: string
        format: YYYY-MM-DD
        enum:
          - '2022-09-01'
      description: >-
        This header has the version of the API. The current version is
        `2022-09-01`.
    x-ratelimit-limit:
      schema:
        type: integer
      example: 200
      description: Ratelimit set for your account for this API per minute
    x-ratelimit-remaining:
      schema:
        type: integer
      example: 2
      description: >-
        Rate limit remaning for your account for this API in the next minute.
        Uses sliding window
    x-ratelimit-retry:
      schema:
        type: integer
      example: 4
      description: |
        Contains number of seconds to wait if rate limit is breached
        - Is 0 if withing the limit
        - Is between 1 and 59 if breached
    x-ratelimit-type:
      schema:
        type: string
        enum:
          - app_id
          - ip
      example: ip
      description: >
        either ip or app_id

        - `ip` if making a call from the browser. True for api where you don't
        need `x-client-id` and `x-client-secret`

        - `app_id` for authenticated api calls i.e using `x-client-id` and
        `x-client-secret`
    x-request-id:
      schema:
        type: string
      example: some-req-id
      description: >-
        Request id for your api call. Is blank or null if no `x-request-id` is
        sent during the request
    x-idempotency-key:
      schema:
        type: string
      example: some-idem-id
      description: >-
        An idempotency key is a unique identifier you include with your API
        call. If the request fails or times out, you can safely retry it using
        the same key to avoid duplicate actions.
    x-idempotency-replayed:
      schema:
        type: string
        format: boolean
      example: 'true'
      description: |-
        In conjunction with `x-idempotency-key` this means
        - `true` if the response was replayed
        - `false` if the response has not been replayed
  responses:
    Response400:
      description: Bad request error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response401:
      description: Authentication Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthenticationError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response404:
      description: Resource Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError404'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response409:
      description: Resource already present
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError409'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response422:
      description: Idempotency error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IdempotencyError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response429:
      description: Rate Limit Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response500:
      description: API related Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
    Response502:
      description: Bank related Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError502'
      headers:
        x-api-version:
          $ref: '#/components/headers/x-api-version'
        x-ratelimit-limit:
          $ref: '#/components/headers/x-ratelimit-limit'
        x-ratelimit-remaining:
          $ref: '#/components/headers/x-ratelimit-remaining'
        x-ratelimit-retry:
          $ref: '#/components/headers/x-ratelimit-retry'
        x-ratelimit-type:
          $ref: '#/components/headers/x-ratelimit-type'
        x-request-id:
          $ref: '#/components/headers/x-request-id'
        x-idempotency-key:
          $ref: '#/components/headers/x-idempotency-key'
        x-idempotency-replayed:
          $ref: '#/components/headers/x-idempotency-replayed'
  examples:
    issuer_guest_checkout_token_number:
      description: Pay using Issuer Guest Checkout Token
      summary: Pay using Issuer Guest Checkout Token
      value:
        payment_method:
          card:
            card_cvv: '900'
            card_display: '3243'
            card_expiry_mm: '03'
            card_expiry_yy: '26'
            card_number: '4111111111111111'
            channel: link
            cryptogram: AQBBBBBBZatIlaIAmWKSghwBBBB=
            token_requestor_id: '22457512314'
            token_type: ISSUER_GC_TOKEN
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
    issuer_token_number:
      description: Pay using Issuer Token Number
      summary: Pay using Issuer Token Number
      value:
        payment_method:
          card:
            card_cvv: '900'
            card_display: '3243'
            card_expiry_mm: '03'
            card_expiry_yy: '26'
            card_number: '4111111111111111'
            channel: link
            cryptogram: AQBBBBBBZatIlaIAmWKSghwBBBB=
            token_requestor_id: '22457512314'
            token_type: ISSUER_TOKEN
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
    network_guest_checkout_token_number:
      description: Pay using Network Guest Checkout Token
      summary: Pay using Network Guest Checkout Token
      value:
        payment_method:
          card:
            card_cvv: '900'
            card_display: '3243'
            card_expiry_mm: '03'
            card_expiry_yy: '26'
            card_number: '4111111111111111'
            channel: link
            cryptogram: AQBBBBBBZatIlaIAmWKSghwBBBB=
            token_requestor_id: '22457512314'
            token_type: NETWORK_GC_TOKEN
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
    plain_card:
      summary: Pay using plain card
      description: Plain card payment method
      value:
        payment_session_id: session__someidwhichislongandhasnumbers1232132andcharacterscn
        payment_method:
          card:
            channel: link
            card_number: '4111111111111111'
            card_holder_name: Tushar Gupta
            card_expiry_mm: '06'
            card_expiry_yy: '22'
            card_cvv: '900'
    save_card_during_payment:
      summary: Plain card + save card
      description: Save a plain card for future payments
      value:
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
        payment_method:
          card:
            channel: link
            card_number: '4111111111111111'
            card_holder_name: Tushar Gupta
            card_expiry_mm: '06'
            card_expiry_yy: '22'
            card_cvv: '900'
        save_instrument: true
    saved_card:
      summary: Instrument id of saved card
      description: pay using instrument id or saved card
      value:
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
        payment_method:
          card:
            channel: link
            instrument_id: 54deabb4-ba45-4a60-9e6a-9c016fe7ab10
            card_cvv: '900'
    token_card:
      summary: Card network token and cryptogram
      description: Pay using card network token and cryptogram
      value:
        payment_session_id: >-
          session__CvcEmNKDkmERQrxnx39ibhJ3Ii034pjc8ZVxf3qcgEXCWlgDDlHRgz2XYZCqpajDQSXMMtCusPgOIxYP2LZx0-05p39gC2Vgmq1RAj--gcn
        payment_method:
          card:
            channel: link
            card_number: '4111111111111111'
            card_expiry_mm: '03'
            card_expiry_yy: '26'
            cryptogram: AQBBBBBBZatIlaIAmWKSghwBBBB=
            card_cvv: '900'
            token_requestor_id: '22457512314'
            card_display: '3243'
    pay_upi_intent:
      description: UPI intent. Opens UPI APP. Mobile only
      summary: UPI Intent
      value:
        payment_session_id: session__someidwhichislongandhasnumbers1232132andcharacterscn
        payment_method:
          upi:
            channel: link
    pay_upi_collect:
      description: Customer will receive a notification on their phone to pay via UPI
      summary: UPI Collect
      value:
        payment_session_id: session_cChK4rQ9
        payment_method:
          upi:
            channel: collect
            upi_id: testsuccess@gocash
    pay_netbanking:
      description: Pay by netbanking name
      summary: NetBanking By Name
      value:
        payment_session_id: session_someid
        payment_method:
          netbanking:
            channel: link
            netbanking_bank_name: TESTR
    pay_netbanking_code:
      description: Pay by netbanking Code
      summary: NetBanking By Code
      value:
        payment_session_id: session_someid
        payment_method:
          netbanking:
            channel: link
            netbanking_bank_code: 3021
    pay_ccemi:
      description: Use Credit Card EMI 3 months
      summary: CreditCard EMI
      value:
        payment_session_id: session_ccemi
        payment_method:
          emi:
            channel: link
            card_number: '4748461111111111'
            card_expiry_mm: '12'
            card_expiry_yy: '24'
            card_cvv: '123'
            card_bank_name: ICICI
            emi_tenure: 3
    pay_wallet_app:
      description: Pay using PhonePe Wallet
      summary: Wallet/APP
      value:
        payment_session_id: session_ehHbh0NXtVqlWwKS3acRxeT0uz5t8uLZ
        payment_method:
          app:
            provider: phonepe
            channel: link
            phone: '8474090589'
    pay_upi_collect_redirect:
      description: Redirect to loader page for UPI Collect
      summary: UPI Collect Loader Page
      value:
        payment_session_id: session_ehHbh0NXtVqlWwKS3acRxeT0uz5QuzHYgIBt8uLZ
        payment_method:
          upi:
            channel: collect
            upi_id: rajnandan1@oksomebank
            upi_redirect_url: true
    pay_upi_qr:
      description: Get a `base64` QR Image
      summary: QR Code
      value:
        payment_session_id: session_somesessionid
        payment_method:
          upi:
            channel: qrcode
    pay_upi_podqr:
      description: Get a `base64` QR Image
      summary: POD QR Code
      value:
        payment_session_id: session_somesessionid
        payment_method:
          upi:
            channel: podQrCode
    pay_card_headless:
      description: Zero redirect Card Payment
      summary: Card Headless OTP
      value:
        payment_session_id: session_cChK4rQ9
        payment_method:
          card:
            channel: post
            card_number: '4111111111111111'
            card_expiry_mm: '03'
            card_expiry_yy: '25'
            card_cvv: '326'

````