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

# Create Order

> ### Order
An order is an entity which has a amount and currency associated with it. It is something for which you want to collect payment for.
Use this API to create orders with Cashfree from your backend to get a `payment_sessions_id`. 
You can use the `payment_sessions_id` to create a transaction for the order.




## OpenAPI

````yaml openapi/payments/v2025-01-01.yaml post /orders
openapi: 3.0.0
info:
  version: '2025-01-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.
  - name: Utilities
    description: Collection of APIs for utility requirement.
externalDocs:
  url: https://api.cashfree.com/pg
  description: This url will have the information of all the APIs.
paths:
  /orders:
    post:
      tags:
        - Orders
      summary: Create Order
      description: >
        ### Order

        An order is an entity which has a amount and currency associated with
        it. It is something for which you want to collect payment for.

        Use this API to create orders with Cashfree from your backend to get a
        `payment_sessions_id`. 

        You can use the `payment_sessions_id` to create a transaction for the
        order.
      operationId: PGCreateOrder
      parameters:
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
      requestBody:
        $ref: '#/components/requestBodies/CreateOrderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderEntity'
          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'
      callbacks:
        PaymentWebhook:
          $ref: '#/components/callbacks/PaymentWebhook'
      deprecated: false
      security:
        - XClientID: []
          XClientSecret: []
        - XClientID: []
          XPartnerAPIKey: []
        - XClientID: []
          XClientSignatureHeader: []
        - XPartnerMerchantID: []
          XPartnerAPIKey: []
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: '2025-01-01'
      example: '2025-01-01'
      x-ignore: true
    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:
    CreateOrderRequest:
      description: Request body to create an order at cashfree
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateOrderRequest'
          examples:
            order_minimum:
              $ref: '#/components/examples/order_minimum'
            order_orderid:
              $ref: '#/components/examples/order_orderid'
            order_customer:
              $ref: '#/components/examples/order_customer'
            order_with_return_url:
              $ref: '#/components/examples/order_with_return_url'
            order_with_payment_methods:
              $ref: '#/components/examples/order_with_payment_methods'
            order_expiry:
              $ref: '#/components/examples/order_expiry'
            order_note:
              $ref: '#/components/examples/order_note'
            order_tags:
              $ref: '#/components/examples/order_tags'
            order_splits_amount:
              $ref: '#/components/examples/order_splits_amount'
            order_splits_cent:
              $ref: '#/components/examples/order_splits_cent'
            order_invoice:
              $ref: '#/components/examples/order_invoice'
            order_customer_tpv:
              $ref: '#/components/examples/order_customer_tpv'
            order_payment_methods_filters:
              $ref: '#/components/examples/order_with_payment_methods_filters'
  schemas:
    OrderEntity:
      title: OrderEntity
      type: object
      description: The complete order entity
      example:
        $ref: '#/components/examples/order_entity_list_example/value/0'
      properties:
        cf_order_id:
          type: string
          description: unique id generated by cashfree for your order
        order_id:
          type: string
          description: order_id sent during the api request
        entity:
          type: string
          description: Type of the entity.
        order_currency:
          type: string
          description: Currency of the order. Example INR
        order_amount:
          type: number
        order_status:
          type: string
          description: >-
            Possible values are 

            - `ACTIVE`: Order does not have a sucessful transaction yet

            - `PAID`: Order is PAID with one successful transaction

            - `EXPIRED`: Order was not PAID and not it has expired. No
            transaction can be initiated for an EXPIRED order.

            `TERMINATED`: Order terminated

            `TERMINATION_REQUESTED`: Order termination requested
        payment_session_id:
          type: string
        order_expiry_time:
          type: string
        order_note:
          type: string
          description: Additional note for order
        created_at:
          type: string
          description: When the order was created at cashfree's server
          example: '2022-08-16T14:45:38+05:30'
        order_splits:
          type: array
          items:
            $ref: '#/components/schemas/VendorSplit'
        customer_details:
          $ref: '#/components/schemas/CustomerDetailsResponse'
        order_meta:
          $ref: '#/components/schemas/OrderMeta'
        order_tags:
          $ref: '#/components/schemas/OrderTags'
        cart_details:
          $ref: '#/components/schemas/CartDetailsEntity'
        terminal_data:
          $ref: '#/components/schemas/TerminalData'
        products:
          type: object
          description: >-
            Configurations for the products like One Click Checkout, Verify and
            Pay, if they are enabled for your account
          properties:
            one_click_checkout:
              $ref: '#/components/schemas/ProductDetailsEntity'
            verify_pay:
              $ref: '#/components/schemas/ProductDetailsEntity'
    CreateOrderRequest:
      title: CreateOrderRequest
      description: Request body to create an order at cashfree
      type: object
      properties:
        order_id:
          type: string
          description: >-
            Order identifier present in your system. Alphanumeric, '_' and '-'
            only
          minLength: 3
          maxLength: 45
          example: your-order-id
        order_amount:
          type: number
          description: >-
            Bill amount for the order. Provide upto two decimals. 10.15 means Rs
            10 and 15 paisa. For orders in non-INR currency, please refer to
            [supported
            amounts](https://www.cashfree.com/docs/payments/cross-border/international-payment-gateway/currencies-supported#decimal-support)
            per currency.
          format: double
          example: 10.15
          minimum: 1
        order_currency:
          type: string
          description: >-
            Currency for the order. INR if left empty. For support currency
            list, refer
            [here](https://www.cashfree.com/docs/payments/cross-border/international-payment-gateway/currencies-supported#full-currency-list).
            Contact care@cashfree.com to enable new currencies.
          example: INR
        cart_details:
          allOf:
            - $ref: '#/components/schemas/CartDetails'
        customer_details:
          allOf:
            - $ref: '#/components/schemas/CustomerDetails'
          example:
            customer_id: 7112AAA812234
            customer_email: john@cashfree.com
            customer_phone: '9908734801'
        terminal:
          allOf:
            - $ref: '#/components/schemas/TerminalDetails'
          example:
            terminal_phone_no: '6309291183'
            terminal_id: terminal-1212
            terminal_type: SPOS
        order_meta:
          allOf:
            - $ref: '#/components/schemas/OrderMeta'
          example:
            return_url: https://www.cashfree.com/devstudio/thankyou
            payment_methods: cc,dc
        order_expiry_time:
          type: string
          format: ISO8601
          description: >-
            Time after which the order expires. Customers will not be able to
            make the payment beyond the time specified here. We store timestamps
            in IST, but you can provide them in a valid ISO 8601 time format.
            Example 2021-07-02T10:20:12+05:30 for IST, 2021-07-02T10:20:12Z for
            UTC
          example: '2021-07-02T10:20:12+05:30'
        order_note:
          type: string
          description: Order note for reference.
          example: Test order
          minLength: 3
          maxLength: 200
        order_tags:
          allOf:
            - $ref: '#/components/schemas/OrderTags'
          example:
            name: John Doe
            city: Bangalore
        order_splits:
          type: array
          description: >-
            If you have Easy split enabled in your Cashfree account then you can
            use this option to split the order amount.
          items:
            $ref: '#/components/schemas/VendorSplit'
          example:
            - amount: 10
              vendor: john
        products:
          title: products
          type: object
          description: >-
            Use this to set configurations for the products like One Click
            Checkout, Verify and Pay, if they are enabled for your account
          properties:
            one_click_checkout:
              allOf:
                - $ref: '#/components/schemas/ProductDetails'
            verify_pay:
              allOf:
                - $ref: '#/components/schemas/ProductDetails'
      required:
        - order_amount
        - order_currency
        - customer_details
    VendorSplit:
      title: VendorSplit
      description: >-
        Use to split order when cashfree's Easy Split is enabled for your
        account.
      type: object
      example:
        vendor_id: Vendor01
        amount: 100.12
        description: order amount should be more than equal to 100.12
      properties:
        vendor_id:
          type: string
          description: Vendor id created in Cashfree system
        amount:
          type: number
          description: Amount which will be associated with this vendor
        percentage:
          type: number
          description: Percentage of order amount which shall get added to vendor account
        tags:
          type: object
          maxProperties: 15
          description: >-
            Custom Tags in thr form of {"key":"value"} which can be passed for
            an order. A maximum of 10 tags can be added
          additionalProperties:
            type: object
      required:
        - vendor_id
    CustomerDetailsResponse:
      title: CustomerDetailsResponse
      description: >-
        The customer details that are necessary. Note that you can pass dummy
        details if your use case does not require the customer details.
      example:
        customer_id: 7112AAA812234
        customer_email: john@cashfree.com
        customer_phone: '9908734801'
        customer_name: John Doe
        customer_bank_account_number: '1518121112'
        customer_bank_ifsc: XITI0000001
        customer_bank_code: 3333
        customer_uid: 54deabb4-ba45-4a60-9e6a-9c016fe7ab10
      type: object
      properties:
        customer_id:
          type: string
          description: A unique identifier for the customer. Use alphanumeric values only.
          minLength: 3
          maxLength: 50
        customer_email:
          type: string
          description: Customer email address.
          minLength: 3
          maxLength: 100
        customer_phone:
          type: string
          description: Customer phone number.
          minLength: 10
          maxLength: 10
        customer_name:
          type: string
          description: Name of the customer.
          minLength: 3
          maxLength: 100
        customer_bank_account_number:
          type: string
          description: >-
            Customer bank account. Required if you want to do a bank account
            check (TPV)
          minLength: 3
          maxLength: 20
        customer_bank_ifsc:
          type: string
          description: >-
            Customer bank IFSC. Required if you want to do a bank account check
            (TPV)
        customer_bank_code:
          type: number
          description: >-
            Customer bank code. Required for net banking payments, if you want
            to do a bank account check (TPV)
        customer_uid:
          type: string
          description: >-
            Customer identifier at Cashfree. You will get this when you
            create/get customer
    OrderMeta:
      title: OrderMeta
      description: >-
        Optional meta details to control how the customer pays and how payment
        journey completes
      type: object
      properties:
        return_url:
          type: string
          example: https://www.cashfree.com/devstudio/thankyou
          description: >-
            The URL to which user will be redirected to after the payment on
            bank OTP page. Maximum length: 250. We suggest to keep context of
            order_id in your return_url so that you can identify the order when
            customer lands on your page. Example of return_url format could be
            https://www.cashfree.com/devstudio/thankyou
        notify_url:
          type: string
          example: https://example.com/cf_notify
          description: >-
            Notification URL for server-server communication. Useful when user's
            connection drops while re-directing. NotifyUrl should be an https
            URL. Maximum length: 250.
        payment_methods:
          example: cc,dc,upi
          description: >-
            Allowed payment modes for this order. Pass comma-separated values
            among following options - "cc", "dc", "ccc",
            "ppc","nb","upi","paypal","app","paylater","cardlessemi","dcemi","ccemi","banktransfer".
            Leave it blank to show all available payment methods
        payment_methods_filters:
          description: >-
            Allowed payment modes for this order. Along with multiple filters
            for cards can be added to this key. And this filtering will be
            honoured during transaction creation.
          type: object
          properties:
            methods:
              description: >-
                Allowed payment modes for this order. credit_card, debit_card,
                netbanking, paylater, etc are the values that can be passed to
                this parameter.
              type: object
              properties:
                action:
                  type: string
                  description: >-
                    It accepts value of "ALLOW" and allows only those modes
                    present in it's neighbouring parameter "values"
                values:
                  type: array
                  items:
                    type: string
                  description: >-
                    The accepted entries for this paramter are "debit_card,
                    credit_card, prepaid_card, upi, wallet, netbanking,
                    banktransfer, paylater, paypal, debit_card_emi,
                    credit_card_emi, upi_credit_card, upi_ppi, cardless_emi,
                    account_based_payment, corporate_credit_card,
                    sbc_debit_card, sbc_emandate, sbc_upi, sbc_credit_card"
            filters:
              description: >-
                This object takes details of all the filtering that has to be
                done for this order. Filters on card bins, card schemes, card
                issuing bank and card suffixes
              type: object
              properties:
                card_emi_tenure:
                  description: Allowed card emi tenure for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those bins
                        present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: integer
                      description: List of tenure to be allowed for the order
                card_emi_bins:
                  description: Allowed card bins for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those bins
                        present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card bins to be allowed for the order
                card_emi_schemes:
                  description: Allowed card schemes for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        schemes present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card schemes to be allowed for the order
                card_emi_suffix:
                  description: Allowed card suffixes for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        suffixes present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card suffixes to be allowed for the order
                card_emi_issuing_bank:
                  description: Allowed card issuing bank for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        issuing bank present in it's neighbouring parameter
                        "values"
                    values:
                      items:
                        type: string
                      type: array
                      description: List of card issuing bank to be allowed for the order
                card_bins:
                  description: Allowed card bins for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those bins
                        present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card bins to be allowed for the order
                card_schemes:
                  description: Allowed card schemes for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        schemes present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card schemes to be allowed for the order
                card_suffix:
                  description: Allowed card suffixes for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        suffixes present in it's neighbouring parameter "values"
                    values:
                      type: array
                      items:
                        type: string
                      description: List of card suffixes to be allowed for the order
                card_issuing_bank:
                  description: Allowed card issuing bank for the order
                  type: object
                  properties:
                    action:
                      type: string
                      description: >-
                        It accepts value of "ALLOW" and allows only those
                        issuing bank present in it's neighbouring parameter
                        "values"
                    values:
                      items:
                        type: string
                      type: array
                      description: List of card issuing bank to be allowed for the order
    OrderTags:
      type: object
      maxProperties: 15
      description: >-
        Custom Tags in thr form of {"key":"value"} which can be passed for an
        order. A maximum of 10 tags can be added
      additionalProperties:
        type: string
        minLength: 1
        maxLength: 255
      example:
        product: Laptop
        shipping_address: 123 Main St
    CartDetailsEntity:
      title: CartDetailsEntity
      description: Cart Details in the Order Entity Response
      type: object
      properties:
        cart_id:
          type: string
          description: ID of the cart that was created
    TerminalData:
      description: Terminal Data in the create order response
      example:
        agent_mobile_number: '9876543214'
        cf_terminal_id: 1838
        merchant_terminal_id: ahdsgadjhgfaj7137e
        terminal_type: STOREFRONT
      properties:
        agent_mobile_number:
          type: string
        cf_terminal_id:
          type: integer
        merchant_terminal_id:
          type: string
        terminal_type:
          type: string
      title: TerminalData
      type: object
    ProductDetailsEntity:
      type: object
      description: Configurations for this feature
      properties:
        enabled:
          type: boolean
          description: Whether the feature has been enabled for this order
        conditions:
          type: array
          description: Configured condtions for the feature
          items:
            $ref: '#/components/schemas/ProductConditionsEntity'
    BadRequestError:
      title: BadRequestError
      description: Invalid request received from client
      example:
        message: bad URL, please check API documentation
        help: >-
          Check latest errors and resolution from Merchant Dashboard API logs:
          https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9
        code: request_failed
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        help:
          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
        help: >-
          Check latest errors and resolution from Merchant Dashboard API logs:
          https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9
        code: somethind_not_found
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        help:
          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
        help: >-
          Check latest errors and resolution from Merchant Dashboard API logs:
          https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9
        code: order_already_exists
        type: invalid_request_error
      type: object
      properties:
        message:
          type: string
        help:
          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
        help: >-
          Check latest errors and resolution from Merchant Dashboard API logs:
          https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9
        code: request_invalid
        type: idempotency_error
      type: object
      properties:
        message:
          type: string
        help:
          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
        help: >-
          Check latest errors and resolution from Merchant Dashboard API logs:
          https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9
        code: internal_error
        type: api_error
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        help:
          type: string
        type:
          type: string
          enum:
            - api_error
          description: api_error
    CartDetails:
      title: CartDetails
      description: >-
        The cart details that are necessary like shipping address, billing
        address and more.
      type: object
      properties:
        customer_note:
          type: string
        shipping_charge:
          type: number
          format: double
        cart_name:
          type: string
          description: Name of the cart.
        customer_shipping_address:
          $ref: '#/components/schemas/CartAddress'
        customer_billing_address:
          $ref: '#/components/schemas/CartAddress'
        cart_items:
          type: array
          items:
            $ref: '#/components/schemas/CartItem'
    CustomerDetails:
      title: CustomerDetails
      description: >-
        The customer details that are necessary. Note that you can pass dummy
        details if your use case does not require the customer details.
      example:
        customer_id: 7112AAA812234
        customer_email: john@cashfree.com
        customer_phone: '9908734801'
        customer_name: John Doe
        customer_bank_account_number: '1518121112'
        customer_bank_ifsc: XITI0000001
        customer_bank_code: 3333
        customer_uid: 54deabb4-ba45-4a60-9e6a-9c016fe7ab10
      type: object
      properties:
        customer_id:
          type: string
          description: A unique identifier for the customer. Use alphanumeric values only.
          minLength: 3
          maxLength: 50
        customer_email:
          type: string
          description: Customer email address.
          minLength: 3
          maxLength: 100
        customer_phone:
          type: string
          description: Customer phone number.
          minLength: 10
          maxLength: 10
        customer_name:
          type: string
          description: Name of the customer.
          minLength: 3
          maxLength: 100
        customer_bank_account_number:
          type: string
          description: >-
            Customer bank account. Required if you want to do a bank account
            check (TPV)
          minLength: 3
          maxLength: 20
        customer_bank_ifsc:
          type: string
          description: >-
            Customer bank IFSC. Required if you want to do a bank account check
            (TPV)
        customer_bank_code:
          type: number
          description: >-
            Customer bank code. Required for net banking payments, if you want
            to do a bank account check (TPV)
        customer_uid:
          type: string
          description: >-
            Customer identifier at Cashfree. You will get this when you
            create/get customer
      required:
        - customer_id
        - customer_phone
    TerminalDetails:
      description: Use this if you are creating an order for cashfree's softPOS
      example:
        added_on: '2023-08-04T13:12:58+05:30'
        cf_terminal_id: '31051123'
        last_updated_on: '2023-09-06T14:07:00+05:30'
        terminal_address: Banglore
        terminal_id: terminal-123
        terminal_name: test
        terminal_note: POS vertical
        terminal_phone_no: '6309291183'
        terminal_status: ACTIVE
        terminal_type: SPOS
      properties:
        added_on:
          description: date time at which terminal is added
          type: string
        cf_terminal_id:
          description: >-
            Cashfree terminal id, this is a required parameter when you do not
            provide the terminal phone number.
          type: integer
        last_updated_on:
          description: last instant when this terminal was updated
          type: string
        terminal_address:
          description: location of terminal
          type: string
        terminal_id:
          description: terminal id for merchant reference
          maxLength: 100
          minLength: 3
          type: string
        terminal_name:
          description: name of terminal/agent/storefront
          type: string
        terminal_note:
          description: note given by merchant while creating the terminal
          type: string
        terminal_phone_no:
          description: >-
            mobile num of the terminal/agent/storefront,This is a required
            parameter when you do not provide the cf_terminal_id.
          type: string
        terminal_status:
          description: status of terminal active/inactive
          type: string
        terminal_type:
          description: >-
            To identify the type of terminal product in use, in this case it is
            SPOS.
          maxLength: 10
          minLength: 4
          type: string
      required:
        - terminal_type
      title: Terminal
      type: object
    ProductDetails:
      type: object
      description: Specify the required configurations for this feature
      properties:
        enabled:
          type: boolean
          description: Option to enable or disable the feature
        conditions:
          type: array
          description: >-
            The conditions array allows to configure rules by adding condition
            objects with specific parameters for feature configurations.
          items:
            $ref: '#/components/schemas/ProductConditions'
    ProductConditionsEntity:
      type: object
      properties:
        action:
          type: string
          description: >-
            The Action key in the conditions array specifies whether a condition
            is allowed or denied for the specified rule or feature
        key:
          type: string
          description: key of the condition
          maxLength: 50
        values:
          type: array
          description: Values set for the condition
          maxItems: 10
          items:
            type: string
    CartAddress:
      title: CartAddress
      description: Address given for cart details.
      properties:
        full_name:
          type: string
        country:
          type: string
        city:
          type: string
        state:
          type: string
        pincode:
          type: string
        address_1:
          type: string
        address_2:
          type: string
    CartItem:
      title: CartItem
      description: Each item in the cart.
      properties:
        item_id:
          type: string
          description: Unique identifier of the item
        item_name:
          type: string
          description: Name of the item
        item_description:
          type: string
          description: Description of the item
        item_tags:
          type: array
          items:
            type: string
          description: Tags attached to that item
        item_details_url:
          type: string
          description: Item details url
        item_image_url:
          type: string
          description: Item image url
        item_original_unit_price:
          type: number
          format: double
          description: Original price
        item_discounted_unit_price:
          type: number
          format: double
          description: Discounted Price
        item_currency:
          type: string
          description: Currency of the item.
        item_quantity:
          type: number
          format: int32
          description: Quantity if that item
    ProductConditions:
      type: object
      properties:
        action:
          type: string
          description: >-
            The Action key in the conditions array specifies whether a condition
            should "ALLOW" or "DENY" the specified rule or feature
        key:
          type: string
          description: Specify what you're trying to configure, such as "features"
          maxLength: 50
        values:
          type: array
          description: >-
            Define the values you need to set within the conditions in this
            array, such as "checkoutCollectAddress", "checkoutAuthenticate"
          maxItems: 10
          items:
            type: string
  headers:
    x-api-version:
      schema:
        type: string
        format: YYYY-MM-DD
        enum:
          - '2025-01-01'
      description: >-
        This header has the version of the API. The current version is
        `2025-01-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'
  examples:
    order_minimum:
      summary: Minimun required details
      description: Minimum set of parameters needed to create an order at cashfree
      value:
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
    order_orderid:
      summary: Specify your order_id
      description: >-
        You should always send `order_id`. If not sent Cashfree will generate
        one for you. This is useful during other api calls
      value:
        order_id: playstation_purchase_1
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9908734801'
    order_customer:
      summary: Customer Details
      description: Complete customer details
      value:
        order_id: playstation_purchase_1
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9908734801'
          customer_email: john@example.com
          customer_name: John Doe
    order_with_return_url:
      summary: With return/callback URL
      description: add a return url to your order
      value:
        order_id: playstation_purchase_2
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_meta:
          return_url: https://www.cashfree.com/devstudio/thankyou
    order_with_payment_methods:
      summary: With Payment Methods URL
      description: >-
        add payment methods, customer can pnly pay using these payment methods
        only
      value:
        order_id: playstation_purchase_4
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_meta:
          return_url: https://www.cashfree.com/devstudio/thankyou
          payment_methods: cc,dc,upi
    order_expiry:
      summary: With future expiry time for order
      description: >-
        Add an exipry time for your order. No transactions would be accepted
        after the order has expired
      value:
        order_id: playstation_purchase_5
        order_currency: INR
        order_amount: 10.34
        order_expiry_time: '2021-07-29T00:00:00.000Z'
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
    order_note:
      summary: With additonal note
      description: >-
        Add an additional note for your order which you can later use. It has to
        be string. For more detailed data use `order_tags`
      value:
        order_id: playstation_purchase_6
        order_currency: INR
        order_amount: 10.34
        order_note: John buying playstation
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
    order_tags:
      summary: With order tags
      description: Add key value pairs to your order. Can be used later in your workflow
      value:
        order_id: playstation_purchase_6
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_tags:
          address: Bengaluru, India
          pincode: '560034'
    order_splits_amount:
      summary: With order split Amount
      description: >-
        Create an order where the amount received will be split between vendor
        and merchant based on absolute amount.
      value:
        order_id: playstation_purchase_8
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_splits:
          - vendor_id: Jane
            amount: 1.45
            tags:
              address: Hyderabad
          - vendor_id: Barbie
            amount: 3.45
            tags:
              address: Bengaluru, India
    order_splits_cent:
      summary: With order split Percentage
      description: >
        Create an order where the amount received will be split between vendors
        and merchant based on percentage.

        In the below example order amount, let us say INR 200 will be divided
        like this

        - 33% to merchant becomes INR 66 

        - 20% to Jane becomes INR 40

        - 47% to Barbie becomes INR 94
      value:
        order_id: playstation_purchase_8
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_splits:
          - vendor_id: Jane
            percentage: 20
          - vendor_id: Barbie
            percentage: 47
    order_invoice:
      summary: With order invoice
      description: Add invoice details for your order
      value:
        order_id: playstation_purchase_6
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_tags:
          gst: '1'
          gstin: 27AAFCN5072P1ZV
          invoice_date: '2023-06-20T04:35:16.748Z'
          invoice_number: inv1687149916474
          invoice_link: https://example.com/cf/nextgen.php#section-2
          invoice_name: Walters Invoice
          cgst: '1'
          sgst: '1'
          igst: '1'
          cess: '1'
          gst_incentive: '1'
          gst_percentage: '1'
          pincode: '560034'
          city_tier: TIER1
    order_customer_tpv:
      summary: Customer TPV
      description: >-
        Customer with bank details if provided he or she can pay by only that
        bank account
      value:
        order_id: playstation_purchase_1
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_name: John Doe
          customer_phone: '9908734801'
          customer_email: john@example.com
          customer_bank_ifsc: XDFC0000045
          customer_bank_account_number: '123124123123123'
          customer_bank_code: 3021
    order_with_payment_methods_filters:
      summary: With Payment Methods Filters
      description: >-
        add payment methods, customer can pnly pay using these payment methods
        only
      value:
        order_id: playstation_purchase_4
        order_currency: INR
        order_amount: 10.34
        customer_details:
          customer_id: 7112AAA812234
          customer_phone: '9898989898'
        order_meta:
          return_url: https://www.cashfree.com/devstudio/thankyou
          payment_methods_filters:
            method:
              action: ALLOW
              values:
                - debit_card
                - credit_card
                - credit_card_emi
                - debit_card_emi
            filters:
              card_bins:
                action: ALLOW
                values:
                  - 441144
                  - 554455
              card_schemes:
                action: ALLOW
                values:
                  - VISA
                  - MASTERCARD
              card_suffix:
                action: ALLOW
                values:
                  - 4433
                  - 8910
              card_emi_bins:
                action: ALLOW
                values:
                  - 441144
                  - 554455
              card_emi_schemes:
                action: ALLOW
                values:
                  - VISA
                  - MASTERCARD
              card_emi_suffix:
                action: ALLOW
                values:
                  - 4433
                  - 8910
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client app ID. You can find your app id in the [merchant
        dashboard](https://telr.cashfree.com/merchants/pg/developers/api-keys?env=prod).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret in the [merchant
        dashboard](https://telr.cashfree.com/merchants/pg/developers/api-keys?env=prod).
    XPartnerAPIKey:
      type: apiKey
      in: header
      name: x-partner-apikey
      description: >-
        If you are partner and you are making an api call on behalf of a
        merchant
    XClientSignatureHeader:
      type: apiKey
      in: header
      name: x-client-signature
      description: >-
        Use this if you do not want to pass the secret key and instead want to
        use signature
    XPartnerMerchantID:
      type: apiKey
      in: header
      name: x-partner-merchantid
      description: >-
        If you are partner use this to specify the merchant id if you don't have
        the merchant client app id

````