---
page_source: https://docs.juspay.io/hypercheckout/ios/resources/payment-locking
page_title: Payment Locking
---


# Payment Locking



Payment locking allows you to block/ allow specific payment instrument groups/ payment instruments on the Hypercheckout screen. For example, if you want to display or hide a specific payment option for a particular product/ service, you can use payment locking to handle such scenarios.Follow the below steps to implement payment locking:1. Pass the payment locking payload in the `payment_filter` parameter while calling the session API, where all the fields are **CASE SENSITIVE** .2. Session API will respond with a JSON object containing process payload and payment filter parameters inside `sdk_payload` key.3. Call the [Process API](https://docs.juspay.in/hyper-checkout/ios/base-sdk-integration/open-hypercheckout-screen) by passing the JSON object you received in `sdk_payload` of session API.


### Payload Details




### Step 1.1a PaymentFilter Payload


Refer below parameters for Payment Locking.


### Payload
- **AllowDefaultOptions**:
  - Description: It defines whether you want to display all default payment options along with the payment options on which payment filters were applied.**For Example:**  You passed payload to disable cards payment option and set 'allowDefaultOptions' as true, then it will display all other payment options other than cards. ORYou passed paylaod to enable cards payment option and set 'allowDefaultOptions' as false, then it will only display cards option on the Hypercheckout screen.
  - Value: <p><b>Possible Values:</b> true or false</p>
  - Tags: Boolean, Mandatory
- **Options**:
  - Description: Options defines the method on which payment locking has to be applied.
  - Value:
    - **Enable**:
      - Description: 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.
      - Value: <b>Possible Values:</b> true, false
      - Tags: Boolean, Mandatory
    - **PaymentMethodType**:
      - Description: This decides on which payment method type the payment locking should be applied on.
      - Value: <p><b> Possible Values:</b> CARD, UPI, WALLET, NB, CONSUMER_FINANCE, REWARD, CASH</p>
      - Tags: String, Mandatory
    - **PaymentMethods**:
      - Description: This contains the payment methods on which payment locking have to be applied It won't be considered if paymentMethodType is UPI / CARD.
      - Value: <p><b>Possible Values:</b> [PHONEPE, PAYTM],...<br>
<br>
In case of <b>mandate flows</b> (NB, WALLET, CONSUMER_FINANCE) pass additional values with prefix JP_<br>
<br>
<b>For example,</b> <br>
In NB pass both ["NB_HDFC", "JP_HDFC"] <br>
In WALLET pass both["PAYTM", "JP_PAYTM"] <br>
In CONSUMER_FINANCE pass both ["ZESTMONEY", "JP_ZESTMONEY"] <br></p>
      - Tags: Array, Optional
    - **CardFilters**:
      - Description: It won't be considered unless paymentMethodType is CARD.
      - Value:
        - **CardBrand**:
          - Description: This contains the card brand on which payment locking has to be applied.
          - Value: <b>Possible values:</b> VISA, RUPAY,...
          - Tags: Array, Optional
        - **CardBin**:
          - Description: This contains the card BINS on which payment locking has to be applied.
          - Value: <p><b>Possible values:</b> ["459000::460000"]</p>
          - Tags: Array, Optional
        - **CardType**:
          - Description: This contains the card type on which payment locking has to be applied.
          - Value: <p><b>Possible values:</b> DEBIT, CREDIT</p>
          - Tags: Array, Optional
        - **CardSubType**:
          - Description: This contains the card sub type on which payment locking has to be applied.
          - Value: <p><b>Possible values:</b> BUSINESS, EMPLOYEE_CARD,...</p>
          - Tags: Array, Optional
        - **CardBanks**:
          - Description: This contains the Bank names on which payment locking has to be applied.
          - Value: <p><b>Possible values:</b> SBI, ICICI,....</p>
          - Tags: Array, Optional
        - **Enable**:
          - Description: This is to decide whether to disable or enable the payment instrument. False will disable the payment method and true will enable the payment method.
          - Value: <p><b>Possible values:</b>true, false</p>
          - Tags: Boolean, Mandatory
      - Tags: Array, Optional
    - **UpiFilters**:
      - Description: It won't be considered unless paymentMethodType is UPI.
      - Value:
        - **UpiType**:
          - Description: This contains the UPI type on which payment locking has to be applied.
          - Value: <p> <b>Possible values:</b>COLLECT, INTENT </p>
          - Tags: String, Optional
        - **UpiMethods**:
          - Description: This contains the UPI method on which payment locking has to be applied.
          - Value: <p> <b>Possible values:</b> If upiType is 'COLLECT' then '@ybl', '@okicici'... <br> If upiType is 'INTENT' then 'phonepe', 'googlepay'... </p>
          - Tags: Array, Optional
        - **Enable**:
          - Description: This is to decide whether to disable or enable the payment method on which upiFilters are applied, false will disable the payment method and true will enable the payment method.
          - Value: <p><b>Possible values:</b> true or false</p>
          - Tags: Boolean, Mandatory
      - Tags: Array, Optional
  - Tags: Array, Mandatory




You can refer this [Doc](https://docs.juspay.in/resources/docs/common-resources/payment-locking-bank-codes) to get the possible values that needs to passed in the payment locking parameters.


### EMI Filter:



You can show/ hide/ only display EMI without cards by passing below values in **'sdk_udf'**  parameter while calling the session API.

> **Note**
> Please intimate your Juspay POC if you plan on using sdk_udf. They will enable a config required to use this feature.




| Use case | Description and Type | sdk_udf : Possible Values |
|---|---|---|
| Show EMI | <b>Type:</b> String <br> <br><b>Use Case:</b> Need to show EMI on the Hypercheckout screen | <b>Value:</b> showEMI |
| No EMI | <b>Type:</b> String<br> <br><b>Use Case:</b> Need to hide EMI on the Hypercheckout screen. | <b>Value:</b> hideEMI |
| EMI without Cards | <b>Type:</b> String <br> <br><b>Use Case:</b> Need to show EMI on the Hypercheckout screen, but not CARD. | <b>Value:</b> ShowEMIWithoutCards |



### **Structure for EMI Filter** 




#### **Feature Details** 



* Allows merchants to hide/show different types of EMI plans(standard, low cost, no cost) under both card EMIs (debit & credit) and cardless EMIs
* Any particular issuer can be hidden within any of these categories (Ex. HDFC Debit card EMI plans can be specifically blocked)
* Solution also supports showing only EMI Options on the Payment Page
* Reach out to your Juspay POC to enable EMI filter via payment locking for your account

* **EmiFilter**  filters EMI plans on a basic level (Ex. Display only no-cost EMI)
* **EmiSubFilter**  filters specific plans (Ex. HDFC debit card EMI plans to be specifically blocked)


#### **Structure** 



The Schema of EmiFilter payload :


#### Javascript Code Snippet:

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



#### **Structure** 



The Schema of EmiSubFilter payload :


#### 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}
            }
         ]
      }
  }

```



### **Payload : emiOptions** 




| 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" |


## Sample Code Snippets:
### Payment Locking Sample Payloads:

#### UPI: Hide UPI Section Code Snippet:

```upi: hide upi section
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions": true,
       "options": [
           {
               "paymentMethodType": "WALLET",
               "enable": false
           }
       ]
   }
}'
```

#### UPI: Dispaly only UPI Code Snippet:

```upi: dispaly only upi
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions" : false,
       "options": [
         {
           "paymentMethodType": "UPI",
           "enable": true
         }
       ]
     }
}'
```

#### UPI: Hide Specific UPI Apps or UPI Collect handles Code Snippet:

```upi: hide specific upi apps or upi collect handles
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions": true,
       "options": [{
               "paymentMethodType": "UPI",
               "enable": true,
               "upiFilters": [{
                       "upiType": "COLLECT",
               "enable": false,     
                       "upiMethods": ["@ybl", "@okhdfcbank"]
                   },
                   {
                       "upiType": "INTENT",
                       "enable": false,
                       "upiMethods": ["PHONEPE", "GPAY", "PAYTM"]
                   }]
               }
           ]
       }
}'
```

#### Card: Hide Card Section  Code Snippet:

```card: hide card section 
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions" : true,
       "options": [
         {
           "paymentMethodType": "CARD",
           "enable" : false
         }
       ]
     }
}'
```

#### Card: Hide Credit Card Section Code Snippet:

```card: hide credit card section
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions" : true,
       "options": [
         {
           "paymentMethodType": "CARD",
           "enable" : true,
     "cardFilters": [
             {
               "enable": false,
               "cardTypes": ["CREDIT"]
             }
           ]
         }
       ]
     }
}'
```

#### Card: Hide particular card bins Code Snippet:

```card: hide particular card bins
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions" : true,
       "options": [
         {
           "paymentMethodType": "CARD",
           "enable": true,
           "cardFilters": [
             {
               "enable": false,
                 "cardBins":["459000::460000"]
             }
           ]
         }
       ]
     }
}'
```

#### Wallet: Hide Wallet Section Code Snippet:

```wallet: hide wallet section
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions": true,
       "options": [
           {
               "paymentMethodType": "WALLET",
               "enable": false
           }
       ]
   }
}'
```

#### Wallet: Hide Specific Wallets Code Snippet:

```wallet: hide specific wallets
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions": true,
       "options": [
           {
               "paymentMethodType": "WALLET",
               "paymentMethods": ["LAZYPAY,SIMPL"],
               "enable": false
           }
       ]
   }
}'
```

#### Netbanking: Hide Net Banking Section Code Snippet:

```netbanking: hide net banking section
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions" : true,
       "options": [
         {
           "paymentMethodType": "NB",
           "enable" : false
         }
       ]
     }
}'
```

#### COD: Hide COD section Code Snippet:

```cod: hide cod section
curl --location --request POST 'https://api.juspay.in/session' \
--header 'Authorization: Basic base_64_encoded_api_key==' \
--header 'x-merchantid: your_merchant_id' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_id": "testing-order-one",
    "amount": "1.0",
    "customer_id": "testing-customer-one",
    "customer_email": "test@mail.com",
    "customer_phone": "9876543210",
    "payment_page_client_id": "your_client_id",
    "action": "paymentPage",
    "return_url": "https://shop.merchant.com",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "payment_filter": {
       "allowDefaultOptions": true,
       "options": [
           {
               "paymentMethodType": "CASH",
               "enable": false
           }
       ]
   }
}'
```

#### EMI: Show only EMI Code Snippet:

```emi: show only emi
{
"payment_filter": {
    "allowDefaultOptions": true,
    "options": [],
    "emiOptions": {
    "showOnlyEmi" : true 
   }
}
}
```

#### EMI: Show only no cost EMI Code Snippet:

```emi: show only no cost emi
"payment_filter": {
    "allowDefaultOptions": true,
    "options": [],
    "emiOptions": {
        "standardEmi" : {
          "enable" : false
        },
        "lowCostEmi" : {
          "enable" : false
        },
        "noCostEmi" : {
          "enable" : true
        },
    "showOnlyEmi" : true
   }
}

```

#### EMI: Show standard EMI and low cost EMI (likewise any combination of standard, low cost and not cost can be achieved) Code Snippet:

```emi: show standard emi and low cost emi (likewise any combination of standard, low cost and not cost can be achieved)
{
"payment_filter": {
    "allowDefaultOptions": true,
    "options": [],
    "emiOptions": {
    "standardEmi" : {
      "enable" : true
    },
    "lowCostEmi" : {
      "enable" : true
    },
    "noCostEmi" : {
      "enable" : false
    }
  }
 
 }
}
```

#### EMI: Hide EMI Code Snippet:

```emi: hide emi
{
"payment_filter": {
    "allowDefaultOptions": true,
    "options": [],
    "emiOptions": {
    "standardEmi" : {
      "enable" : false
    },
    "lowCostEmi" : {
      "enable" : false
    },
    "noCostEmi" : {
      "enable" : false
    }
  }
 }
}
```

#### EMI: Hide only credit card based EMI within No cost EMI (likewise any combination of credit, debit and cardless can be achieved) Code Snippet:

```emi: hide only credit card based emi within no cost emi (likewise any combination of credit, debit and cardless can be achieved)
{
"payment_filter": {
    "allowDefaultOptions": true,
    "options": [],
    "emiOptions": {
    "standardEmi" : {
      "enable" : true
    },
    "lowCostEmi" : {
      "enable" : true
    },
    "noCostEmi" : {
       "enable" : true,
       "credit": {
       "enable" : false
      }
    }
  }
 }
}
```

#### EMI: Remove only ICICI issuer in credit having tenure between 9-12 Code Snippet:

```emi: remove only icici issuer in credit having tenure between 9-12
{
    "allowDefaultOptions": true,
    "emiOptions": {
      "noCostEmi": {
        "credit": {
          "enable": true,
          "filters": [
            {
              "issuerFilter": {
                "issuers": [
                  "JP_ICICI"
                ],
          "tenures": ["9::12"],
                "enable": false
              },
              "paymentMethodType": "CARD",
              "paymentMethod": "CARD",
              "enable": true
            }
          ]
        },
        "enable": true
      }
    }
  }
  
```

#### EMI: Remove tenures between 5-6 and 12-20 only for ICICI Issuer for both noCost and standardEmi Code Snippet:

```emi: remove tenures between 5-6 and 12-20 only for icici issuer for both nocost and standardemi
{
    "allowDefaultOptions": true,
    "emiOptions": {
      "noCostEmi": {
        "credit": {
          "enable": true,
          "filters": [
            {
              "issuerFilter": {
                "issuers": [
                  "JP_ICICI"
                ],
                "tenures": [
                  "5::6",
                  "12::20"
                ],
                "enable": false
              },
              "paymentMethodType": "CARD",
              "paymentMethod": "CARD",
              "enable": true
            }
          ]
        },
        "enable": true
      },
      "standardEmi": {
        "credit": {
          "enable": true,
          "filters": [
            {
              "issuerFilter": {
                "issuers": [
                  "JP_ICICI"
                ],
                "tenures": [
                  "5::6",
                  "12::20"
                ],
                "enable": false
              },
              "paymentMethodType": "CARD",
              "paymentMethod": "CARD",
              "enable": true
            }
          ]
        },
        "enable": true
      }
    }
  }
  
```

