order_meta.payment_methods_filters object in the Create Order API.
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)
If
order_meta.payment_methods_filters is not defined, enabled payment methods will be made available to the user by default.Defining Payment method filtering for orders
To define this feature, include thepayment_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
Additional instructions to be followed by merchants when using the feature
- The action field must be “ALLOW” (in uppercase).
- Values under
card_schemesmust be uppercase (e.g., “VISA”, “RUPAY”). - For
card_issuing_bank, use exact values provided by Cashfree. card_binsandcard_emi_binsshould contain valid BINs. Only cards with these BINs will be eligible.card_suffixmust be the last 4 digits of the card number.- To allow only one specific card, use both
card_binsandcard_suffixmandatorily. - EMI filters (e.g.,
card_emi_schemes,card_emi_issuing_bank) must be used only if you includecredit_card_emiordebit_card_emiinmethods.values. - Filters can be declared in any order.
- Valid values for
card_emi_tenurerange 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_bankare provided in the following document. Merchants can refer to the above documentation and directly use these values to definecard_issuing_bankobject.
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.