Bug: [BUG]  user bank options sent inside the eps `user_bank_options` field should be dynamic



for stripe the user bank options sent in `user_bank_options` should be dynamic and picked from .toml files
diff --git a/crates/api_models/src/payment_methods.rs b/crates/api_models/src/payment_methods.rs
index a70dceb962d..278d158fe46 100644
--- a/crates/api_models/src/payment_methods.rs
+++ b/crates/api_models/src/payment_methods.rs
@@ -1442,7 +1442,8 @@ pub struct ResponsePaymentMethodTypes {
     /// The list of card networks enabled, if applicable for a payment method type
     pub card_networks: Option<Vec<CardNetworkTypes>>,
 
-    /// The list of banks enabled, if applicable for a payment method type
+    #[schema(deprecated)]
+    /// The list of banks enabled, if applicable for a payment method type . To be deprecated soon.
     pub bank_names: Option<Vec<BankCodeResponse>>,
 
     /// The Bank debit payment method information, if applicable for a payment method type.
diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
index 2dd291d16f5..90399dde29e 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -6,8 +6,9 @@ use api_models::{
 };
 
 use crate::configs::settings::{
-    ConnectorFields, Mandates, RequiredFieldFinal, SupportedConnectorsForMandate,
-    SupportedPaymentMethodTypesForMandate, SupportedPaymentMethodsForMandate, ZeroMandates,
+    BankRedirectConfig, ConnectorFields, Mandates, RequiredFieldFinal,
+    SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,
+    SupportedPaymentMethodsForMandate, ZeroMandates,
 };
 #[cfg(feature = "v1")]
 use crate::configs::settings::{PaymentMethodType, RequiredFields};
@@ -1003,8 +1004,8 @@ pub fn get_shipping_required_fields() -> HashMap<String, RequiredFieldInfo> {
 }
 
 #[cfg(feature = "v1")]
-impl Default for RequiredFields {
-    fn default() -> Self {
+impl RequiredFields {
+    pub fn new(bank_config: &BankRedirectConfig) -> Self {
         let cards_required_fields = get_cards_required_fields();
         let mut debit_required_fields = cards_required_fields.clone();
         debit_required_fields.extend(HashMap::from([
@@ -1045,7 +1046,7 @@ impl Default for RequiredFields {
             ),
             (
                 enums::PaymentMethod::BankRedirect,
-                PaymentMethodType(get_bank_redirect_required_fields()),
+                PaymentMethodType(get_bank_redirect_required_fields(bank_config)),
             ),
             (
                 enums::PaymentMethod::Wallet,
@@ -1203,6 +1204,13 @@ impl Default for RequiredFields {
     }
 }
 
+#[cfg(feature = "v1")]
+impl Default for RequiredFields {
+    fn default() -> Self {
+        Self::new(&BankRedirectConfig::default())
+    }
+}
+
 #[cfg(feature = "v1")]
 fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {
     HashMap::from([
@@ -1563,7 +1571,9 @@ fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {
 }
 
 #[cfg(feature = "v1")]
-fn get_bank_redirect_required_fields() -> HashMap<enums::PaymentMethodType, ConnectorFields> {
+fn get_bank_redirect_required_fields(
+    bank_config: &BankRedirectConfig,
+) -> HashMap<enums::PaymentMethodType, ConnectorFields> {
     HashMap::from([
         (
             enums::PaymentMethodType::OpenBankingUk,
@@ -2028,69 +2038,14 @@ fn get_bank_redirect_required_fields() -> HashMap<enums::PaymentMethodType, Conn
                                 FieldType::UserFullName,
                             ),
                             RequiredField::EpsBankOptions(
-                                vec![
-                                    enums::BankNames::AbnAmro,
-                                    enums::BankNames::ArzteUndApothekerBank,
-                                    enums::BankNames::AsnBank,
-                                    enums::BankNames::AustrianAnadiBankAg,
-                                    enums::BankNames::BankAustria,
-                                    enums::BankNames::BankhausCarlSpangler,
-                                    enums::BankNames::BankhausSchelhammerUndSchatteraAg,
-                                    enums::BankNames::BawagPskAg,
-                                    enums::BankNames::BksBankAg,
-                                    enums::BankNames::BrullKallmusBankAg,
-                                    enums::BankNames::BtvVierLanderBank,
-                                    enums::BankNames::Bunq,
-                                    enums::BankNames::CapitalBankGraweGruppeAg,
-                                    enums::BankNames::Citi,
-                                    enums::BankNames::Dolomitenbank,
-                                    enums::BankNames::EasybankAg,
-                                    enums::BankNames::ErsteBankUndSparkassen,
-                                    enums::BankNames::Handelsbanken,
-                                    enums::BankNames::HypoAlpeadriabankInternationalAg,
-                                    enums::BankNames::HypoNoeLbFurNiederosterreichUWien,
-                                    enums::BankNames::HypoOberosterreichSalzburgSteiermark,
-                                    enums::BankNames::HypoTirolBankAg,
-                                    enums::BankNames::HypoVorarlbergBankAg,
-                                    enums::BankNames::HypoBankBurgenlandAktiengesellschaft,
-                                    enums::BankNames::Ing,
-                                    enums::BankNames::Knab,
-                                    enums::BankNames::MarchfelderBank,
-                                    enums::BankNames::OberbankAg,
-                                    enums::BankNames::RaiffeisenBankengruppeOsterreich,
-                                    enums::BankNames::Rabobank,
-                                    enums::BankNames::Regiobank,
-                                    enums::BankNames::Revolut,
-                                    enums::BankNames::SnsBank,
-                                    enums::BankNames::TriodosBank,
-                                    enums::BankNames::VanLanschot,
-                                    enums::BankNames::Moneyou,
-                                    enums::BankNames::SchoellerbankAg,
-                                    enums::BankNames::SpardaBankWien,
-                                    enums::BankNames::VolksbankGruppe,
-                                    enums::BankNames::VolkskreditbankAg,
-                                    enums::BankNames::VrBankBraunau,
-                                    enums::BankNames::PlusBank,
-                                    enums::BankNames::EtransferPocztowy24,
-                                    enums::BankNames::BankiSpbdzielcze,
-                                    enums::BankNames::BankNowyBfgSa,
-                                    enums::BankNames::GetinBank,
-                                    enums::BankNames::Blik,
-                                    enums::BankNames::NoblePay,
-                                    enums::BankNames::IdeaBank,
-                                    enums::BankNames::EnveloBank,
-                                    enums::BankNames::NestPrzelew,
-                                    enums::BankNames::MbankMtransfer,
-                                    enums::BankNames::Inteligo,
-                                    enums::BankNames::PbacZIpko,
-                                    enums::BankNames::BnpParibas,
-                                    enums::BankNames::BankPekaoSa,
-                                    enums::BankNames::VolkswagenBank,
-                                    enums::BankNames::AliorBank,
-                                    enums::BankNames::Boz,
-                                ]
-                                .into_iter()
-                                .collect(),
+                                bank_config
+                                    .0
+                                    .get(&enums::PaymentMethodType::Eps)
+                                    .and_then(|connector_bank_names| {
+                                        connector_bank_names.0.get("stripe")
+                                    })
+                                    .map(|bank_names| bank_names.banks.clone())
+                                    .unwrap_or_default(),
                             ),
                             RequiredField::BillingLastName("billing_name", FieldType::UserFullName),
                         ],
diff --git a/crates/payment_methods/src/configs/settings.rs b/crates/payment_methods/src/configs/settings.rs
index 888a17cd0a8..9bad38ccad9 100644
--- a/crates/payment_methods/src/configs/settings.rs
+++ b/crates/payment_methods/src/configs/settings.rs
@@ -22,6 +22,17 @@ pub struct ConnectorFields {
     pub fields: HashMap<enums::Connector, RequiredFieldFinal>,
 }
 
+#[derive(Debug, Deserialize, Clone, Default)]
+pub struct BankRedirectConfig(pub HashMap<enums::PaymentMethodType, ConnectorBankNames>);
+#[derive(Debug, Deserialize, Clone)]
+pub struct ConnectorBankNames(pub HashMap<String, BanksVector>);
+
+#[derive(Debug, Deserialize, Clone)]
+pub struct BanksVector {
+    #[serde(deserialize_with = "deserialize_hashset")]
+    pub banks: HashSet<common_enums::enums::BankNames>,
+}
+
 #[cfg(feature = "v1")]
 #[derive(Debug, Serialize, Deserialize, Clone)]
 pub struct RequiredFieldFinal {
diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs
index ae4c8a3cda0..0e057d5310d 100644
--- a/crates/router/src/configs/settings.rs
+++ b/crates/router/src/configs/settings.rs
@@ -30,9 +30,10 @@ use hyperswitch_interfaces::{
 };
 use masking::Secret;
 pub use payment_methods::configs::settings::{
-    ConnectorFields, EligiblePaymentMethods, Mandates, PaymentMethodAuth, PaymentMethodType,
-    RequiredFieldFinal, RequiredFields, SupportedConnectorsForMandate,
-    SupportedPaymentMethodTypesForMandate, SupportedPaymentMethodsForMandate, ZeroMandates,
+    BankRedirectConfig, BanksVector, ConnectorBankNames, ConnectorFields, EligiblePaymentMethods,
+    Mandates, PaymentMethodAuth, PaymentMethodType, RequiredFieldFinal, RequiredFields,
+    SupportedConnectorsForMandate, SupportedPaymentMethodTypesForMandate,
+    SupportedPaymentMethodsForMandate, ZeroMandates,
 };
 use redis_interface::RedisSettings;
 pub use router_env::config::{Log, LogConsole, LogFile, LogTelemetry};
@@ -652,17 +653,6 @@ pub enum PaymentMethodTypeTokenFilter {
     AllAccepted,
 }
 
-#[derive(Debug, Deserialize, Clone, Default)]
-pub struct BankRedirectConfig(pub HashMap<enums::PaymentMethodType, ConnectorBankNames>);
-#[derive(Debug, Deserialize, Clone)]
-pub struct ConnectorBankNames(pub HashMap<String, BanksVector>);
-
-#[derive(Debug, Deserialize, Clone)]
-pub struct BanksVector {
-    #[serde(deserialize_with = "deserialize_hashset")]
-    pub banks: HashSet<common_enums::enums::BankNames>,
-}
-
 #[derive(Debug, Deserialize, Clone, Default)]
 #[serde(transparent)]
 pub struct ConnectorFilters(pub HashMap<String, PaymentMethodFilters>);
@@ -986,9 +976,14 @@ impl Settings<SecuredSecret> {
             .build()
             .change_context(ApplicationError::ConfigurationError)?;
 
-        serde_path_to_error::deserialize(config)
+        let mut settings: Self = serde_path_to_error::deserialize(config)
             .attach_printable("Unable to deserialize application configuration")
-            .change_context(ApplicationError::ConfigurationError)
+            .change_context(ApplicationError::ConfigurationError)?;
+        #[cfg(feature = "v1")]
+        {
+            settings.required_fields = RequiredFields::new(&settings.bank_config);
+        }
+        Ok(settings)
     }
 
     pub fn validate(&self) -> ApplicationResult<()> {

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->

Previously the bank names were hard coded but we needed to read form `{config}.toml` files to send the supported banks inside `user_bank_options`  

## Depricating bank list on top level of `ResponsePaymentMethodTypes` as we need to send it inside particular required fields .

```rust
pub struct ResponsePaymentMethodTypes {
    /// The payment method type enabled
    #[schema(example = "klarna", value_type = PaymentMethodType)]
    pub payment_method_type: api_enums::PaymentMethodType,

    /// The list of payment experiences enabled, if applicable for a payment method type
    pub payment_experience: Option<Vec<PaymentExperienceTypes>>,

    /// The list of card networks enabled, if applicable for a payment method type
    pub card_networks: Option<Vec<CardNetworkTypes>>,

    #[schema(deprecated)] // --------------------DEPRICATED-------------------------- //
    /// The list of banks enabled, if applicable for a payment method type
    pub bank_names: Option<Vec<BankCodeResponse>>,

    /// The Bank debit payment method information, if applicable for a payment method type.
    pub bank_debits: Option<BankDebitTypes>,

    /// The Bank transfer payment method information, if applicable for a payment method type.
    pub bank_transfers: Option<BankTransferTypes>,

    /// Required fields for the payment_method_type.
    pub required_fields: Option<HashMap<String, RequiredFieldInfo>>,

    /// surcharge details for this payment method type if exists
    pub surcharge_details: Option<SurchargeDetailsResponse>,

    /// auth service connector label for this payment method type, if exists
    pub pm_auth_connector: Option<String>,
}
```


## payment method types response


<details>
 <summary>Payment Request</summary>

```json 
{
  "payment_id": "pay_6W7NAlavGWBsNle4fjCm",
  "merchant_id": "merchant_1751973151",
  "status": "requires_payment_method",
  "amount": 6500,
  "net_amount": 6500,
  "amount_capturable": 0,
  "client_secret": "pay_6W7NAlavGWBsNle4fjCm_secret_cGp7blq0k5NBezW6gCmH",
  "created": "2025-07-08T11:49:13.894Z",
  "currency": "EUR",
  "customer_id": "hyperswitch_sdk_demo_id",
  "customer": {
    "id": "hyperswitch_sdk_demo_id",
    "email": "user@gmail.com"
  },
  "description": "Hello this is description",
  "setup_future_usage": "on_session",
  "capture_method": "automatic",
  "shipping": {
    "address": {
      "city": "Banglore",
      "country": "AT",
      "line1": "sdsdfsdf",
      "line2": "hsgdbhd",
      "line3": "alsksoe",
      "zip": "571201",
      "state": "California",
      "first_name": "John",
      "last_name": "Doe"
    },
    "phone": {
      "number": "123456789",
      "country_code": "+1"
    }
  },
  "billing": {
    "address": {
      "city": "San Fransico",
      "country": "AT",
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "zip": "94122",
      "state": "California",
      "first_name": "joseph",
      "last_name": "Doe"
    },
    "phone": {
      "number": "8056594427",
      "country_code": "+91"
    }
  },
  "order_details": [
    {
      "amount": 6500,
      "quantity": 1,
      "product_name": "Apple iphone 15"
    }
  ],
  "email": "user@gmail.com",
  "business_label": "default",
  "ephemeral_key": {
    "customer_id": "hyperswitch_sdk_demo_id",
    "created_at": 1751975353,
    "expires": 1751978953,
    "secret": "epk_78740ac9b3a7426e9ed57c14c801fb4f"
  },
  "metadata": {
    "udf1": "value1",
    "login_date": "2019-09-10T10:11:12Z",
    "new_customer": "true"
  },
  "connector_metadata": {
    "noon": {
      "order_category": "applepay"
    }
  },
  "profile_id": "pro_2UxGWjdVxvRMEw6zBI2V",
  "attempt_count": 1,
  "external_3ds_authentication_attempted": false,
  "expires_on": "2025-07-08T12:04:13.894Z",
  "updated": "2025-07-08T11:49:13.908Z",
  "force_3ds_challenge": false,
  "force_3ds_challenge_trigger": false
}

```

</details>



### GET http://localhost:8080/account/payment_methods?client_secret=pay_gvSgEeG6HZU6PnwbHhno_secret_gTL5Uke9uC8r3XGUs3Kx

```json
{
  "redirect_url": "https://google.com/success",
  "currency": "EUR",
  "payment_methods": [
    {
      "payment_method": "bank_redirect",
      "payment_method_types": [
        {
          "payment_method_type": "eps",
          "payment_experience": null,
          "card_networks": null,
          "bank_names": [
            {
              "bank_name": [
                "hypo_tirol_bank_ag",
                "brull_kallmus_bank_ag",
                "volkskreditbank_ag",
                "capital_bank_grawe_gruppe_ag",
                "btv_vier_lander_bank",
                "marchfelder_bank",
                "easybank_ag",
                "hypo_vorarlberg_bank_ag",
                "hypo_alpeadriabank_international_ag",
                "oberbank_ag",
                "hypo_noe_lb_fur_niederosterreich_u_wien",
                "volksbank_gruppe",
                "hypo_oberosterreich_salzburg_steiermark",
                "hypo_bank_burgenland_aktiengesellschaft",
                "dolomitenbank",
                "austrian_anadi_bank_ag",
                "raiffeisen_bankengruppe_osterreich",
                "sparda_bank_wien",
                "arzte_und_apotheker_bank",
                "bankhaus_schelhammer_und_schattera_ag",
                "bank_austria",
                "bawag_psk_ag",
                "schoellerbank_ag",
                "vr_bank_braunau",
                "erste_bank_und_sparkassen",
                "bankhaus_carl_spangler",
                "bks_bank_ag"
              ],
              "eligible_connectors": ["stripe"]
            }
          ],
          "bank_debits": null,
          "bank_transfers": null,
          "required_fields": {
            "billing.address.first_name": {
              "required_field": "payment_method_data.billing.address.first_name",
              "display_name": "billing_name",
              "field_type": "user_full_name",
              "value": "joseph"
            },
            "payment_method_data.bank_redirect.eps.bank_name": {
              "required_field": "payment_method_data.bank_redirect.eps.bank_name",
              "display_name": "bank_name",
              "field_type": {
                "user_bank_options": {
                  "options": [
                    "hypo_tirol_bank_ag",
                    "brull_kallmus_bank_ag",
                    "volkskreditbank_ag",
                    "capital_bank_grawe_gruppe_ag",
                    "btv_vier_lander_bank",
                    "marchfelder_bank",
                    "easybank_ag",
                    "hypo_vorarlberg_bank_ag",
                    "hypo_alpeadriabank_international_ag",
                    "oberbank_ag",
                    "hypo_noe_lb_fur_niederosterreich_u_wien",
                    "volksbank_gruppe",
                    "hypo_oberosterreich_salzburg_steiermark",
                    "hypo_bank_burgenland_aktiengesellschaft",
                    "dolomitenbank",
                    "austrian_anadi_bank_ag",
                    "raiffeisen_bankengruppe_osterreich",
                    "sparda_bank_wien",
                    "arzte_und_apotheker_bank",
                    "bankhaus_schelhammer_und_schattera_ag",
                    "bank_austria",
                    "bawag_psk_ag",
                    "schoellerbank_ag",
                    "vr_bank_braunau",
                    "erste_bank_und_sparkassen",
                    "bankhaus_carl_spangler",
                    "bks_bank_ag"
                  ]
                }
              },
              "value": null
            },
            "billing.address.last_name": {
              "required_field": "payment_method_data.billing.address.last_name",
              "display_name": "billing_name",
              "field_type": "user_full_name",
              "value": "Doe"
            }
          },
          "surcharge_details": null,
          "pm_auth_connector": null
        }
      ]
    }
  ],
  "mandate_payment": null,
  "merchant_name": "NewAge Retailer",
  "show_surcharge_breakup_screen": false,
  "payment_type": "normal",
  "request_external_three_ds_authentication": false,
  "collect_shipping_details_from_wallets": false,
  "collect_billing_details_from_wallets": false,
  "is_tax_calculation_enabled": false
}

```

Related Pr: https://github.com/juspay/hyperswitch/pull/8577

### Additional Changes

- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
