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

# Create Subscription

> Use this API to create a new subscription.



## OpenAPI

````yaml /openapi/payments/v2025-01-01.yaml post /subscriptions
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.
  - name: Downtimes
    description: Collection of APIs for managing downtimes.
externalDocs:
  url: https://api.cashfree.com/pg
  description: This url will have the information of all the APIs.
paths:
  /subscriptions:
    post:
      tags:
        - Subscription
      summary: Create Subscription
      description: Use this API to create a new subscription.
      operationId: SubsCreateSubscription
      parameters:
        - $ref: '#/components/parameters/apiVersionHeader'
        - $ref: '#/components/parameters/xRequestIDHeader'
        - $ref: '#/components/parameters/xIdempotencyKeyHeader'
      requestBody:
        $ref: '#/components/requestBodies/CreateSubscriptionRequest'
      responses:
        '200':
          description: Success response for creating a new subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionEntity'
          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'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500'
      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:
    CreateSubscriptionRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSubscriptionRequest'
      description: Request parameters to create a new subscription.
  schemas:
    SubscriptionEntity:
      title: SubscriptionEntity
      type: object
      example:
        authorisation_details:
          authorization_amount: 1
          authorization_amount_refund: false
          authorization_reference: ''
          authorization_time: '2025-06-01T23:47:52+05:30'
          authorization_status: INITIALIZED
          payment_id: '97877'
          payment_group: enach
          payment_method:
            enach:
              channel: link
              auth_mode: NetBanking
              account_type: SAVINGS
              account_number: '123456789012'
              account_ifsc: SBIN0000123
              account_holder_name: John Doe
              account_bank_code: SBIN
        cf_subscription_id: '4'
        customer_details:
          customer_name: John Doe
          customer_email: test@gmail.com
          customer_phone: '9900755700'
          customer_bank_account_holder_name: ''
          customer_bank_account_number: ''
          customer_bank_ifsc: ''
          customer_bank_code: ''
          customer_bank_account_type: ''
        next_schedule_date: null
        plan_details:
          plan_id: od-20k-plan
          plan_name: On demand plan for 20000 max amount
          plan_type: ON_DEMAND
          plan_max_cycles: 0
          plan_recurring_amount: 0
          plan_max_amount: 20000
          plan_interval_type: ''
          plan_intervals: 0
          plan_currency: INR
          plan_note: ''
          plan_status: ''
        subscription_expiry_time: '2100-01-01T05:29:59+05:30'
        subscription_first_charge_time: ''
        subscription_id: SUB0028
        subscription_meta:
          return_url: ''
        subscription_note: ''
        subscription_session_id: subs_token_tc9JCN4MzUIJ
        subscription_payment_splits: null
        subscription_status: INITIALIZED
        subscription_tags: null
      properties:
        authorisation_details:
          $ref: '#/components/schemas/AuthorizationDetails'
        cf_subscription_id:
          type: string
          description: Cashfree subscription reference number.
        customer_details:
          $ref: '#/components/schemas/SubscriptionCustomerDetails'
        plan_details:
          $ref: '#/components/schemas/PlanEntity'
        subscription_expiry_time:
          type: string
          description: >-
            Time at which the subscription will expire. We store timestamps in
            IST.
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
        subscription_first_charge_time:
          type: string
          description: >-
            Time at which the first charge will be made for the subscription.
            Applicable only for PERIODIC plans. Cashfree stores timestamps in
            IST.
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
        subscription_id:
          type: string
          description: A unique ID passed by merchant for identifying the subscription.
        subscription_meta:
          type: object
          description: Subscription metadata.
          properties:
            return_url:
              type: string
              description: Return URL for the subscription.
        subscription_note:
          type: string
          description: Note for the subscription.
        subscription_session_id:
          type: string
          description: Subscription Session Id.
        subscription_payment_splits:
          type: array
          description: Payment splits for the subscription.
          items:
            $ref: '#/components/schemas/SubscriptionPaymentSplitItem'
        subscription_status:
          type: string
          description: >-
            Status of the subscription. For more details, see [Subscription
            Lifecycle](https://www.cashfree.com/docs/payments/subscription/create#subscription-lifecycle).
        subscription_tags:
          type: object
          description: Tags for the subscription.
        next_schedule_date:
          type: string
          description: >-
            The date on which the next payment is scheduled to be processed.
            Cashfree stores timestamps in IST. For ON_DEMAND plans this will be
            null .
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
    CreateSubscriptionRequest:
      title: CreateSubscriptionRequest
      example:
        subscription_id: Demo_Subscription
        customer_details:
          customer_name: john
          customer_email: john@dummy.com
          customer_phone: '9908730221'
          customer_bank_account_holder_name: John Doe
          customer_bank_account_number: '59108290701802'
          customer_bank_ifsc: HDFC0002614
          customer_bank_code: HDFC
          customer_bank_account_type: SAVINGS
        plan_details:
          plan_name: plan12345
          plan_type: PERIODIC
          plan_amount: 10
          plan_max_amount: 100
          plan_max_cycles: 100
          plan_intervals: 2
          plan_currency: INR
          plan_interval_type: WEEK
          plan_note: Bi-weekly INR 10 plan
        authorization_details:
          authorization_amount: 100
          authorization_amount_refund: true
          payment_methods:
            - enach
            - pnach
            - upi
            - card
        subscription_meta:
          return_url: https://wa.me/9512440440?text=Payment%20Successfull
          notification_channel:
            - EMAIL
            - SMS
          session_id_expiry: '2025-06-01T23:00:08+05:30'
        subscription_expiry_time: '2100-01-01T23:00:08+05:30'
        subscription_first_charge_time: '2025-06-01T23:00:08+05:30'
        subscription_tags:
          psp_note: Monthly subscription payment
          key2: value2
        subscription_payment_splits:
          - vendor_id: vendor1
            percentage: 10
          - vendor_id: vendor2
            percentage: 10
      properties:
        subscription_id:
          type: string
          description: >-
            A unique ID for the subscription. It can include alphanumeric
            characters, underscore, dot, hyphen, and space. Maximum characters
            allowed is 250.
          minLength: 1
          maxLength: 250
        customer_details:
          $ref: '#/components/schemas/SubscriptionCustomerDetails'
        plan_details:
          type: object
          properties:
            plan_id:
              type: string
              description: >-
                The unique identifier used to create plan. You only need to pass
                this field if you had already created plan. Otherwise use the
                other fields here to define the plan.
            plan_name:
              type: string
              description: Specify plan name for easy reference.
              maxLength: 40
            plan_type:
              type: string
              description: >-
                Possible values ON_DEMAND or PERIODIC. PERIODIC - Payments are
                triggered automatically at fixed intervals defined by the
                merchant. ON_DEMAND - Merchant needs to trigger/charge the
                customer explicitly with the required amount.
            plan_currency:
              type: string
              description: >-
                INR by default. For subscriptions in non-INR currency, please
                refer to [supported
                currencies](https://www.cashfree.com/docs/payments/international-payments/ipg/currencies-supported#full-currency-list).
            plan_amount:
              type: number
              format: float64
              description: >-
                The amount to be charged for PERIODIC plan. This is a
                conditional parameter, only required for PERIODIC plans.
            plan_max_amount:
              type: number
              format: float64
              description: >-
                This is the maximum amount that can be charged on a
                subscription.
            plan_max_cycles:
              type: integer
              description: >-
                Maximum number of debits set for the plan. The subscription will
                automatically change to COMPLETED status once this limit is
                reached.
            plan_intervals:
              type: integer
              description: >-
                Number of intervals of intervalType between every subscription
                payment. For example, to charge a customer bi-weekly use
                intervalType as “week” and intervals as 2. Required for PERIODIC
                plan. The default value is 1.
            plan_interval_type:
              type: string
              description: >-
                The type of interval for a PERIODIC plan like DAY, WEEK, MONTH,
                or YEAR. This is a conditional parameter only applicable for
                PERIODIC plans.
            plan_note:
              type: string
              description: Note for the plan.
        authorization_details:
          type: object
          properties:
            authorization_amount:
              type: number
              format: float64
              description: >-
                Authorization amount for the auth payment. Please note that
                authorization_amount will always be 0 for ENACH.
            authorization_amount_refund:
              type: boolean
              description: >-
                Indicates whether the authorization amount should be refunded to
                the customer automatically. Merchants can use this field to
                specify if the authorized funds should be returned to the
                customer after authorization of the subscription.
            payment_methods:
              type: array
              description: >-
                Payment methods for the subscription. enach, pnach, upi, card
                are possible values.
              items:
                type: string
        subscription_meta:
          type: object
          properties:
            return_url:
              type: string
              description: The url to redirect after checkout.
            notification_channel:
              type: array
              description: >-
                Notification channel for the subscription. SMS, EMAIL are
                possible values.
              items:
                type: string
            session_id_expiry:
              type: string
              description: Expiry date for the subscription session.
        subscription_expiry_time:
          type: string
          description: >-
            Expiry date for the subscription. Cashfree stores timestamps in IST,
            but you can provide them in a valid ISO 8601 time format.


            For IST this `2025-06-01T10:20:12+05:30` translates to `2025-06-01
            10:20:12` 

             For UTC this `2025-06-01T10:20:12Z` translates to `2025-06-01 15:50:12+05:30`.
        subscription_first_charge_time:
          type: string
          description: >-
            Time at which the first charge will be made for the subscription
            after authorization. Applicable only for PERIODIC plans. Cashfree
            stores timestamps in IST, but you can provide them in a valid ISO
            8601 time format.


            For IST this `2025-06-01T10:20:12+05:30` translates to `2025-06-01
            10:20:12` 

             For UTC this `2025-06-01T10:20:12Z` translates to `2025-06-01 15:50:12+05:30`.
        subscription_tags:
          type: object
          nullable: true
          maxProperties: 10
          description: >-
            Custom Tags in the form of {"key":"value"} which can be passed for a
            subscription. A maximum of 10 tags can be added.
          properties:
            psp_note:
              type: string
              description: Note shown on the customer's PSP.
              minLength: 1
              maxLength: 255
          additionalProperties:
            type: string
            description: Custom key-value pairs.
            minLength: 1
            maxLength: 255
          example:
            psp_note: Monthly subscription payment
            custom_field: value
        subscription_payment_splits:
          type: array
          description: Payment splits for the subscription.
          items:
            $ref: '#/components/schemas/SubscriptionPaymentSplitItem'
      required:
        - subscription_id
        - customer_details
        - plan_details
    AuthorizationDetails:
      title: AuthorizationDetails
      description: >-
        Details of the authorization done for the subscription. Returned in Get
        subscription and payments.
      type: object
      example:
        authorization_amount: 1
        authorization_amount_refund: false
        authorization_reference: ''
        authorization_time: '2025-06-01T23:47:52+05:30'
        authorization_status: INITIALIZED
        payment_id: '97877'
        payment_group: upi
        payment_method:
          upi:
            channel: collect
            upi_id: test@upi
            upi_instrument: upiInstrument
            upi_instrument_number: '1234567890'
            upi_payer_account_number: '039861903074'
            upi_payer_ifsc: SBIN0001234
      properties:
        authorization_amount:
          type: number
          format: float64
          description: >-
            Authorization amount for the auth payment. Please note that
            authorization_amount will always be 0 for ENACH.
        authorization_amount_refund:
          type: boolean
          description: >-
            Indicates whether the authorization amount should be refunded to the
            customer automatically. Merchants can use this field to specify if
            the authorized funds should be returned to the customer after
            authorization of the subscription.
        authorization_reference:
          type: string
          description: >-
            Authorization reference. UMN for UPI, UMRN for EMandate/Physical
            Mandate and Enrollment ID for cards.
        authorization_time:
          type: string
          description: Authorization time. Cashfree stores timestamps in IST.
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
        authorization_status:
          type: string
          description: Status of the authorization.
        payment_id:
          type: string
          description: A unique ID passed by merchant for identifying the transaction.
        payment_group:
          type: string
          description: Payment group used for the authorization.
        payment_method:
          type: object
          properties:
            upi:
              $ref: '#/components/schemas/AuthResponseUpi'
            enach:
              $ref: '#/components/schemas/AuthResponseEnach'
            pnach:
              $ref: '#/components/schemas/AuthResponsePnach'
            card:
              $ref: '#/components/schemas/AuthResponseCard'
    SubscriptionCustomerDetails:
      title: CustomerDetails
      description: Subscription customer details.
      type: object
      example:
        customer_name: Test Cust
        customer_email: test@gmail.com
        customer_phone: '9900755700'
        customer_bank_account_holder_name: ''
        customer_bank_account_number: ''
        customer_bank_ifsc: ''
        customer_bank_code: ''
        customer_bank_account_type: ''
      properties:
        customer_name:
          type: string
          description: Name of the customer.
        customer_email:
          type: string
          description: Email of the customer.
        customer_phone:
          type: string
          description: Phone number of the customer.
        customer_bank_account_holder_name:
          type: string
          description: >-
            Bank holder name of the customer. Account holder name is mandatory
            for TPV transaction. Max character allowed is 40.
        customer_bank_account_number:
          type: string
          description: >-
            Bank account number of the customer. Conditional Parameter. Max
            character allowed is 35.
        customer_bank_ifsc:
          type: string
          description: >-
            IFSC code of the customer. For a TPV transaction, send at least one
            out of `customer_bank_code` or `customer_bank_ifsc`.
        customer_bank_code:
          type: string
          description: >-
            Bank code of the customer. Refer to the list of Live Banks in API
            E-Mandate [here](https://www.npci.org.in/product/nach/all-members).
            For a TPV transactions, include at least one of `customer_bank_code`
            or `customer_bank_ifsc`.
        customer_bank_account_type:
          type: string
          enum:
            - SAVINGS
            - CURRENT
          description: Bank account type of the customer.
      required:
        - customer_email
        - customer_phone
    PlanEntity:
      title: PlanEntity
      type: object
      example:
        plan_currency: INR
        plan_id: 144436-03471-JD_TEST
        plan_interval_type: WEEK
        plan_intervals: 1
        plan_max_amount: 1
        plan_max_cycles: 4
        plan_name: abscede
        plan_note: lsdkdn
        plan_recurring_amount: 1
        plan_status: ACTIVE
        plan_type: PERIODIC
      properties:
        plan_currency:
          type: string
          description: Currency for the plan.
        plan_id:
          type: string
          description: Plan ID provided by merchant.
        plan_interval_type:
          type: string
          description: Interval type for the plan.
        plan_intervals:
          type: integer
          description: Number of intervals for the plan.
        plan_max_amount:
          type: number
          format: float64
          description: Maximum amount for the plan.
        plan_max_cycles:
          type: integer
          description: Maximum number of payment cycles for the plan.
        plan_name:
          type: string
          description: Name of the plan.
        plan_note:
          type: string
          description: Note for the plan.
        plan_recurring_amount:
          type: number
          format: float64
          description: Recurring amount for the plan.
        plan_status:
          type: string
          description: Status of the plan.
        plan_type:
          type: string
          description: Type of the plan.
    SubscriptionPaymentSplitItem:
      title: SubscriptionPaymentSplitItem
      description: Subscription Payment Split Item.
      type: object
      example:
        vendor_id: '123'
        percentage: 12.05
      properties:
        vendor_id:
          type: string
          description: Vendor ID.
        percentage:
          type: number
          format: float64
          description: Percentage of the payment to be split to vendor.
    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: something_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.
    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.
    AuthResponseUpi:
      description: Payment method upi.
      type: object
      title: Upi Auth Response
      properties:
        channel:
          description: Can be link, qrcode, or collect.
          type: string
        upi_id:
          description: Virtual payment address (UPI ID) of the user.
          type: string
        upi_instrument:
          description: UPI instrument used for payment.
          type: string
        upi_instrument_number:
          description: Unique number representing the UPI instrument.
          type: string
        upi_payer_account_number:
          description: Account number of the UPI payer.
          type: string
        upi_payer_ifsc:
          description: IFSC code of the UPI payer's bank.
          type: string
    AuthResponseEnach:
      description: Payment method enach.
      type: object
      title: Enach Auth Response
      properties:
        channel:
          description: Channel. Can be link.
          type: string
        auth_mode:
          description: Auth mode. Can be debit_card, aadhaar, or net_banking.
          type: string
        account_type:
          description: Type of the bank account.
          type: string
        account_number:
          description: Bank account number.
          type: string
        account_ifsc:
          description: IFSC code of the bank account.
          type: string
        account_holder_name:
          description: Name of the account holder.
          type: string
        account_bank_code:
          description: Bank code of the account-holding bank.
          type: string
    AuthResponsePnach:
      description: Payment method pnach.
      type: object
      title: Pnach Auth Response
      properties:
        channel:
          description: Channel. Can be post.
          type: string
        mandate_creation_date:
          description: >-
            Date on which the mandate was created. Cashfree stores timestamps in
            IST.
          type: string
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
        mandate_start_date:
          description: Start date of the mandate. Cashfree stores timestamps in IST.
          type: string
          format: ISO8601
          example: '2025-06-01T10:20:12+05:30'
        account_type:
          description: Type of the bank account.
          type: string
        account_number:
          description: Bank account number.
          type: string
        account_ifsc:
          description: IFSC code of the bank account.
          type: string
        account_holder_name:
          description: Name of the account holder.
          type: string
        account_bank_code:
          description: Bank code of the account-holding bank.
          type: string
    AuthResponseCard:
      description: Payment method card.
      type: object
      title: Card Auth Response
      properties:
        channel:
          description: Can be link.
          type: string
        card_number:
          description: Card number.
          type: string
        card_network:
          description: Card network (e.g., VISA, Mastercard).
          type: string
        card_type:
          description: Card type (e.g., credit_card).
          type: string
        card_sub_type:
          description: Card subtype (e.g., R).
          type: string
        card_country:
          description: Country of the card (e.g., IN).
          type: string
        card_bank_name:
          description: Bank name on card.
          type: string
        card_network_reference_id:
          description: Network reference ID.
          type: string
        instrument_id:
          description: Unique identifier for card instrument.
          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'
    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'
  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://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/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.

````