openapi: 3.0.0 info: version: '2025-01-01' title: Cashfree Payment Gateway APIs Authorize Eligibility API 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 tags: - name: Eligibility description: Collection of APIs to check eligible entities - payment methods, offers, affordability paths: /eligibility/payment_methods: post: summary: Get eligible Payment Methods description: Use this API to get eligible Payment Methods tags: - Eligibility x-mcp: enabled: true operationId: PGEligibilityFetchPaymentMethods deprecated: false security: - XClientID: [] XClientSecret: [] - XClientID: [] XPartnerAPIKey: [] - XClientID: [] XClientSignatureHeader: [] - XPartnerMerchantID: [] XPartnerAPIKey: [] parameters: - $ref: '#/components/parameters/apiVersionHeader' - $ref: '#/components/parameters/xRequestIDHeader' - $ref: '#/components/parameters/xIdempotencyKeyHeader' requestBody: $ref: '#/components/requestBodies/EligibilityFetchPaymentMethodsRequest' responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/EligibilityPaymentMethodsEntity' example: - eligibility: true entity_type: payment_methods entity_value: netbanking entity_details: payment_method_details: - nick: motak_kahindra_bank display: Motak Kahindra Bank eligibility: true code: 3032 - nick: bank_of_india display: Bank Of India eligibility: true code: 3031 headers: x-api-version: $ref: '#/components/headers/x-api-version' x-ratelimit-limit: $ref: '#/components/headers/x-ratelimit-limit' x-ratelimit-remaining: $ref: '#/components/headers/x-ratelimit-remaining' x-ratelimit-retry: $ref: '#/components/headers/x-ratelimit-retry' x-ratelimit-type: $ref: '#/components/headers/x-ratelimit-type' x-request-id: $ref: '#/components/headers/x-request-id' x-idempotency-key: $ref: '#/components/headers/x-idempotency-key' x-idempotency-replayed: $ref: '#/components/headers/x-idempotency-replayed' '400': $ref: '#/components/responses/Response400' '401': $ref: '#/components/responses/Response401' '404': $ref: '#/components/responses/Response404' '409': $ref: '#/components/responses/Response409' '422': $ref: '#/components/responses/Response422' '429': $ref: '#/components/responses/Response429' '500': $ref: '#/components/responses/Response500' '502': $ref: '#/components/responses/Response502' components: schemas: BadRequestError: title: BadRequestError description: Invalid request received from client example: message: bad URL, please check API documentation code: request_failed type: invalid_request_error type: object properties: message: type: string code: type: string help: type: string type: type: string enum: - invalid_request_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 EligibilityPaymentMethodsEntity: title: EligibilityPaymentMethodsEntity description: Eligible payment methods details type: object properties: eligibility: type: boolean example: true entity_type: type: string example: payment_methods entity_value: type: string example: netbanking entity_details: type: object properties: payment_method_details: type: array items: $ref: '#/components/schemas/PaymentModeDetails' example: payment_method_details: - nick: motak_kahindra_bank display: Motak Kahindra Bank eligibility: true code: 3032 - nick: bank_of_india display: Bank Of India eligibility: true code: 3031 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 ApiError: title: ApiError description: Error at cashfree's server example: message: internal Server Error code: internal_error type: api_error type: object properties: message: type: string code: type: string help: type: string type: type: string enum: - api_error description: api_error IdempotencyError: title: IdempotencyError description: Error when idempotency fails. Different request body with the same idempotent key example: message: something is not found code: request_invalid type: idempotency_error type: object properties: message: type: string help: type: string code: type: string type: type: string enum: - idempotency_error description: idempotency_error ApiError409: title: ApiError409 description: duplicate request example: message: order with same id is already present code: order_already_exists type: invalid_request_error type: object properties: message: type: string help: type: string code: type: string type: type: string enum: - invalid_request_error description: invalid_request_error PaymentMethodsFilters: title: PaymentMethodsFilters type: object example: payment_methods: null description: Filter for Payment Methods properties: payment_methods: type: array description: Array of payment methods to be filtered. This is optional, by default all payment methods will be returned. Possible values in [ 'debit_card', 'credit_card', 'prepaid_card', 'corporate_credit_card', 'upi', 'wallet', 'netbanking', 'banktransfer', 'paylater', 'paypal', 'debit_card_emi', 'credit_card_emi', 'upi_credit_card', 'upi_ppi', 'cardless_emi', 'account_based_payment' ] items: $ref: '#/components/schemas/MethodsType' PaymentMethodsQueries: title: PaymentMethodsQueries description: Payment Method Query Object type: object example: amount: 100 properties: amount: type: number description: Amount of the order. minimum: 1 example: 100 order_id: type: string description: OrderId of the order. Either of `order_id` or `order_amount` is mandatory. minLength: 3 maxLength: 50 format: string example: order_413462PK1RI1IwYB1X69LgzUQWiSxYDF ApiError404: title: ApiError404 description: Error when resource requested is not found example: message: something is not found code: somethind_not_found type: invalid_request_error type: object properties: message: type: string code: type: string help: type: string type: type: string enum: - invalid_request_error description: invalid_request_error MethodsType: title: MethodsType type: string description: Methods Type Object EligibilityFetchPaymentMethodsRequest: title: EligibilityFetchPaymentMethodsRequest description: eligibilty request to find eligible payment method example: queries: $ref: '#/components/schemas/PaymentMethodsQueries/example' filters: $ref: '#/components/schemas/PaymentMethodsFilters/example' type: object properties: queries: $ref: '#/components/schemas/PaymentMethodsQueries' filters: $ref: '#/components/schemas/PaymentMethodsFilters' required: - queries ApiError502: title: ApiError502 description: Error when there is error at partner bank example: message: something is not found code: bank_processing_failure type: api_error type: object properties: message: type: string help: type: string code: type: string description: '`bank_processing_failure` will be returned here to denote failure at bank. ' type: type: string enum: - api_error description: api_error PaymentModeDetails: description: payment mode eligiblity object properties: nick: type: string example: motak_kahindra_bank display: type: string example: Motak Mahindra Bank eligibility: type: boolean example: false code: type: number example: 3001 responses: Response502: description: Bank related Error content: application/json: schema: $ref: '#/components/schemas/ApiError502' headers: x-api-version: $ref: '#/components/headers/x-api-version' x-ratelimit-limit: $ref: '#/components/headers/x-ratelimit-limit' x-ratelimit-remaining: $ref: '#/components/headers/x-ratelimit-remaining' x-ratelimit-retry: $ref: '#/components/headers/x-ratelimit-retry' x-ratelimit-type: $ref: '#/components/headers/x-ratelimit-type' x-request-id: $ref: '#/components/headers/x-request-id' x-idempotency-key: $ref: '#/components/headers/x-idempotency-key' x-idempotency-replayed: $ref: '#/components/headers/x-idempotency-replayed' 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' 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' 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' 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' 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' headers: x-ratelimit-limit: schema: type: integer example: 200 description: Ratelimit set for your account for this API per minute 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-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-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-api-version: schema: type: string format: YYYY-MM-DD enum: - '2022-09-01' description: This header has the version of the API. The current version is `2022-09-01`. x-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' 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 examples: eligible_netbanking_payment_methods: description: Check eligibilty of Payment Methods summary: Eligible Payment Methods - Netbanking value: filters: payment_methods: - netbanking queries: amount: 100 eligible_card_payment_methods: description: Check eligibilty of Payment Methods summary: Eligible Payment Methods - Card value: filters: payment_methods: - debit_card - credit_card - prepaid_card - corporate_credit_card queries: amount: 100 eligible_all_payment_methods: description: Check eligibilty of Payment Methods summary: Eligible Payment Methods - All value: queries: amount: 100 requestBodies: EligibilityFetchPaymentMethodsRequest: description: Request Body to get eligible payment methods for an account and order required: true content: application/json: schema: $ref: '#/components/schemas/EligibilityFetchPaymentMethodsRequest' examples: eligible_all_payment_methods_nb: $ref: '#/components/examples/eligible_all_payment_methods' eligible_card_payment_methods_nb: $ref: '#/components/examples/eligible_card_payment_methods' eligible_netbanking_payment_methods: $ref: '#/components/examples/eligible_netbanking_payment_methods' parameters: xRequestIDHeader: in: header name: x-request-id description: Request ID for the API call. It can be used to resolve technical issues. Include 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 in your API call. If the request fails or times out, you can retry it with the same key to prevent duplicate actions. ' schema: type: string format: UUID example: 47bf8872-46fe-11ee-be56-0242ac120002 apiVersionHeader: in: header name: x-api-version 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 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/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://merchant.cashfree.com/merchants/pg/developers/api-keys?env=prod"). 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 the signature. 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 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 externalDocs: url: https://api.cashfree.com/pg description: This url will have the information of all the APIs. x-readme: explorer-enabled: true proxy-enabled: true samples-enabled: true samples-languages: - shell