---
page_title: Construct Payment Filter Payload
product: Payment Locking
page_source: https://juspay.io/in/docs/payment-locking/docs/payment-locking/construct-payment-filter-payload
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/payment-locking/llms.txt
---


# Structure of payment filter



Payment locking JSON filter is passed in the **orderDetails**  within the payload.

> **Note**
> All fields in the payment_filter JSON are **CASE SENSITIVE**  and must adhere to the specified format.




### The Schema of PaymentFilterPayload :



1. `allowDefaultOptions`**Type** : Boolean**Description** : Controls whether to display payment options that are not explicitly specified in the `options` array.
   
   * `true`: Display additional payment methods that are not specified.
   * `false`: Hide all unspecified payment methods, showing only the configured options.
     
     
     #### Payment filter Payload Code Snippet:
     
     ```payment filter payload
     {
     allowDefaultOptions :: Maybe Boolean,
     options :: Array PaymentMethodFilter,
     emiOptions: Maybe EmiFilter
     }
     
     ```
2. `options`
   
   **Type** : Array**Description** : Defines the filters and rules for specific payment methods or groups.**Parameters within** `options`:
   
   1. `enable`
      
      * **Type** : Boolean
      * **Description** : Indicates whether the specific filter or payment type is active.
   2. `paymentMethodType`
      
      * **Description** : Specifies the type of payment method (e.g., cards, UPI, net banking).
   3. `paymentMethods`
      
      * **Description** : Detailed configurations for specific payment instruments.


| Property | Type & Description	 | Possible Values |
|---|---|---|
| enable	 | Type: Boolean; (*Required)  Use Case: This is to decide whether to disable or enable the payment method. false will disable the payment method and true will enable the payment method.  For CARD/UPI as paymentMethodType it should be true if upiFilters or cardFilters are passed. | Possible Values: true, false |
| display | Type: Boolean; (*Optional)  Use Case: This will gray-out the payment instrument and display displayMessage (if any) when the instrument is disabled using payment locking | Possible Values: true, false |
| displayMessage	 | Type: String; (*Optional)  Use Case: This is to display custom message under a payment method. Will only work when display is true | Possible Values: "Custom Message" |
| enable	 | Type: Boolean; (*Required)  Use Case: This is to decide whether to disable or enable the payment method. false will disable the payment method and true will enable the payment method.  For CARD/UPI as paymentMethodType it should be true if upiFilters or cardFilters are passed. | Possible Values: true, false |
| paymentMethodType	 | Type: PaymentMethodType; (*Required)  Use Case: This decides on which payment method type the payment locking should be applied on. | Possible Values: “CARD”, “UPI“, “WALLET“, “NB, “CONSUMER_FINANCE“, “REWARD“, “CASH“  All the values are case sensitive |
| paymentMethods | Type: Array String; (*Optional)  Use Case: This contains the payment methods on which payment locking have to be applied  It won’t be considered if paymentMethodType is UPI / CARD. | Possible Values: [“PHONEPE”, ”PAYTM”],...  In case of mandate flows (NB, WALLET, CONSUMER_FINANCE) pass additional values with prefix JP_  For example, In NB pass both ["NB_HDFC", "JP_HDFC"] In WALLET pass both["PAYTM", "JP_PAYTM"] In CONSUMER_FINANCE pass both ["ZESTMONEY", "JP_ZESTMONEY"]  All the values are case sensitive |
| cardFilters	 | Type: Array CardFilter; (*Optional)   It won’t be considered unless paymentMethodType is CARD. |  |


Options array structure


#### Payment Method Payload Code Snippet:

```payment method payload
[ 
enable :: Boolean,
paymentMethodType :: PaymentMethodType, 
paymentMethods :: Maybe(Array String),
cardFilters :: Maybe (Array CardFilter),
upiFilters :: Maybe (Array UPIFilter),
display :: Boolean,
displayMessage :: String
]

```



#### **Card Filters (** `cardFilters`)



* **Description** : Filters for card-based payment methods.
  
  * `cardBrands`: Specifies allowed card brands (e.g., Visa, MasterCard).
  * `cardBins`: Allows filtering based on card BINs (Bank Identification Numbers).
  * `cardTypes`: Filters by card type (e.g., credit or debit).
  * `cardSubTypes`: Filters sub-types of cards if applicable.
  * `cardBanks`: Allows configuration of specific card-issuing banks.
    
    
    | Property	 | Type & Description | Possible Values |
    |---|---|---|
    | cardBrands | Type: Array String; (*Optional) | Possible values: “VISA”, “RUPAY”,…  All the values are case sensitive |
    | cardBins | Type: Array String; (*Optional) | Possible values: [“459000::460000“] |
    | cardTypes | Type: Array String; (*Optional) | Possible values: “DEBIT”, ”CREDIT”  All the values are case sensitive |
    | cardSubTypes	 | Type: Array String; (*Optional) | Possible values: “BUSINESS”, ”EMPLOYEE_CARD”  All the values are case sensitive |
    | cardBanks	 | Type: Array String; (*Optional) | Possible values: “SBI”,”ICICI”,....  All the values are case sensitive |
    | enable	 | Type: Boolean | Possible values: true, false |


#### Card Filter Code Snippet:

```card filter
[ 
cardBrands :: Maybe (Array String),
cardBins :: Maybe (Array String),
cardTypes :: Maybe (Array String),
cardSubTypes :: Maybe (Array String),
cardBanks :: Maybe (Array String),
enable :: Boolean
]

```



#### **UPI Filters (** `upiFilters`)



* **Description** : Filters for UPI payment methods.
  
  * `upiType`: Specifies the type of UPI instruments allowed.
  * `enable`: Enables or disables the UPI filter.
    
    
    | Property	 | Type & Description	 | Possible Values |
    |---|---|---|
    | upiType	 | Type: UPIType | Possible values: “COLLECT”, ”INTENT”, "QR" All the values are case sensitive |
    | enable	 | Type: Boolean | Possible values: true, false |


#### UPI Filter Code Snippet:

```upi filter
{ 
upiType :: UPIType,
enable :: Boolean
}
```



### **EMI Filter** 



The solution provides merchants with the ability to manage the visibility of various EMI plans and tailor the payment experience as follows:

1. **EMI Plan Visibility Control** :
   
   * Merchants can **show**  or **hide**  different types of EMI plans:
     
     * **Standard EMI**
     * **Low-Cost EMI**
     * **No-Cost EMI**
   * These plans can be configured for both:
     
     * **Card EMIs** : Debit and Credit card EMI plans.
     * **Cardless EMIs** : EMI options that do not require a card.
2. **Issuer-Specific Filtering** :
   
   * Merchants can block specific issuers within any EMI category.
     
     * For example: HDFC Debit Card EMI plans can be explicitly hidden, while allowing others.
3. **Exclusive EMI Page Option** :
   
   * Merchants can configure the payment page to display **only EMI options** , ensuring a focused experience for EMI-based transactions.
4. **Filter Types** :
   
   * `EmiFilter`: Allows filtering of EMI plans at a basic level.
     
     * For example: Display only **No-Cost EMI**  plans across all eligible instruments.
   * `EmiSubFilter`: Provides granular filtering for specific plans.
     
     * For example: Block only **HDFC Debit Card EMI plans**  while keeping others visible.


#### Javascript Code Snippet:

```javascript
newtype EmiFilter = EmiFilter
  { standardEmi :: Maybe EmiSubFilter
  , lowCostEmi :: Maybe EmiSubFilter
  , noCostEmi :: Maybe EmiSubFilter
  , showOnlyEmi :: Maybe Boolean
  }
```



#### Javascript Code Snippet:

```javascript
newtype EmiSubFilter = EmiSubFilter
  { enable :: Boolean 
    , credit :: Maybe
      { enable :: Boolean
      , filters ::
          [
            { paymentMethodType :: PaymentMethodType
            , paymentMethod :: String
            , enable :: Boolean
            , issuerFilter :: {issuers :: Array String, enable :: Boolean}
            }
          ]
      }
    , debit :: Maybe
      { enable :: Boolean
      , filters ::
          [
            { paymentMethodType :: PaymentMethodType
            , paymentMethod :: String
            , enable :: Boolean
            , issuerFilter :: {issuers :: Array String, enable :: Boolean}
            }
          ]
      }
    , cardless :: Maybe
      { enable :: Boolean
      , filters ::
         [
            { paymentMethodType :: PaymentMethodType
            , paymentMethod :: String
            , enable :: Boolean
            , issuerFilter :: {issuers :: Array String, enable :: Boolean}
            }
         ]
      }
  }

```



| Property | Type & Description	 | Possible Values |
|---|---|---|
| standardEmi	 | Type: Maybe EmiSubFilter; Use Case: Controls everything with regards to standard EMI plans |  |
| lowCostEmi	 | Type: Maybe EmiSubFilter; Use Case: Controls everything with regards to low cost EMI plans |  |
| noCostEmi	 | Type: Maybe EmiSubFilter; Use Case: Controls everything with regards to no cost EMI plans |  |
| showOnlyEmi	 | Type: Maybe Boolean; Use Case: EMI will be the only visible instrument on payment page | Possible values: true, false |


**Payload : standardEmi/lowCostEmi/noCostEmi/showOnlyEmi** 


| Property	 | Type & Description	 | Possible Values |
|---|---|---|
| enable | Type: Boolean; (*Required) Use Case: This is to decide whether to disable or enable standardEMI, lowCostEMI or noCostEMI | Possible values: true, false |
| credit	 | Type: Maybe Use Case: Controls everything with regards to credit card plans within the given EMI type (standard/ low cost/ no cost) |  |
| debit	 | Type: Maybe Use Case: Controls everything with regards to debit card plans within the given EMI type (standard/ low cost/ no cost) |  |
| cardless	 | Type: Maybe Use Case: Controls everything with regards to cardless card plans within the given EMI type (standard/ low cost/ no cost) |  |



### **Payload : credit/ debit/ cardless** 




| Property	 | Type & Description | Possible Values |
|---|---|---|
| enable | Type: Boolean; (*Required) Use Case: This is to decide whether to disable or enable credit, debit or cardless EMI | Possible values: true, false |
| filters :: enable	 | Type: Boolean; (*Required) Use Case: This is to decide whether to disable or enable plans | Possible values: true, false |
| filters :: paymentMethodType	 | Type: String; Use Case: EMI plans of this particular payment method type will be locked | Possible values: “CARD”, “UPI“, “WALLET“, “NB, “CONSUMER_FINANCE“, “REWARD“, “CASH“ All the values are case sensitive |
| filters :: paymentMethod | Type: Array String; Use Case: EMI plans of this particular payment method will be locked | Possible values: [“PHONEPE”, ”PAYTM”],... All the values are case sensitive |
| filters :: issuerFilters	 | Type: {issuers :: Array String, enable :: Boolean} Use Case: This is to decide whether to disable or enable EMI Issuers based on above filters | Possible values: JP Bank code of the issuer. For example, JP_HDFC |
| filters :: issuerFilters | Type: {tenures :: Array String, enable :: Boolean} Use Case: This is to decide whether to disable or enable EMI Tenures based on above filters | Possible values: "5::6","12::20" |


---

## See Also

- [payment-filter-generator](https://juspay.io/in/docs/payment-locking/docs/payment-locking/paymentfiltergenerator)
- [payment-locking-bank-codes](https://juspay.io/in/docs/payment-locking/docs/payment-locking/paymentlockingbankcodes)
