> ## Documentation Index
> Fetch the complete documentation index at: https://cashfreepayments-d00050e9-pay-method.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Method Filtering for Orders

> Enables our merchants to custom-define filtering of payment methods associated with an order.

The Payment method filtering for orders feature allows merchants to define which payment methods are eligible for a specific order. This enables fine-grained control over the payment options presented to customers during checkout. This feature is configured when creating an order by using the `order_meta.payment_methods_filters` object in the [Create Order API](/api-reference/payments/latest/orders/create).

## Use cases for Payment method filtering

This feature is widely used for “Cards” Payment Method.
Within “Cards”, the feature is supported across all of the below card-types, i.e.

* Credit Cards
* Debit Cards
* Prepaid Cards
* Credit Card EMI (CC EMI)
* Debit Card EMI (DC EMI)

<Note>If `order_meta.payment_methods_filters` is not defined, enabled payment methods will be made available to the user by default.</Note>

## Defining Payment method filtering for orders

To define this feature, include the `payment_methods_filters` object while creating an order.

Refer to the below defined sample `payment_methods_filters` object which exhaustively covers all possible filters possible. As per merchant’s need, they can define required filters at an order level.

```JSON.java JSON theme={null}
{
  "payment_methods_filters": {
    "methods": {
      "action": "ALLOW",
      "values": [
        "credit_card",
        "debit_card",
        "prepaid_card",
        "credit_card_emi",
        "debit_card_emi"
      ]
    },
    "filters": {
      "card_schemes": {
        "action": "ALLOW",
        "values": [
          "VISA"
        ]
      },
      "card_suffix": {
        "action": "ALLOW",
        "values": [
          "1936"
        ]
      },
      "card_issuing_bank": {
        "action": "ALLOW",
        "values": [
          "AXIS"
        ]
      },
      "card_bins": {
        "action": "ALLOW",
        "values": [
          "451457"
        ]
      },
      "card_emi_schemes": {
        "action": "ALLOW",
        "values": [
          "VISA",
          "MASTERCARD"
        ]
      },
      "card_emi_suffix": {
        "action": "ALLOW",
        "values": [
          "1936"
        ]
      },
      "card_emi_issuing_bank": {
        "action": "ALLOW",
        "values": [
          "AXIS"
        ]
      },
      "card_emi_tenure": {
        "action": "ALLOW",
        "values": [
          3
        ]
      },
      "card_emi_bins": {
        "action": "ALLOW",
        "values": [
          "451457"
        ]
      }
    }
  }
}

```

## Additional instructions to be followed by merchants when using the feature

* The action field must be "ALLOW" (in uppercase).
* Values under `card_schemes` must be uppercase (e.g., "VISA", "RUPAY").
* For `card_issuing_bank`, use exact values provided by Cashfree.
* `card_bins` and `card_emi_bins` should contain valid BINs. Only cards with these BINs will be eligible.
* `card_suffix` must be the last 4 digits of the card number.
* To allow only one specific card, use both `card_bins` and `card_suffix` mandatorily.
* EMI filters (e.g., `card_emi_schemes`, `card_emi_issuing_bank`) must be used only if you include `credit_card_emi` or `debit_card_emi` in `methods.values`.
* Filters can be declared in any order.
* Valid values for `card_emi_tenure` range from 3 to 36 months.
* Supported values for `card_schemes`:
  * RUPAY
  * VISA
  * DINERS
  * MASTERCARD
  * AMEX
* List of all values that we support in `card_issuing_bank` are provided in the following [document](https://drive.google.com/file/d/1PXGHxB6gFbznXPU38A2M5KTWpyuBP_iC/view).
  Merchants can refer to the above documentation and directly use these values to define `card_issuing_bank` object.

## Example Use Cases

| **Use Case**                                 | **Configuration**                                                                                                 |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Allow only credit and debit cards            | Set `"methods.values"` to `["credit_card", "debit_card"]`                                                         |
| Allow only cards from Axis Bank              | Use the `card_issuing_bank` filter with value `"AXIS"`                                                            |
| Allow only specific card BINs                | Use the `card_bins` filter with values like `"451457"`                                                            |
| Allow only a single card                     | Use both `card_bins` and `card_suffix` filters                                                                    |
| Allow only VISA credit card EMI for 3 months | Use `"methods.values"` with `"credit_card_emi"`, set `card_emi_schemes` to `"VISA"`, and `card_emi_tenure` to `3` |

## Troubleshooting

* Ensure all string values are in the correct case (e.g., **"ALLOW"**, **"VISA"**).
* Do not define EMI filters unless EMI methods are included.
* Avoid including filters that don’t match any available payment methods—this will result in no options being shown to the customer.

## Contact Support

For additional help or to get the latest list of supported filters, contact your Cashfree account manager or submit a support ticket.
