Bug: [REFACTOR] Move cybersource, bankofamerica, wellsfargo to crate hyperswitch_connectors



### Feature Description

Move cybersource, bankofamerica, wellsfargo code to crate hyperswitch_connectors.

### Possible Implementation

Move cybersource, bankofamerica, wellsfargo code to crate hyperswitch_connectors.

### Have you spent some time checking if this feature request has been raised before?

- [X] I checked and didn't find a similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

Yes, I am willing to submit a PR!
diff --git a/Cargo.lock b/Cargo.lock
index 2007f4f88a0..7583fb2eeee 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4003,6 +4003,7 @@ dependencies = [
  "hyperswitch_domain_models",
  "hyperswitch_interfaces",
  "image",
+ "josekit",
  "lazy_static",
  "masking",
  "mime",
diff --git a/crates/hyperswitch_connectors/Cargo.toml b/crates/hyperswitch_connectors/Cargo.toml
index ca9e77283cd..68ea60af8c6 100644
--- a/crates/hyperswitch_connectors/Cargo.toml
+++ b/crates/hyperswitch_connectors/Cargo.toml
@@ -21,6 +21,7 @@ error-stack = "0.4.1"
 hex = "0.4.3"
 http = "0.2.12"
 image = { version = "0.25.1", default-features = false, features = ["png"] }
+josekit = "0.8.6"
 mime = "0.3.17"
 once_cell = "1.19.0"
 qrcode = "0.14.0"
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index d5a695fe01d..bd646c95eb9 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -2,6 +2,7 @@ pub mod airwallex;
 pub mod amazonpay;
 pub mod bambora;
 pub mod bamboraapac;
+pub mod bankofamerica;
 pub mod billwerk;
 pub mod bitpay;
 pub mod bluesnap;
@@ -10,6 +11,7 @@ pub mod cashtocode;
 pub mod coinbase;
 pub mod cryptopay;
 pub mod ctp_mastercard;
+pub mod cybersource;
 pub mod datatrans;
 pub mod deutschebank;
 pub mod digitalvirgo;
@@ -47,6 +49,7 @@ pub mod thunes;
 pub mod tsys;
 pub mod unified_authentication_service;
 pub mod volt;
+pub mod wellsfargo;
 pub mod worldline;
 pub mod worldpay;
 pub mod xendit;
@@ -55,8 +58,9 @@ pub mod zsl;
 
 pub use self::{
     airwallex::Airwallex, amazonpay::Amazonpay, bambora::Bambora, bamboraapac::Bamboraapac,
-    billwerk::Billwerk, bitpay::Bitpay, bluesnap::Bluesnap, boku::Boku, cashtocode::Cashtocode,
-    coinbase::Coinbase, cryptopay::Cryptopay, ctp_mastercard::CtpMastercard, datatrans::Datatrans,
+    bankofamerica::Bankofamerica, billwerk::Billwerk, bitpay::Bitpay, bluesnap::Bluesnap,
+    boku::Boku, cashtocode::Cashtocode, coinbase::Coinbase, cryptopay::Cryptopay,
+    ctp_mastercard::CtpMastercard, cybersource::Cybersource, datatrans::Datatrans,
     deutschebank::Deutschebank, digitalvirgo::Digitalvirgo, dlocal::Dlocal, elavon::Elavon,
     fiserv::Fiserv, fiservemea::Fiservemea, fiuu::Fiuu, forte::Forte, globepay::Globepay,
     gocardless::Gocardless, helcim::Helcim, inespay::Inespay, jpmorgan::Jpmorgan, mollie::Mollie,
@@ -65,5 +69,6 @@ pub use self::{
     powertranz::Powertranz, prophetpay::Prophetpay, rapyd::Rapyd, razorpay::Razorpay,
     redsys::Redsys, shift4::Shift4, square::Square, stax::Stax, taxjar::Taxjar, thunes::Thunes,
     tsys::Tsys, unified_authentication_service::UnifiedAuthenticationService, volt::Volt,
-    worldline::Worldline, worldpay::Worldpay, xendit::Xendit, zen::Zen, zsl::Zsl,
+    wellsfargo::Wellsfargo, worldline::Worldline, worldpay::Worldpay, xendit::Xendit, zen::Zen,
+    zsl::Zsl,
 };
diff --git a/crates/router/src/connector/bankofamerica.rs b/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
similarity index 70%
rename from crates/router/src/connector/bankofamerica.rs
rename to crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
index 95ceee55589..36d12fe3fc5 100644
--- a/crates/router/src/connector/bankofamerica.rs
+++ b/crates/hyperswitch_connectors/src/connectors/bankofamerica.rs
@@ -3,36 +3,57 @@ pub mod transformers;
 use std::fmt::Debug;
 
 use base64::Engine;
-use common_utils::request::RequestContent;
-use diesel_models::enums;
+use common_enums::enums;
+use common_utils::{
+    consts,
+    errors::CustomResult,
+    ext_traits::BytesExt,
+    request::{Method, Request, RequestBuilder, RequestContent},
+};
 use error_stack::{report, ResultExt};
-use masking::{ExposeInterface, PeekInterface};
+use hyperswitch_domain_models::{
+    payment_method_data::PaymentMethodData,
+    router_data::{AccessToken, ErrorResponse, RouterData},
+    router_flow_types::{
+        access_token_auth::AccessTokenAuth,
+        payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
+        refunds::{Execute, RSync},
+    },
+    router_request_types::{
+        AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+        PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
+        RefundsData, SetupMandateRequestData,
+    },
+    router_response_types::{PaymentsResponseData, RefundsResponseData},
+    types::{
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData, SetupMandateRouterData,
+    },
+};
+use hyperswitch_interfaces::{
+    api::{
+        self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+        ConnectorValidation,
+    },
+    configs::Connectors,
+    errors,
+    events::connector_api_logs::ConnectorEvent,
+    types::{
+        PaymentsAuthorizeType, PaymentsCaptureType, PaymentsSyncType, PaymentsVoidType,
+        RefundExecuteType, RefundSyncType, Response, SetupMandateType,
+    },
+    webhooks,
+};
+use masking::{ExposeInterface, Mask, Maskable, PeekInterface};
 use ring::{digest, hmac};
 use time::OffsetDateTime;
 use transformers as bankofamerica;
 use url::Url;
 
 use crate::{
-    configs::settings,
-    connector::{
-        utils as connector_utils,
-        utils::{PaymentMethodDataType, RefundsRequestData},
-    },
-    consts,
-    core::errors::{self, CustomResult},
-    events::connector_api_logs::ConnectorEvent,
-    headers,
-    services::{
-        self,
-        request::{self, Mask},
-        ConnectorIntegration, ConnectorSpecifications, ConnectorValidation,
-    },
-    types::{
-        self,
-        api::{self, ConnectorCommon, ConnectorCommonExt},
-        ErrorResponse, Response,
-    },
-    utils::BytesExt,
+    constants::{self, headers},
+    types::ResponseRouterData,
+    utils::{self, PaymentMethodDataType, RefundsRequestData},
 };
 
 pub const V_C_MERCHANT_ID: &str = "v-c-merchant-id";
@@ -66,14 +87,14 @@ impl Bankofamerica {
         resource: &str,
         payload: &String,
         date: OffsetDateTime,
-        http_method: services::Method,
+        http_method: Method,
     ) -> CustomResult<String, errors::ConnectorError> {
         let bankofamerica::BankOfAmericaAuthType {
             api_key,
             merchant_account,
             api_secret,
         } = auth;
-        let is_post_method = matches!(http_method, services::Method::Post);
+        let is_post_method = matches!(http_method, Method::Post);
         let digest_str = if is_post_method { "digest " } else { "" };
         let headers = format!("host date (request-target) {digest_str}{V_C_MERCHANT_ID}");
         let request_target = if is_post_method {
@@ -102,12 +123,8 @@ impl Bankofamerica {
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::PaymentMethodToken,
-        types::PaymentMethodTokenizationData,
-        types::PaymentsResponseData,
-    > for Bankofamerica
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+    for Bankofamerica
 {
     // Not Implemented (R)
 }
@@ -118,9 +135,9 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RouterData<Flow, Request, Response>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         let date = OffsetDateTime::now_utc();
         let boa_req = self.get_request_body(req, connectors)?;
         let http_method = self.get_http_method();
@@ -161,7 +178,7 @@ where
             ("Host".to_string(), host.to_string().into()),
             ("Signature".to_string(), signature.into_masked()),
         ];
-        if matches!(http_method, services::Method::Post | services::Method::Put) {
+        if matches!(http_method, Method::Post | Method::Put) {
             headers.push((
                 "Digest".to_string(),
                 format!("SHA-256={sha256}").into_masked(),
@@ -184,7 +201,7 @@ impl ConnectorCommon for Bankofamerica {
         "application/json;charset=utf-8"
     }
 
-    fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
+    fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
         connectors.bankofamerica.base_url.as_ref()
     }
 
@@ -202,9 +219,9 @@ impl ConnectorCommon for Bankofamerica {
         router_env::logger::info!(connector_response=?response);
 
         let error_message = if res.status_code == 401 {
-            consts::CONNECTOR_UNAUTHORIZED_ERROR
+            constants::CONNECTOR_UNAUTHORIZED_ERROR
         } else {
-            consts::NO_ERROR_MESSAGE
+            hyperswitch_interfaces::consts::NO_ERROR_MESSAGE
         };
         match response {
             transformers::BankOfAmericaErrorResponse::StandardError(response) => {
@@ -236,12 +253,10 @@ impl ConnectorCommon for Bankofamerica {
                                 .join(", ")
                         });
                         (
-                            response
-                                .reason
-                                .clone()
-                                .map_or(consts::NO_ERROR_CODE.to_string(), |reason| {
-                                    reason.to_string()
-                                }),
+                            response.reason.clone().map_or(
+                                hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
+                                |reason| reason.to_string(),
+                            ),
                             response
                                 .reason
                                 .map_or(error_message.to_string(), |reason| reason.to_string()),
@@ -266,7 +281,7 @@ impl ConnectorCommon for Bankofamerica {
             transformers::BankOfAmericaErrorResponse::AuthenticationError(response) => {
                 Ok(ErrorResponse {
                     status_code: res.status_code,
-                    code: consts::NO_ERROR_CODE.to_string(),
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: response.response.rmsg.clone(),
                     reason: Some(response.response.rmsg),
                     attempt_status: None,
@@ -290,48 +305,39 @@ impl ConnectorValidation for Bankofamerica {
             | enums::CaptureMethod::Manual
             | enums::CaptureMethod::SequentialAutomatic => Ok(()),
             enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
-                connector_utils::construct_not_implemented_error_report(capture_method, self.id()),
+                utils::construct_not_implemented_error_report(capture_method, self.id()),
             ),
         }
     }
 
     fn validate_mandate_payment(
         &self,
-        pm_type: Option<types::storage::enums::PaymentMethodType>,
-        pm_data: types::domain::payments::PaymentMethodData,
+        pm_type: Option<enums::PaymentMethodType>,
+        pm_data: PaymentMethodData,
     ) -> CustomResult<(), errors::ConnectorError> {
         let mandate_supported_pmd = std::collections::HashSet::from([
             PaymentMethodDataType::Card,
             PaymentMethodDataType::ApplePay,
             PaymentMethodDataType::GooglePay,
         ]);
-        connector_utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
+        utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
     }
 }
 
-impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Bankofamerica {
     //TODO: implement sessions flow
 }
 
-impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
-    for Bankofamerica
-{
-}
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Bankofamerica {}
 
-impl
-    ConnectorIntegration<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    > for Bankofamerica
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+    for Bankofamerica
 {
     fn get_headers(
         &self,
-        req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &SetupMandateRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
@@ -339,15 +345,15 @@ impl
     }
     fn get_url(
         &self,
-        _req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
+        _req: &SetupMandateRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}pts/v2/payments/", self.base_url(connectors)))
     }
     fn get_request_body(
         &self,
-        req: &types::SetupMandateRouterData,
-        _connectors: &settings::Connectors,
+        req: &SetupMandateRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_req = bankofamerica::BankOfAmericaPaymentsRequest::try_from(req)?;
         Ok(RequestContent::Json(Box::new(connector_req)))
@@ -355,31 +361,25 @@ impl
 
     fn build_request(
         &self,
-        req: &types::RouterData<
-            api::SetupMandate,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
-        >,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::SetupMandateType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&SetupMandateType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::SetupMandateType::get_headers(self, req, connectors)?)
-                .set_body(types::SetupMandateType::get_request_body(
-                    self, req, connectors,
-                )?)
+                .headers(SetupMandateType::get_headers(self, req, connectors)?)
+                .set_body(SetupMandateType::get_request_body(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::SetupMandateRouterData,
+        data: &SetupMandateRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::SetupMandateRouterData, errors::ConnectorError> {
+    ) -> CustomResult<SetupMandateRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaSetupMandatesResponse = res
             .response
             .parse_struct("BankOfAmericaSetupMandatesResponse")
@@ -388,7 +388,7 @@ impl
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -426,24 +426,26 @@ impl
         Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData>
     for Bankofamerica
 {
     fn get_headers(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -453,8 +455,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_url(
         &self,
-        _req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}pts/v2/payments/",
@@ -464,8 +466,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = bankofamerica::BankOfAmericaRouterData::try_from((
             &self.get_currency_unit(),
@@ -480,20 +482,16 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsAuthorizeType::get_url(
-                    self, req, connectors,
-                )?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsAuthorizeType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsAuthorizeType::get_headers(
-                    self, req, connectors,
-                )?)
-                .set_body(types::PaymentsAuthorizeType::get_request_body(
+                .headers(PaymentsAuthorizeType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsAuthorizeType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -502,17 +500,17 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeRouterData,
+        data: &PaymentsAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaPaymentsResponse = res
             .response
             .parse_struct("Bankofamerica PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -550,24 +548,24 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Bankofamerica {
     fn get_headers(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -575,14 +573,14 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
         self.common_get_content_type()
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req
             .request
@@ -597,32 +595,32 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn build_request(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
+                .headers(PaymentsSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
 
     fn handle_response(
         &self,
-        data: &types::PaymentsSyncRouterData,
+        data: &PaymentsSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaTransactionResponse = res
             .response
             .parse_struct("BankOfAmerica PaymentSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -638,14 +636,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     }
 }
 
-impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Bankofamerica {
     fn get_headers(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -655,8 +651,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_url(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -667,8 +663,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = bankofamerica::BankOfAmericaRouterData::try_from((
             &self.get_currency_unit(),
@@ -683,18 +679,16 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn build_request(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsCaptureType::get_headers(
-                    self, req, connectors,
-                )?)
-                .set_body(types::PaymentsCaptureType::get_request_body(
+                .headers(PaymentsCaptureType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsCaptureType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -703,17 +697,17 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCaptureRouterData,
+        data: &PaymentsCaptureRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCaptureRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaPaymentsResponse = res
             .response
             .parse_struct("BankOfAmerica PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -744,31 +738,31 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
         Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Bankofamerica {
     fn get_headers(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -783,8 +777,8 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = bankofamerica::BankOfAmericaRouterData::try_from((
             &self.get_currency_unit(),
@@ -808,35 +802,33 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn build_request(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsVoidType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
-                .set_body(types::PaymentsVoidType::get_request_body(
-                    self, req, connectors,
-                )?)
+                .headers(PaymentsVoidType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsVoidType::get_request_body(self, req, connectors)?)
                 .build(),
         ))
     }
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCancelRouterData,
+        data: &PaymentsCancelRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCancelRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaPaymentsResponse = res
             .response
             .parse_struct("BankOfAmerica PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -867,24 +859,24 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
         Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Bankofamerica {
     fn get_headers(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -894,8 +886,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_url(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -906,8 +898,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_request_body(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        _connectors: &settings::Connectors,
+        req: &RefundsRouterData<Execute>,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = bankofamerica::BankOfAmericaRouterData::try_from((
             &self.get_currency_unit(),
@@ -922,29 +914,25 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn build_request(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
-            .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
+            .url(&RefundExecuteType::get_url(self, req, connectors)?)
             .attach_default_headers()
-            .headers(types::RefundExecuteType::get_headers(
-                self, req, connectors,
-            )?)
-            .set_body(types::RefundExecuteType::get_request_body(
-                self, req, connectors,
-            )?)
+            .headers(RefundExecuteType::get_headers(self, req, connectors)?)
+            .set_body(RefundExecuteType::get_request_body(self, req, connectors)?)
             .build();
         Ok(Some(request))
     }
 
     fn handle_response(
         &self,
-        data: &types::RefundsRouterData<api::Execute>,
+        data: &RefundsRouterData<Execute>,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundsRouterData<api::Execute>, errors::ConnectorError> {
+    ) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaRefundResponse = res
             .response
             .parse_struct("bankofamerica RefundResponse")
@@ -953,7 +941,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -969,14 +957,12 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
 }
 
-impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData>
-    for Bankofamerica
-{
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Bankofamerica {
     fn get_headers(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -984,14 +970,14 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
         self.common_get_content_type()
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
 
     fn get_url(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let refund_id = req.request.get_connector_refund_id()?;
         Ok(format!(
@@ -1002,32 +988,32 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn build_request(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::RefundSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
+                .headers(RefundSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
 
     fn handle_response(
         &self,
-        data: &types::RefundSyncRouterData,
+        data: &RefundSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
+    ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
         let response: bankofamerica::BankOfAmericaRsyncResponse = res
             .response
             .parse_struct("bankofamerica RefundSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1044,24 +1030,24 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 }
 
 #[async_trait::async_trait]
-impl api::IncomingWebhook for Bankofamerica {
+impl webhooks::IncomingWebhook for Bankofamerica {
     fn get_webhook_object_reference_id(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::webhooks::ObjectReferenceId, errors::ConnectorError> {
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
 
     fn get_webhook_event_type(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::IncomingWebhookEvent, errors::ConnectorError> {
-        Err(report!(errors::ConnectorError::WebhooksNotImplemented))
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+        Ok(api_models::webhooks::IncomingWebhookEvent::EventNotSupported)
     }
 
     fn get_webhook_resource_object(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
diff --git a/crates/router/src/connector/bankofamerica/transformers.rs b/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
similarity index 70%
rename from crates/router/src/connector/bankofamerica/transformers.rs
rename to crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
index 48363481ad8..3602f771928 100644
--- a/crates/router/src/connector/bankofamerica/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
@@ -1,38 +1,48 @@
 use base64::Engine;
-use common_utils::pii;
+use common_enums::{enums, FutureUsage};
+use common_utils::{consts, pii};
+use hyperswitch_domain_models::{
+    payment_method_data::{ApplePayWalletData, GooglePayWalletData, PaymentMethodData, WalletData},
+    router_data::{
+        AdditionalPaymentMethodConnectorResponse, ApplePayPredecryptData, ConnectorAuthType,
+        ConnectorResponseData, ErrorResponse, PaymentMethodToken, RouterData,
+    },
+    router_flow_types::refunds::{Execute, RSync},
+    router_request_types::{
+        PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSyncData,
+        ResponseId,
+    },
+    router_response_types::{MandateReference, PaymentsResponseData, RefundsResponseData},
+    types::{
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        RefundsRouterData, SetupMandateRouterData,
+    },
+};
+use hyperswitch_interfaces::{api, errors};
 use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
 use serde_json::Value;
 
 use crate::{
-    connector::utils::{
-        self, AddressDetailsData, ApplePayDecrypt, CardData, CardIssuer,
-        PaymentsAuthorizeRequestData, PaymentsSetupMandateRequestData, PaymentsSyncRequestData,
-        RecurringMandateData, RouterData,
-    },
-    consts,
-    core::errors,
-    types::{
-        self,
-        api::{self, enums as api_enums},
-        domain,
-        storage::enums,
-        transformers::ForeignFrom,
-        ApplePayPredecryptData,
-    },
+    constants,
+    types::{RefundsResponseRouterData, ResponseRouterData},
     unimplemented_payment_method,
+    utils::{
+        self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
+        PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
+        RouterData as OtherRouterData,
+    },
 };
-
 pub struct BankOfAmericaAuthType {
     pub(super) api_key: Secret<String>,
     pub(super) merchant_account: Secret<String>,
     pub(super) api_secret: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for BankOfAmericaAuthType {
+impl TryFrom<&ConnectorAuthType> for BankOfAmericaAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
-        if let types::ConnectorAuthType::SignatureKey {
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+        if let ConnectorAuthType::SignatureKey {
             api_key,
             key1,
             api_secret,
@@ -54,10 +64,17 @@ pub struct BankOfAmericaRouterData<T> {
     pub router_data: T,
 }
 
-impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BankOfAmericaRouterData<T> {
+impl<T> TryFrom<(&api::CurrencyUnit, api_models::enums::Currency, i64, T)>
+    for BankOfAmericaRouterData<T>
+{
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
+        (currency_unit, currency, amount, item): (
+            &api::CurrencyUnit,
+            api_models::enums::Currency,
+            i64,
+            T,
+        ),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
         Ok(Self {
@@ -264,68 +281,64 @@ pub struct BillTo {
     administrative_area: Option<Secret<String>>,
     #[serde(skip_serializing_if = "Option::is_none")]
     postal_code: Option<Secret<String>>,
-    country: Option<api_enums::CountryAlpha2>,
+    country: Option<enums::CountryAlpha2>,
     email: pii::Email,
 }
 
-impl TryFrom<&types::SetupMandateRouterData> for BankOfAmericaPaymentsRequest {
+impl TryFrom<&SetupMandateRouterData> for BankOfAmericaPaymentsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(item: &types::SetupMandateRouterData) -> Result<Self, Self::Error> {
+    fn try_from(item: &SetupMandateRouterData) -> Result<Self, Self::Error> {
         match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(card_data) => Self::try_from((item, card_data)),
-            domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                domain::WalletData::ApplePay(apple_pay_data) => {
-                    Self::try_from((item, apple_pay_data))
-                }
-                domain::WalletData::GooglePay(google_pay_data) => {
-                    Self::try_from((item, google_pay_data))
-                }
-                domain::WalletData::AliPayQr(_)
-                | domain::WalletData::AliPayRedirect(_)
-                | domain::WalletData::AliPayHkRedirect(_)
-                | domain::WalletData::MomoRedirect(_)
-                | domain::WalletData::KakaoPayRedirect(_)
-                | domain::WalletData::GoPayRedirect(_)
-                | domain::WalletData::GcashRedirect(_)
-                | domain::WalletData::ApplePayRedirect(_)
-                | domain::WalletData::ApplePayThirdPartySdk(_)
-                | domain::WalletData::DanaRedirect {}
-                | domain::WalletData::GooglePayRedirect(_)
-                | domain::WalletData::GooglePayThirdPartySdk(_)
-                | domain::WalletData::MbWayRedirect(_)
-                | domain::WalletData::MobilePayRedirect(_)
-                | domain::WalletData::PaypalRedirect(_)
-                | domain::WalletData::PaypalSdk(_)
-                | domain::WalletData::Paze(_)
-                | domain::WalletData::SamsungPay(_)
-                | domain::WalletData::TwintRedirect {}
-                | domain::WalletData::VippsRedirect {}
-                | domain::WalletData::TouchNGoRedirect(_)
-                | domain::WalletData::WeChatPayRedirect(_)
-                | domain::WalletData::WeChatPayQr(_)
-                | domain::WalletData::CashappQr(_)
-                | domain::WalletData::SwishQr(_)
-                | domain::WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+            PaymentMethodData::Card(card_data) => Self::try_from((item, card_data)),
+            PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                WalletData::ApplePay(apple_pay_data) => Self::try_from((item, apple_pay_data)),
+                WalletData::GooglePay(google_pay_data) => Self::try_from((item, google_pay_data)),
+                WalletData::AliPayQr(_)
+                | WalletData::AliPayRedirect(_)
+                | WalletData::AliPayHkRedirect(_)
+                | WalletData::MomoRedirect(_)
+                | WalletData::KakaoPayRedirect(_)
+                | WalletData::GoPayRedirect(_)
+                | WalletData::GcashRedirect(_)
+                | WalletData::ApplePayRedirect(_)
+                | WalletData::ApplePayThirdPartySdk(_)
+                | WalletData::DanaRedirect {}
+                | WalletData::GooglePayRedirect(_)
+                | WalletData::GooglePayThirdPartySdk(_)
+                | WalletData::MbWayRedirect(_)
+                | WalletData::MobilePayRedirect(_)
+                | WalletData::PaypalRedirect(_)
+                | WalletData::PaypalSdk(_)
+                | WalletData::Paze(_)
+                | WalletData::SamsungPay(_)
+                | WalletData::TwintRedirect {}
+                | WalletData::VippsRedirect {}
+                | WalletData::TouchNGoRedirect(_)
+                | WalletData::WeChatPayRedirect(_)
+                | WalletData::WeChatPayQr(_)
+                | WalletData::CashappQr(_)
+                | WalletData::SwishQr(_)
+                | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("BankOfAmerica"),
                 ))?,
             },
-            domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("BankOfAmerica"),
                 ))?
@@ -335,38 +348,29 @@ impl TryFrom<&types::SetupMandateRouterData> for BankOfAmericaPaymentsRequest {
 }
 
 impl<F, T>
-    TryFrom<
-        types::ResponseRouterData<
-            F,
-            BankOfAmericaSetupMandatesResponse,
-            T,
-            types::PaymentsResponseData,
-        >,
-    > for types::RouterData<F, T, types::PaymentsResponseData>
+    TryFrom<ResponseRouterData<F, BankOfAmericaSetupMandatesResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            F,
-            BankOfAmericaSetupMandatesResponse,
-            T,
-            types::PaymentsResponseData,
-        >,
+        item: ResponseRouterData<F, BankOfAmericaSetupMandatesResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         match item.response {
             BankOfAmericaSetupMandatesResponse::ClientReferenceInformation(info_response) => {
-                let mandate_reference = info_response.token_information.clone().map(|token_info| {
-                    types::MandateReference {
-                        connector_mandate_id: token_info
-                            .payment_instrument
-                            .map(|payment_instrument| payment_instrument.id.expose()),
-                        payment_method_id: None,
-                        mandate_metadata: None,
-                        connector_mandate_request_reference_id: None,
-                    }
-                });
+                let mandate_reference =
+                    info_response
+                        .token_information
+                        .clone()
+                        .map(|token_info| MandateReference {
+                            connector_mandate_id: token_info
+                                .payment_instrument
+                                .map(|payment_instrument| payment_instrument.id.expose()),
+                            payment_method_id: None,
+                            mandate_metadata: None,
+                            connector_mandate_request_reference_id: None,
+                        });
                 let mut mandate_status =
-                    enums::AttemptStatus::foreign_from((info_response.status.clone(), false));
+                    map_boa_attempt_status((info_response.status.clone(), false));
                 if matches!(mandate_status, enums::AttemptStatus::Authorized) {
                     //In case of zero auth mandates we want to make the payment reach the terminal status so we are converting the authorized status to charged as well.
                     mandate_status = enums::AttemptStatus::Charged
@@ -383,13 +387,13 @@ impl<F, T>
                                 .consumer_authentication_information
                                 .as_ref()
                                 .map(|consumer_auth_information| {
-                                    types::AdditionalPaymentMethodConnectorResponse::foreign_from((
+                                    convert_to_additional_payment_method_connector_response(
                                         processor_information,
                                         consumer_auth_information,
-                                    ))
+                                    )
                                 })
                         })
-                        .map(types::ConnectorResponseData::with_additional_payment_method_data),
+                        .map(ConnectorResponseData::with_additional_payment_method_data),
                     common_enums::PaymentMethod::CardRedirect
                     | common_enums::PaymentMethod::PayLater
                     | common_enums::PaymentMethod::Wallet
@@ -410,8 +414,8 @@ impl<F, T>
                     status: mandate_status,
                     response: match error_response {
                         Some(error) => Err(error),
-                        None => Ok(types::PaymentsResponseData::TransactionResponse {
-                            resource_id: types::ResponseId::ConnectorTransactionId(
+                        None => Ok(PaymentsResponseData::TransactionResponse {
+                            resource_id: ResponseId::ConnectorTransactionId(
                                 info_response.id.clone(),
                             ),
                             redirection_data: Box::new(None),
@@ -434,10 +438,10 @@ impl<F, T>
                 })
             }
             BankOfAmericaSetupMandatesResponse::ErrorInformation(error_response) => {
-                let response = Err(types::ErrorResponse::foreign_from((
-                    &*error_response,
+                let response = Err(convert_to_error_response_from_error_info(
+                    &error_response,
                     item.http_code,
-                )));
+                ));
                 Ok(Self {
                     response,
                     status: enums::AttemptStatus::Failure,
@@ -522,23 +526,6 @@ fn build_bill_to(
         .unwrap_or(default_address))
 }
 
-impl From<CardIssuer> for String {
-    fn from(card_issuer: CardIssuer) -> Self {
-        let card_type = match card_issuer {
-            CardIssuer::AmericanExpress => "003",
-            CardIssuer::Master => "002",
-            //"042" is the type code for Masetro Cards(International). For Maestro Cards(UK-Domestic) the mapping should be "024"
-            CardIssuer::Maestro => "042",
-            CardIssuer::Visa => "001",
-            CardIssuer::Discover => "004",
-            CardIssuer::DinersClub => "005",
-            CardIssuer::CarteBlanche => "006",
-            CardIssuer::JCB => "007",
-        };
-        card_type.to_string()
-    }
-}
-
 fn get_boa_card_type(card_network: common_enums::CardNetwork) -> Option<&'static str> {
     match card_network {
         common_enums::CardNetwork::Visa => Some("001"),
@@ -579,13 +566,13 @@ pub enum TransactionType {
 
 impl
     From<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
         Option<BillTo>,
     )> for OrderInformationWithBill
 {
     fn from(
         (item, bill_to): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
             Option<BillTo>,
         ),
     ) -> Self {
@@ -601,7 +588,7 @@ impl
 
 impl
     TryFrom<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
         Option<PaymentSolution>,
         Option<String>,
     )> for ProcessingInformation
@@ -610,52 +597,51 @@ impl
 
     fn try_from(
         (item, solution, network): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
             Option<PaymentSolution>,
             Option<String>,
         ),
     ) -> Result<Self, Self::Error> {
-        let (action_list, action_token_types, authorization_options) = if item
-            .router_data
-            .request
-            .setup_future_usage
-            == Some(common_enums::FutureUsage::OffSession)
-            && (item.router_data.request.customer_acceptance.is_some()
-                || item
+        let (action_list, action_token_types, authorization_options) =
+            if item.router_data.request.setup_future_usage == Some(FutureUsage::OffSession)
+                && (item.router_data.request.customer_acceptance.is_some()
+                    || item
+                        .router_data
+                        .request
+                        .setup_mandate_details
+                        .clone()
+                        .is_some_and(|mandate_details| {
+                            mandate_details.customer_acceptance.is_some()
+                        }))
+            {
+                get_boa_mandate_action_details()
+            } else if item.router_data.request.connector_mandate_id().is_some() {
+                let original_amount = item
                     .router_data
-                    .request
-                    .setup_mandate_details
-                    .clone()
-                    .is_some_and(|mandate_details| mandate_details.customer_acceptance.is_some()))
-        {
-            get_boa_mandate_action_details()
-        } else if item.router_data.request.connector_mandate_id().is_some() {
-            let original_amount = item
-                .router_data
-                .get_recurring_mandate_payment_data()?
-                .get_original_payment_amount()?;
-            let original_currency = item
-                .router_data
-                .get_recurring_mandate_payment_data()?
-                .get_original_payment_currency()?;
-            (
-                None,
-                None,
-                Some(BankOfAmericaAuthorizationOptions {
-                    initiator: None,
-                    merchant_intitiated_transaction: Some(MerchantInitiatedTransaction {
-                        reason: None,
-                        original_authorized_amount: Some(utils::get_amount_as_string(
-                            &api::CurrencyUnit::Base,
-                            original_amount,
-                            original_currency,
-                        )?),
+                    .get_recurring_mandate_payment_data()?
+                    .get_original_payment_amount()?;
+                let original_currency = item
+                    .router_data
+                    .get_recurring_mandate_payment_data()?
+                    .get_original_payment_currency()?;
+                (
+                    None,
+                    None,
+                    Some(BankOfAmericaAuthorizationOptions {
+                        initiator: None,
+                        merchant_intitiated_transaction: Some(MerchantInitiatedTransaction {
+                            reason: None,
+                            original_authorized_amount: Some(utils::get_amount_as_string(
+                                &api::CurrencyUnit::Base,
+                                original_amount,
+                                original_currency,
+                            )?),
+                        }),
                     }),
-                }),
-            )
-        } else {
-            (None, None, None)
-        };
+                )
+            } else {
+                (None, None, None)
+            };
 
         let commerce_indicator = get_commerce_indicator(network);
 
@@ -674,40 +660,35 @@ impl
     }
 }
 
-impl From<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
-    for ClientReferenceInformation
-{
-    fn from(item: &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>) -> Self {
+impl From<&BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>> for ClientReferenceInformation {
+    fn from(item: &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>) -> Self {
         Self {
             code: Some(item.router_data.connector_request_reference_id.clone()),
         }
     }
 }
 
-impl From<&types::SetupMandateRouterData> for ClientReferenceInformation {
-    fn from(item: &types::SetupMandateRouterData) -> Self {
+impl From<&SetupMandateRouterData> for ClientReferenceInformation {
+    fn from(item: &SetupMandateRouterData) -> Self {
         Self {
             code: Some(item.connector_request_reference_id.clone()),
         }
     }
 }
 
-impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
-    fn foreign_from(metadata: Value) -> Self {
-        let hashmap: std::collections::BTreeMap<String, Value> =
-            serde_json::from_str(&metadata.to_string())
-                .unwrap_or(std::collections::BTreeMap::new());
-        let mut vector: Self = Self::new();
-        let mut iter = 1;
-        for (key, value) in hashmap {
-            vector.push(MerchantDefinedInformation {
-                key: iter,
-                value: format!("{key}={value}"),
-            });
-            iter += 1;
-        }
-        vector
+fn convert_metadata_to_merchant_defined_info(metadata: Value) -> Vec<MerchantDefinedInformation> {
+    let hashmap: std::collections::BTreeMap<String, Value> =
+        serde_json::from_str(&metadata.to_string()).unwrap_or(std::collections::BTreeMap::new());
+    let mut vector = Vec::new();
+    let mut iter = 1;
+    for (key, value) in hashmap {
+        vector.push(MerchantDefinedInformation {
+            key: iter,
+            value: format!("{key}={value}"),
+        });
+        iter += 1;
     }
+    vector
 }
 
 #[derive(Clone, Debug, Deserialize, Serialize)]
@@ -821,15 +802,15 @@ pub struct Avs {
 
 impl
     TryFrom<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::Card,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
+        hyperswitch_domain_models::payment_method_data::Card,
     )> for BankOfAmericaPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, ccard): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::Card,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
+            hyperswitch_domain_models::payment_method_data::Card,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -843,7 +824,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -858,17 +839,17 @@ impl
 
 impl
     TryFrom<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
         Box<ApplePayPredecryptData>,
-        domain::ApplePayWalletData,
+        ApplePayWalletData,
     )> for BankOfAmericaPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, apple_pay_data, apple_pay_wallet_data): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
             Box<ApplePayPredecryptData>,
-            domain::ApplePayWalletData,
+            ApplePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -886,7 +867,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         let ucaf_collection_indicator = match apple_pay_wallet_data
             .payment_method
             .network
@@ -916,15 +897,15 @@ impl
 
 impl
     TryFrom<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::GooglePayWalletData,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
+        GooglePayWalletData,
     )> for BankOfAmericaPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, google_pay_data): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::GooglePayWalletData,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
+            GooglePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -939,7 +920,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -952,33 +933,33 @@ impl
     }
 }
 
-impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
+impl TryFrom<&BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>>
     for BankOfAmericaPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+        item: &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.connector_mandate_id() {
             Some(connector_mandate_id) => Self::try_from((item, connector_mandate_id)),
             None => {
                 match item.router_data.request.payment_method_data.clone() {
-                    domain::PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
-                    domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                        domain::WalletData::ApplePay(apple_pay_data) => {
+                    PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
+                    PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                        WalletData::ApplePay(apple_pay_data) => {
                             match item.router_data.payment_method_token.clone() {
                                 Some(payment_method_token) => match payment_method_token {
-                                    types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                                    PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
                                         Self::try_from((item, decrypt_data, apple_pay_data))
                                     }
-                                    types::PaymentMethodToken::Token(_) => {
+                                    PaymentMethodToken::Token(_) => {
                                         Err(unimplemented_payment_method!(
                                             "Apple Pay",
                                             "Manual",
                                             "Bank Of America"
                                         ))?
                                     }
-                                    types::PaymentMethodToken::PazeDecrypt(_) => Err(
+                                    PaymentMethodToken::PazeDecrypt(_) => Err(
                                         unimplemented_payment_method!("Paze", "Bank Of America"),
                                     )?,
                                 },
@@ -1000,12 +981,12 @@ impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
                                         ClientReferenceInformation::from(item);
                                     let payment_information =
                                         PaymentInformation::from(&apple_pay_data);
-                                    let merchant_defined_information =
-                                        item.router_data.request.metadata.clone().map(|metadata| {
-                                            Vec::<MerchantDefinedInformation>::foreign_from(
-                                                metadata,
-                                            )
-                                        });
+                                    let merchant_defined_information = item
+                                        .router_data
+                                        .request
+                                        .metadata
+                                        .clone()
+                                        .map(convert_metadata_to_merchant_defined_info);
                                     let ucaf_collection_indicator = match apple_pay_data
                                         .payment_method
                                         .network
@@ -1035,47 +1016,45 @@ impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
                                 }
                             }
                         }
-                        domain::WalletData::GooglePay(google_pay_data) => {
+                        WalletData::GooglePay(google_pay_data) => {
                             Self::try_from((item, google_pay_data))
                         }
 
-                        domain::WalletData::AliPayQr(_)
-                        | domain::WalletData::AliPayRedirect(_)
-                        | domain::WalletData::AliPayHkRedirect(_)
-                        | domain::WalletData::MomoRedirect(_)
-                        | domain::WalletData::KakaoPayRedirect(_)
-                        | domain::WalletData::GoPayRedirect(_)
-                        | domain::WalletData::GcashRedirect(_)
-                        | domain::WalletData::ApplePayRedirect(_)
-                        | domain::WalletData::ApplePayThirdPartySdk(_)
-                        | domain::WalletData::DanaRedirect {}
-                        | domain::WalletData::GooglePayRedirect(_)
-                        | domain::WalletData::GooglePayThirdPartySdk(_)
-                        | domain::WalletData::MbWayRedirect(_)
-                        | domain::WalletData::MobilePayRedirect(_)
-                        | domain::WalletData::PaypalRedirect(_)
-                        | domain::WalletData::PaypalSdk(_)
-                        | domain::WalletData::Paze(_)
-                        | domain::WalletData::SamsungPay(_)
-                        | domain::WalletData::TwintRedirect {}
-                        | domain::WalletData::VippsRedirect {}
-                        | domain::WalletData::TouchNGoRedirect(_)
-                        | domain::WalletData::WeChatPayRedirect(_)
-                        | domain::WalletData::WeChatPayQr(_)
-                        | domain::WalletData::CashappQr(_)
-                        | domain::WalletData::SwishQr(_)
-                        | domain::WalletData::Mifinity(_) => {
-                            Err(errors::ConnectorError::NotImplemented(
-                                utils::get_unimplemented_payment_method_error_message(
-                                    "Bank of America",
-                                ),
-                            )
-                            .into())
-                        }
+                        WalletData::AliPayQr(_)
+                        | WalletData::AliPayRedirect(_)
+                        | WalletData::AliPayHkRedirect(_)
+                        | WalletData::MomoRedirect(_)
+                        | WalletData::KakaoPayRedirect(_)
+                        | WalletData::GoPayRedirect(_)
+                        | WalletData::GcashRedirect(_)
+                        | WalletData::ApplePayRedirect(_)
+                        | WalletData::ApplePayThirdPartySdk(_)
+                        | WalletData::DanaRedirect {}
+                        | WalletData::GooglePayRedirect(_)
+                        | WalletData::GooglePayThirdPartySdk(_)
+                        | WalletData::MbWayRedirect(_)
+                        | WalletData::MobilePayRedirect(_)
+                        | WalletData::PaypalRedirect(_)
+                        | WalletData::PaypalSdk(_)
+                        | WalletData::Paze(_)
+                        | WalletData::SamsungPay(_)
+                        | WalletData::TwintRedirect {}
+                        | WalletData::VippsRedirect {}
+                        | WalletData::TouchNGoRedirect(_)
+                        | WalletData::WeChatPayRedirect(_)
+                        | WalletData::WeChatPayQr(_)
+                        | WalletData::CashappQr(_)
+                        | WalletData::SwishQr(_)
+                        | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+                            utils::get_unimplemented_payment_method_error_message(
+                                "Bank of America",
+                            ),
+                        )
+                        .into()),
                     },
                     // If connector_mandate_id is present MandatePayment will be the PMD, the case will be handled in the first `if` clause.
                     // This is a fallback implementation in the event of catastrophe.
-                    domain::PaymentMethodData::MandatePayment => {
+                    PaymentMethodData::MandatePayment => {
                         let connector_mandate_id =
                             item.router_data.request.connector_mandate_id().ok_or(
                                 errors::ConnectorError::MissingRequiredField {
@@ -1084,22 +1063,22 @@ impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
                             )?;
                         Self::try_from((item, connector_mandate_id))
                     }
-                    domain::PaymentMethodData::CardRedirect(_)
-                    | domain::PaymentMethodData::PayLater(_)
-                    | domain::PaymentMethodData::BankRedirect(_)
-                    | domain::PaymentMethodData::BankDebit(_)
-                    | domain::PaymentMethodData::BankTransfer(_)
-                    | domain::PaymentMethodData::Crypto(_)
-                    | domain::PaymentMethodData::Reward
-                    | domain::PaymentMethodData::RealTimePayment(_)
-                    | domain::PaymentMethodData::MobilePayment(_)
-                    | domain::PaymentMethodData::Upi(_)
-                    | domain::PaymentMethodData::Voucher(_)
-                    | domain::PaymentMethodData::GiftCard(_)
-                    | domain::PaymentMethodData::OpenBanking(_)
-                    | domain::PaymentMethodData::CardToken(_)
-                    | domain::PaymentMethodData::NetworkToken(_)
-                    | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+                    PaymentMethodData::CardRedirect(_)
+                    | PaymentMethodData::PayLater(_)
+                    | PaymentMethodData::BankRedirect(_)
+                    | PaymentMethodData::BankDebit(_)
+                    | PaymentMethodData::BankTransfer(_)
+                    | PaymentMethodData::Crypto(_)
+                    | PaymentMethodData::Reward
+                    | PaymentMethodData::RealTimePayment(_)
+                    | PaymentMethodData::MobilePayment(_)
+                    | PaymentMethodData::Upi(_)
+                    | PaymentMethodData::Voucher(_)
+                    | PaymentMethodData::GiftCard(_)
+                    | PaymentMethodData::OpenBanking(_)
+                    | PaymentMethodData::CardToken(_)
+                    | PaymentMethodData::NetworkToken(_)
+                    | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                         Err(errors::ConnectorError::NotImplemented(
                             utils::get_unimplemented_payment_method_error_message(
                                 "Bank of America",
@@ -1115,14 +1094,14 @@ impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>>
 
 impl
     TryFrom<(
-        &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+        &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
         String,
     )> for BankOfAmericaPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, connector_mandate_id): (
-            &BankOfAmericaRouterData<&types::PaymentsAuthorizeRouterData>,
+            &BankOfAmericaRouterData<&PaymentsAuthorizeRouterData>,
             String,
         ),
     ) -> Result<Self, Self::Error> {
@@ -1145,7 +1124,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             processing_information,
             payment_information,
@@ -1181,42 +1160,44 @@ pub enum BankofamericaPaymentStatus {
     //PartialAuthorized, not being consumed yet.
 }
 
-impl ForeignFrom<(BankofamericaPaymentStatus, bool)> for enums::AttemptStatus {
-    fn foreign_from((status, auto_capture): (BankofamericaPaymentStatus, bool)) -> Self {
-        match status {
-            BankofamericaPaymentStatus::Authorized
-            | BankofamericaPaymentStatus::AuthorizedPendingReview => {
-                if auto_capture {
-                    // Because BankOfAmerica will return Payment Status as Authorized even in AutoCapture Payment
-                    Self::Charged
-                } else {
-                    Self::Authorized
-                }
-            }
-            BankofamericaPaymentStatus::Pending => {
-                if auto_capture {
-                    Self::Charged
-                } else {
-                    Self::Pending
-                }
+fn map_boa_attempt_status(
+    (status, auto_capture): (BankofamericaPaymentStatus, bool),
+) -> enums::AttemptStatus {
+    match status {
+        BankofamericaPaymentStatus::Authorized
+        | BankofamericaPaymentStatus::AuthorizedPendingReview => {
+            if auto_capture {
+                // Because BankOfAmerica will return Payment Status as Authorized even in AutoCapture Payment
+                enums::AttemptStatus::Charged
+            } else {
+                enums::AttemptStatus::Authorized
             }
-            BankofamericaPaymentStatus::Succeeded | BankofamericaPaymentStatus::Transmitted => {
-                Self::Charged
+        }
+        BankofamericaPaymentStatus::Pending => {
+            if auto_capture {
+                enums::AttemptStatus::Charged
+            } else {
+                enums::AttemptStatus::Pending
             }
-            BankofamericaPaymentStatus::Voided
-            | BankofamericaPaymentStatus::Reversed
-            | BankofamericaPaymentStatus::Cancelled => Self::Voided,
-            BankofamericaPaymentStatus::Failed
-            | BankofamericaPaymentStatus::Declined
-            | BankofamericaPaymentStatus::AuthorizedRiskDeclined
-            | BankofamericaPaymentStatus::InvalidRequest
-            | BankofamericaPaymentStatus::Rejected
-            | BankofamericaPaymentStatus::ServerError => Self::Failure,
-            BankofamericaPaymentStatus::PendingAuthentication => Self::AuthenticationPending,
-            BankofamericaPaymentStatus::PendingReview
-            | BankofamericaPaymentStatus::Challenge
-            | BankofamericaPaymentStatus::Accepted => Self::Pending,
         }
+        BankofamericaPaymentStatus::Succeeded | BankofamericaPaymentStatus::Transmitted => {
+            enums::AttemptStatus::Charged
+        }
+        BankofamericaPaymentStatus::Voided
+        | BankofamericaPaymentStatus::Reversed
+        | BankofamericaPaymentStatus::Cancelled => enums::AttemptStatus::Voided,
+        BankofamericaPaymentStatus::Failed
+        | BankofamericaPaymentStatus::Declined
+        | BankofamericaPaymentStatus::AuthorizedRiskDeclined
+        | BankofamericaPaymentStatus::InvalidRequest
+        | BankofamericaPaymentStatus::Rejected
+        | BankofamericaPaymentStatus::ServerError => enums::AttemptStatus::Failure,
+        BankofamericaPaymentStatus::PendingAuthentication => {
+            enums::AttemptStatus::AuthenticationPending
+        }
+        BankofamericaPaymentStatus::PendingReview
+        | BankofamericaPaymentStatus::Challenge
+        | BankofamericaPaymentStatus::Accepted => enums::AttemptStatus::Pending,
     }
 }
 
@@ -1300,7 +1281,7 @@ pub struct PaymentInformationResponse {
     bin: Option<String>,
     account_type: Option<String>,
     issuer: Option<String>,
-    bin_country: Option<api_enums::CountryAlpha2>,
+    bin_country: Option<enums::CountryAlpha2>,
 }
 
 #[derive(Debug, Clone, Deserialize, Serialize)]
@@ -1371,7 +1352,7 @@ pub struct BankOfAmericaTokenInformation {
 #[derive(Debug, Clone, Deserialize, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct IssuerInformation {
-    country: Option<api_enums::CountryAlpha2>,
+    country: Option<enums::CountryAlpha2>,
     discretionary_data: Option<String>,
     country_specific_discretionary_data: Option<String>,
     response_code: Option<String>,
@@ -1403,71 +1384,55 @@ pub struct BankOfAmericaErrorInformation {
     details: Option<Vec<Details>>,
 }
 
-impl<F, T>
-    ForeignFrom<(
-        &BankOfAmericaErrorInformationResponse,
-        types::ResponseRouterData<F, BankOfAmericaPaymentsResponse, T, types::PaymentsResponseData>,
-        Option<enums::AttemptStatus>,
-    )> for types::RouterData<F, T, types::PaymentsResponseData>
-{
-    fn foreign_from(
-        (error_response, item, transaction_status): (
-            &BankOfAmericaErrorInformationResponse,
-            types::ResponseRouterData<
-                F,
-                BankOfAmericaPaymentsResponse,
-                T,
-                types::PaymentsResponseData,
-            >,
-            Option<enums::AttemptStatus>,
-        ),
-    ) -> Self {
-        let detailed_error_info =
-            error_response
-                .error_information
-                .details
-                .as_ref()
-                .map(|details| {
-                    details
-                        .iter()
-                        .map(|details| format!("{} : {}", details.field, details.reason))
-                        .collect::<Vec<_>>()
-                        .join(", ")
-                });
-
-        let reason = get_error_reason(
-            error_response.error_information.message.clone(),
-            detailed_error_info,
-            None,
-        );
-        let response = Err(types::ErrorResponse {
-            code: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code: item.http_code,
-            attempt_status: None,
-            connector_transaction_id: Some(error_response.id.clone()),
+fn map_error_response<F, T>(
+    error_response: &BankOfAmericaErrorInformationResponse,
+    item: ResponseRouterData<F, BankOfAmericaPaymentsResponse, T, PaymentsResponseData>,
+    transaction_status: Option<enums::AttemptStatus>,
+) -> RouterData<F, T, PaymentsResponseData> {
+    let detailed_error_info = error_response
+        .error_information
+        .details
+        .as_ref()
+        .map(|details| {
+            details
+                .iter()
+                .map(|details| format!("{} : {}", details.field, details.reason))
+                .collect::<Vec<_>>()
+                .join(", ")
         });
 
-        match transaction_status {
-            Some(status) => Self {
-                response,
-                status,
-                ..item.data
-            },
-            None => Self {
-                response,
-                ..item.data
-            },
-        }
+    let reason = get_error_reason(
+        error_response.error_information.message.clone(),
+        detailed_error_info,
+        None,
+    );
+    let response = Err(ErrorResponse {
+        code: error_response
+            .error_information
+            .reason
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+        message: error_response
+            .error_information
+            .reason
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
+        reason,
+        status_code: item.http_code,
+        attempt_status: None,
+        connector_transaction_id: Some(error_response.id.clone()),
+    });
+
+    match transaction_status {
+        Some(status) => RouterData {
+            response,
+            status,
+            ..item.data
+        },
+        None => RouterData {
+            response,
+            ..item.data
+        },
     }
 }
 
@@ -1477,15 +1442,15 @@ fn get_error_response_if_failure(
         enums::AttemptStatus,
         u16,
     ),
-) -> Option<types::ErrorResponse> {
+) -> Option<ErrorResponse> {
     if utils::is_payment_failure(status) {
-        Some(types::ErrorResponse::foreign_from((
+        Some(get_error_response(
             &info_response.error_information,
             &info_response.risk_information,
             Some(status),
             http_code,
             info_response.id.clone(),
-        )))
+        ))
     } else {
         None
     }
@@ -1497,7 +1462,7 @@ fn get_payment_response(
         enums::AttemptStatus,
         u16,
     ),
-) -> Result<types::PaymentsResponseData, types::ErrorResponse> {
+) -> Result<PaymentsResponseData, ErrorResponse> {
     let error_response = get_error_response_if_failure((info_response, status, http_code));
     match error_response {
         Some(error) => Err(error),
@@ -1506,7 +1471,7 @@ fn get_payment_response(
                 info_response
                     .token_information
                     .clone()
-                    .map(|token_info| types::MandateReference {
+                    .map(|token_info| MandateReference {
                         connector_mandate_id: token_info
                             .payment_instrument
                             .map(|payment_instrument| payment_instrument.id.expose()),
@@ -1515,8 +1480,8 @@ fn get_payment_response(
                         connector_mandate_request_reference_id: None,
                     });
 
-            Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(info_response.id.clone()),
+            Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(info_response.id.clone()),
                 redirection_data: Box::new(None),
                 mandate_reference: Box::new(mandate_reference),
                 connector_metadata: None,
@@ -1537,26 +1502,26 @@ fn get_payment_response(
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsAuthorizeData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsAuthorizeData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response {
             BankOfAmericaPaymentsResponse::ClientReferenceInformation(info_response) => {
-                let status = enums::AttemptStatus::foreign_from((
+                let status = map_boa_attempt_status((
                     info_response.status.clone(),
                     item.data.request.is_auto_capture()?,
                 ));
@@ -1570,13 +1535,13 @@ impl<F>
                                 .consumer_authentication_information
                                 .as_ref()
                                 .map(|consumer_auth_information| {
-                                    types::AdditionalPaymentMethodConnectorResponse::foreign_from((
+                                    convert_to_additional_payment_method_connector_response(
                                         processor_information,
                                         consumer_auth_information,
-                                    ))
+                                    )
                                 })
                         })
-                        .map(types::ConnectorResponseData::with_additional_payment_method_data),
+                        .map(ConnectorResponseData::with_additional_payment_method_data),
                     common_enums::PaymentMethod::CardRedirect
                     | common_enums::PaymentMethod::PayLater
                     | common_enums::PaymentMethod::Wallet
@@ -1601,31 +1566,21 @@ impl<F>
                 })
             }
             BankOfAmericaPaymentsResponse::ErrorInformation(ref error_response) => {
-                Ok(Self::foreign_from((
-                    &*error_response.clone(),
+                Ok(map_error_response(
+                    &error_response.clone(),
                     item,
                     Some(enums::AttemptStatus::Failure),
-                )))
+                ))
             }
         }
     }
 }
 
-impl
-    ForeignFrom<(
-        &ClientProcessorInformation,
-        &ConsumerAuthenticationInformation,
-    )> for types::AdditionalPaymentMethodConnectorResponse
-{
-    fn foreign_from(
-        item: (
-            &ClientProcessorInformation,
-            &ConsumerAuthenticationInformation,
-        ),
-    ) -> Self {
-        let processor_information = item.0;
-        let consumer_authentication_information = item.1;
-        let payment_checks = Some(serde_json::json!({
+fn convert_to_additional_payment_method_connector_response(
+    processor_information: &ClientProcessorInformation,
+    consumer_authentication_information: &ConsumerAuthenticationInformation,
+) -> AdditionalPaymentMethodConnectorResponse {
+    let payment_checks = Some(serde_json::json!({
         "avs_response": processor_information.avs,
         "card_verification": processor_information.card_verification,
         "approval_code": processor_information.approval_code,
@@ -1633,44 +1588,42 @@ impl
         "cavv": consumer_authentication_information.cavv,
         "eci": consumer_authentication_information.eci,
         "eci_raw": consumer_authentication_information.eci_raw,
-        }));
+    }));
 
-        let authentication_data = Some(serde_json::json!({
+    let authentication_data = Some(serde_json::json!({
         "retrieval_reference_number": processor_information.retrieval_reference_number,
         "acs_transaction_id": consumer_authentication_information.acs_transaction_id,
         "system_trace_audit_number": processor_information.system_trace_audit_number,
-        }));
+    }));
 
-        Self::Card {
-            authentication_data,
-            payment_checks,
-        }
+    AdditionalPaymentMethodConnectorResponse::Card {
+        authentication_data,
+        payment_checks,
     }
 }
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsCaptureData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsCaptureData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response {
             BankOfAmericaPaymentsResponse::ClientReferenceInformation(info_response) => {
-                let status =
-                    enums::AttemptStatus::foreign_from((info_response.status.clone(), true));
+                let status = map_boa_attempt_status((info_response.status.clone(), true));
                 let response = get_payment_response((&info_response, status, item.http_code));
                 Ok(Self {
                     status,
@@ -1679,7 +1632,7 @@ impl<F>
                 })
             }
             BankOfAmericaPaymentsResponse::ErrorInformation(ref error_response) => {
-                Ok(Self::foreign_from((&*error_response.clone(), item, None)))
+                Ok(map_error_response(&error_response.clone(), item, None))
             }
         }
     }
@@ -1687,27 +1640,26 @@ impl<F>
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
+            PaymentsCancelData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsCancelData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsCancelData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             BankOfAmericaPaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
+            PaymentsCancelData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response {
             BankOfAmericaPaymentsResponse::ClientReferenceInformation(info_response) => {
-                let status =
-                    enums::AttemptStatus::foreign_from((info_response.status.clone(), false));
+                let status = map_boa_attempt_status((info_response.status.clone(), false));
                 let response = get_payment_response((&info_response, status, item.http_code));
                 Ok(Self {
                     status,
@@ -1716,7 +1668,7 @@ impl<F>
                 })
             }
             BankOfAmericaPaymentsResponse::ErrorInformation(ref error_response) => {
-                Ok(Self::foreign_from((&*error_response.clone(), item, None)))
+                Ok(map_error_response(&error_response.clone(), item, None))
             }
         }
     }
@@ -1754,29 +1706,27 @@ pub struct ApplicationInformation {
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             BankOfAmericaTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsSyncData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsSyncData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             BankOfAmericaTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response.application_information.status {
             Some(app_status) => {
-                let status = enums::AttemptStatus::foreign_from((
-                    app_status,
-                    item.data.request.is_auto_capture()?,
-                ));
+                let status =
+                    map_boa_attempt_status((app_status, item.data.request.is_auto_capture()?));
 
                 let connector_response = match item.data.payment_method {
                     common_enums::PaymentMethod::Card => item
@@ -1788,13 +1738,13 @@ impl<F>
                                 .consumer_authentication_information
                                 .as_ref()
                                 .map(|consumer_auth_information| {
-                                    types::AdditionalPaymentMethodConnectorResponse::foreign_from((
+                                    convert_to_additional_payment_method_connector_response(
                                         processor_information,
                                         consumer_auth_information,
-                                    ))
+                                    )
                                 })
                         })
-                        .map(types::ConnectorResponseData::with_additional_payment_method_data),
+                        .map(ConnectorResponseData::with_additional_payment_method_data),
                     common_enums::PaymentMethod::CardRedirect
                     | common_enums::PaymentMethod::PayLater
                     | common_enums::PaymentMethod::Wallet
@@ -1814,13 +1764,13 @@ impl<F>
                 let risk_info: Option<ClientRiskInformation> = None;
                 if utils::is_payment_failure(status) {
                     Ok(Self {
-                        response: Err(types::ErrorResponse::foreign_from((
+                        response: Err(get_error_response(
                             &item.response.error_information,
                             &risk_info,
                             Some(status),
                             item.http_code,
                             item.response.id.clone(),
-                        ))),
+                        )),
                         status: enums::AttemptStatus::Failure,
                         connector_response,
                         ..item.data
@@ -1828,8 +1778,8 @@ impl<F>
                 } else {
                     Ok(Self {
                         status,
-                        response: Ok(types::PaymentsResponseData::TransactionResponse {
-                            resource_id: types::ResponseId::ConnectorTransactionId(
+                        response: Ok(PaymentsResponseData::TransactionResponse {
+                            resource_id: ResponseId::ConnectorTransactionId(
                                 item.response.id.clone(),
                             ),
                             redirection_data: Box::new(None),
@@ -1851,10 +1801,8 @@ impl<F>
             }
             None => Ok(Self {
                 status: item.data.status,
-                response: Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::ConnectorTransactionId(
-                        item.response.id.clone(),
-                    ),
+                response: Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                     redirection_data: Box::new(None),
                     mandate_reference: Box::new(None),
                     connector_metadata: None,
@@ -1884,19 +1832,17 @@ pub struct BankOfAmericaCaptureRequest {
     merchant_defined_information: Option<Vec<MerchantDefinedInformation>>,
 }
 
-impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsCaptureRouterData>>
-    for BankOfAmericaCaptureRequest
-{
+impl TryFrom<&BankOfAmericaRouterData<&PaymentsCaptureRouterData>> for BankOfAmericaCaptureRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: &BankOfAmericaRouterData<&types::PaymentsCaptureRouterData>,
+        value: &BankOfAmericaRouterData<&PaymentsCaptureRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = value
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             order_information: OrderInformation {
                 amount_details: Amount {
@@ -1929,19 +1875,17 @@ pub struct ReversalInformation {
     reason: String,
 }
 
-impl TryFrom<&BankOfAmericaRouterData<&types::PaymentsCancelRouterData>>
-    for BankOfAmericaVoidRequest
-{
+impl TryFrom<&BankOfAmericaRouterData<&PaymentsCancelRouterData>> for BankOfAmericaVoidRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: &BankOfAmericaRouterData<&types::PaymentsCancelRouterData>,
+        value: &BankOfAmericaRouterData<&PaymentsCancelRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = value
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             client_reference_information: ClientReferenceInformation {
                 code: Some(value.router_data.connector_request_reference_id.clone()),
@@ -1976,12 +1920,10 @@ pub struct BankOfAmericaRefundRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl<F> TryFrom<&BankOfAmericaRouterData<&types::RefundsRouterData<F>>>
-    for BankOfAmericaRefundRequest
-{
+impl<F> TryFrom<&BankOfAmericaRouterData<&RefundsRouterData<F>>> for BankOfAmericaRefundRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &BankOfAmericaRouterData<&types::RefundsRouterData<F>>,
+        item: &BankOfAmericaRouterData<&RefundsRouterData<F>>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             order_information: OrderInformation {
@@ -2029,24 +1971,24 @@ pub struct BankOfAmericaRefundResponse {
     error_information: Option<BankOfAmericaErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, BankOfAmericaRefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<RefundsResponseRouterData<Execute, BankOfAmericaRefundResponse>>
+    for RefundsRouterData<Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, BankOfAmericaRefundResponse>,
+        item: RefundsResponseRouterData<Execute, BankOfAmericaRefundResponse>,
     ) -> Result<Self, Self::Error> {
         let refund_status = enums::RefundStatus::from(item.response.clone());
         let response = if utils::is_refund_failure(refund_status) {
-            Err(types::ErrorResponse::foreign_from((
+            Err(get_error_response(
                 &item.response.error_information,
                 &None,
                 None,
                 item.http_code,
                 item.response.id,
-            )))
+            ))
         } else {
-            Ok(types::RefundsResponseData {
+            Ok(RefundsResponseData {
                 connector_refund_id: item.response.id,
                 refund_status,
             })
@@ -2086,12 +2028,12 @@ pub struct BankOfAmericaRsyncResponse {
     error_information: Option<BankOfAmericaErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, BankOfAmericaRsyncResponse>>
-    for types::RefundsRouterData<api::RSync>
+impl TryFrom<RefundsResponseRouterData<RSync, BankOfAmericaRsyncResponse>>
+    for RefundsRouterData<RSync>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, BankOfAmericaRsyncResponse>,
+        item: RefundsResponseRouterData<RSync, BankOfAmericaRsyncResponse>,
     ) -> Result<Self, Self::Error> {
         let response = match item
             .response
@@ -2121,35 +2063,35 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, BankOfAmericaRsyncResp
                 };
                 if utils::is_refund_failure(refund_status) {
                     if status == BankofamericaRefundStatus::Voided {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &Some(BankOfAmericaErrorInformation {
-                                message: Some(consts::REFUND_VOIDED.to_string()),
-                                reason: Some(consts::REFUND_VOIDED.to_string()),
+                                message: Some(constants::REFUND_VOIDED.to_string()),
+                                reason: Some(constants::REFUND_VOIDED.to_string()),
                                 details: None,
                             }),
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     } else {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &item.response.error_information,
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     }
                 } else {
-                    Ok(types::RefundsResponseData {
+                    Ok(RefundsResponseData {
                         connector_refund_id: item.response.id,
                         refund_status,
                     })
                 }
             }
 
-            None => Ok(types::RefundsResponseData {
+            None => Ok(RefundsResponseData {
                 connector_refund_id: item.response.id.clone(),
                 refund_status: match item.data.response {
                     Ok(response) => response.refund_status,
@@ -2222,87 +2164,84 @@ pub struct AuthenticationErrorInformation {
     pub rmsg: String,
 }
 
-impl
-    ForeignFrom<(
-        &Option<BankOfAmericaErrorInformation>,
-        &Option<ClientRiskInformation>,
-        Option<enums::AttemptStatus>,
-        u16,
-        String,
-    )> for types::ErrorResponse
-{
-    fn foreign_from(
-        (error_data, risk_information, attempt_status, status_code, transaction_id): (
-            &Option<BankOfAmericaErrorInformation>,
-            &Option<ClientRiskInformation>,
-            Option<enums::AttemptStatus>,
-            u16,
-            String,
-        ),
-    ) -> Self {
-        let avs_message = risk_information
-            .clone()
-            .map(|client_risk_information| {
-                client_risk_information.rules.map(|rules| {
-                    rules
-                        .iter()
-                        .map(|risk_info| {
-                            risk_info.name.clone().map_or("".to_string(), |name| {
-                                format!(" , {}", name.clone().expose())
-                            })
-                        })
-                        .collect::<Vec<String>>()
-                        .join("")
-                })
-            })
-            .unwrap_or(Some("".to_string()));
-
-        let detailed_error_info = error_data.to_owned().and_then(|error_info| {
-            error_info.details.map(|error_details| {
-                error_details
+fn get_error_response(
+    error_data: &Option<BankOfAmericaErrorInformation>,
+    risk_information: &Option<ClientRiskInformation>,
+    attempt_status: Option<enums::AttemptStatus>,
+    status_code: u16,
+    transaction_id: String,
+) -> ErrorResponse {
+    let avs_message = risk_information
+        .clone()
+        .map(|client_risk_information| {
+            client_risk_information.rules.map(|rules| {
+                rules
                     .iter()
-                    .map(|details| format!("{} : {}", details.field, details.reason))
-                    .collect::<Vec<_>>()
-                    .join(", ")
+                    .map(|risk_info| {
+                        risk_info.name.clone().map_or("".to_string(), |name| {
+                            format!(" , {}", name.clone().expose())
+                        })
+                    })
+                    .collect::<Vec<String>>()
+                    .join("")
             })
-        });
+        })
+        .unwrap_or(Some("".to_string()));
+
+    let detailed_error_info = error_data.to_owned().and_then(|error_info| {
+        error_info.details.map(|error_details| {
+            error_details
+                .iter()
+                .map(|details| format!("{} : {}", details.field, details.reason))
+                .collect::<Vec<_>>()
+                .join(", ")
+        })
+    });
 
-        let reason = get_error_reason(
-            error_data
-                .clone()
-                .and_then(|error_details| error_details.message),
-            detailed_error_info,
-            avs_message,
-        );
-        let error_message = error_data
+    let reason = get_error_reason(
+        error_data
             .clone()
-            .and_then(|error_details| error_details.reason);
-
-        Self {
-            code: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code,
-            attempt_status,
-            connector_transaction_id: Some(transaction_id.clone()),
-        }
+            .and_then(|error_details| error_details.message),
+        detailed_error_info,
+        avs_message,
+    );
+    let error_message = error_data
+        .clone()
+        .and_then(|error_details| error_details.reason);
+
+    ErrorResponse {
+        code: error_message
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+        message: error_message
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
+        reason,
+        status_code,
+        attempt_status,
+        connector_transaction_id: Some(transaction_id.clone()),
     }
 }
 
-impl TryFrom<(&types::SetupMandateRouterData, domain::Card)> for BankOfAmericaPaymentsRequest {
+impl
+    TryFrom<(
+        &SetupMandateRouterData,
+        hyperswitch_domain_models::payment_method_data::Card,
+    )> for BankOfAmericaPaymentsRequest
+{
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (item, ccard): (&types::SetupMandateRouterData, domain::Card),
+        (item, ccard): (
+            &SetupMandateRouterData,
+            hyperswitch_domain_models::payment_method_data::Card,
+        ),
     ) -> Result<Self, Self::Error> {
         let order_information = OrderInformationWithBill::try_from(item)?;
         let client_reference_information = ClientReferenceInformation::from(item);
-        let merchant_defined_information = item.request.metadata.clone().map(|metadata| {
-            Vec::<MerchantDefinedInformation>::foreign_from(metadata.peek().to_owned())
-        });
+        let merchant_defined_information =
+            item.request.metadata.clone().map(|metadata| {
+                convert_metadata_to_merchant_defined_info(metadata.peek().to_owned())
+            });
         let payment_information = PaymentInformation::try_from(&ccard)?;
         let processing_information = ProcessingInformation::try_from((None, None))?;
         Ok(Self {
@@ -2316,29 +2255,28 @@ impl TryFrom<(&types::SetupMandateRouterData, domain::Card)> for BankOfAmericaPa
     }
 }
 
-impl TryFrom<(&types::SetupMandateRouterData, domain::ApplePayWalletData)>
-    for BankOfAmericaPaymentsRequest
-{
+impl TryFrom<(&SetupMandateRouterData, ApplePayWalletData)> for BankOfAmericaPaymentsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (item, apple_pay_data): (&types::SetupMandateRouterData, domain::ApplePayWalletData),
+        (item, apple_pay_data): (&SetupMandateRouterData, ApplePayWalletData),
     ) -> Result<Self, Self::Error> {
         let order_information = OrderInformationWithBill::try_from(item)?;
         let client_reference_information = ClientReferenceInformation::from(item);
-        let merchant_defined_information = item.request.metadata.clone().map(|metadata| {
-            Vec::<MerchantDefinedInformation>::foreign_from(metadata.peek().to_owned())
-        });
+        let merchant_defined_information =
+            item.request.metadata.clone().map(|metadata| {
+                convert_metadata_to_merchant_defined_info(metadata.peek().to_owned())
+            });
         let payment_information = match item.payment_method_token.clone() {
             Some(payment_method_token) => match payment_method_token {
-                types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
                     PaymentInformation::try_from(&decrypt_data)?
                 }
-                types::PaymentMethodToken::Token(_) => Err(unimplemented_payment_method!(
+                PaymentMethodToken::Token(_) => Err(unimplemented_payment_method!(
                     "Apple Pay",
                     "Manual",
                     "Bank Of America"
                 ))?,
-                types::PaymentMethodToken::PazeDecrypt(_) => {
+                PaymentMethodToken::PazeDecrypt(_) => {
                     Err(unimplemented_payment_method!("Paze", "Bank Of America"))?
                 }
             },
@@ -2377,18 +2315,17 @@ impl TryFrom<(&types::SetupMandateRouterData, domain::ApplePayWalletData)>
     }
 }
 
-impl TryFrom<(&types::SetupMandateRouterData, domain::GooglePayWalletData)>
-    for BankOfAmericaPaymentsRequest
-{
+impl TryFrom<(&SetupMandateRouterData, GooglePayWalletData)> for BankOfAmericaPaymentsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (item, google_pay_data): (&types::SetupMandateRouterData, domain::GooglePayWalletData),
+        (item, google_pay_data): (&SetupMandateRouterData, GooglePayWalletData),
     ) -> Result<Self, Self::Error> {
         let order_information = OrderInformationWithBill::try_from(item)?;
         let client_reference_information = ClientReferenceInformation::from(item);
-        let merchant_defined_information = item.request.metadata.clone().map(|metadata| {
-            Vec::<MerchantDefinedInformation>::foreign_from(metadata.peek().to_owned())
-        });
+        let merchant_defined_information =
+            item.request.metadata.clone().map(|metadata| {
+                convert_metadata_to_merchant_defined_info(metadata.peek().to_owned())
+            });
         let payment_information = PaymentInformation::from(&google_pay_data);
         let processing_information =
             ProcessingInformation::try_from((Some(PaymentSolution::GooglePay), None))?;
@@ -2426,10 +2363,10 @@ impl TryFrom<(Option<PaymentSolution>, Option<String>)> for ProcessingInformatio
     }
 }
 
-impl TryFrom<&types::SetupMandateRouterData> for OrderInformationWithBill {
+impl TryFrom<&SetupMandateRouterData> for OrderInformationWithBill {
     type Error = error_stack::Report<errors::ConnectorError>;
 
-    fn try_from(item: &types::SetupMandateRouterData) -> Result<Self, Self::Error> {
+    fn try_from(item: &SetupMandateRouterData) -> Result<Self, Self::Error> {
         let email = item.request.get_email()?;
         let bill_to = build_bill_to(item.get_optional_billing(), email)?;
 
@@ -2443,10 +2380,12 @@ impl TryFrom<&types::SetupMandateRouterData> for OrderInformationWithBill {
     }
 }
 
-impl TryFrom<&domain::Card> for PaymentInformation {
+impl TryFrom<&hyperswitch_domain_models::payment_method_data::Card> for PaymentInformation {
     type Error = error_stack::Report<errors::ConnectorError>;
 
-    fn try_from(ccard: &domain::Card) -> Result<Self, Self::Error> {
+    fn try_from(
+        ccard: &hyperswitch_domain_models::payment_method_data::Card,
+    ) -> Result<Self, Self::Error> {
         let card_type = match ccard.card_network.clone().and_then(get_boa_card_type) {
             Some(card_network) => Some(card_network.to_string()),
             None => ccard.get_card_issuer().ok().map(String::from),
@@ -2485,8 +2424,8 @@ impl TryFrom<&Box<ApplePayPredecryptData>> for PaymentInformation {
     }
 }
 
-impl From<&domain::ApplePayWalletData> for PaymentInformation {
-    fn from(apple_pay_data: &domain::ApplePayWalletData) -> Self {
+impl From<&ApplePayWalletData> for PaymentInformation {
+    fn from(apple_pay_data: &ApplePayWalletData) -> Self {
         Self::ApplePayToken(Box::new(ApplePayTokenPaymentInformation {
             fluid_data: FluidData {
                 value: Secret::from(apple_pay_data.payment_data.clone()),
@@ -2498,8 +2437,8 @@ impl From<&domain::ApplePayWalletData> for PaymentInformation {
     }
 }
 
-impl From<&domain::GooglePayWalletData> for PaymentInformation {
-    fn from(google_pay_data: &domain::GooglePayWalletData) -> Self {
+impl From<&GooglePayWalletData> for PaymentInformation {
+    fn from(google_pay_data: &GooglePayWalletData) -> Self {
         Self::GooglePay(Box::new(GooglePayPaymentInformation {
             fluid_data: FluidData {
                 value: Secret::from(
@@ -2510,44 +2449,43 @@ impl From<&domain::GooglePayWalletData> for PaymentInformation {
     }
 }
 
-impl ForeignFrom<(&BankOfAmericaErrorInformationResponse, u16)> for types::ErrorResponse {
-    fn foreign_from(
-        (error_response, status_code): (&BankOfAmericaErrorInformationResponse, u16),
-    ) -> Self {
-        let detailed_error_info =
-            error_response
-                .error_information
-                .to_owned()
-                .details
-                .map(|error_details| {
-                    error_details
-                        .iter()
-                        .map(|details| format!("{} : {}", details.field, details.reason))
-                        .collect::<Vec<_>>()
-                        .join(", ")
-                });
-
-        let reason = get_error_reason(
-            error_response.error_information.message.to_owned(),
-            detailed_error_info,
-            None,
-        );
-        Self {
-            code: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code,
-            attempt_status: None,
-            connector_transaction_id: Some(error_response.id.clone()),
-        }
+fn convert_to_error_response_from_error_info(
+    error_response: &BankOfAmericaErrorInformationResponse,
+    status_code: u16,
+) -> ErrorResponse {
+    let detailed_error_info =
+        error_response
+            .error_information
+            .to_owned()
+            .details
+            .map(|error_details| {
+                error_details
+                    .iter()
+                    .map(|details| format!("{} : {}", details.field, details.reason))
+                    .collect::<Vec<_>>()
+                    .join(", ")
+            });
+
+    let reason = get_error_reason(
+        error_response.error_information.message.to_owned(),
+        detailed_error_info,
+        None,
+    );
+    ErrorResponse {
+        code: error_response
+            .error_information
+            .reason
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+        message: error_response
+            .error_information
+            .reason
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
+        reason,
+        status_code,
+        attempt_status: None,
+        connector_transaction_id: Some(error_response.id.clone()),
     }
 }
 
diff --git a/crates/router/src/connector/cybersource.rs b/crates/hyperswitch_connectors/src/connectors/cybersource.rs
similarity index 66%
rename from crates/router/src/connector/cybersource.rs
rename to crates/hyperswitch_connectors/src/connectors/cybersource.rs
index 078f66335f5..5a60f6d705a 100644
--- a/crates/router/src/connector/cybersource.rs
+++ b/crates/hyperswitch_connectors/src/connectors/cybersource.rs
@@ -1,40 +1,83 @@
 pub mod transformers;
 
 use base64::Engine;
+use common_enums::enums;
 use common_utils::{
-    request::RequestContent,
+    consts,
+    errors::CustomResult,
+    ext_traits::BytesExt,
+    request::{Method, Request, RequestBuilder, RequestContent},
     types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector},
 };
-use diesel_models::enums;
 use error_stack::{report, Report, ResultExt};
-use masking::{ExposeInterface, PeekInterface};
+use hyperswitch_domain_models::{
+    payment_method_data::PaymentMethodData,
+    router_data::{AccessToken, ErrorResponse, RouterData},
+    router_flow_types::{
+        access_token_auth::AccessTokenAuth,
+        mandate_revoke::MandateRevoke,
+        payments::{
+            Authorize, Capture, CompleteAuthorize, IncrementalAuthorization, PSync,
+            PaymentMethodToken, Session, SetupMandate, Void,
+        },
+        refunds::{Execute, RSync},
+        PreProcessing,
+    },
+    router_request_types::{
+        AccessTokenRequestData, CompleteAuthorizeData, MandateRevokeRequestData,
+        PaymentMethodTokenizationData, PaymentsAuthorizeData, PaymentsCancelData,
+        PaymentsCaptureData, PaymentsIncrementalAuthorizationData, PaymentsPreProcessingData,
+        PaymentsSessionData, PaymentsSyncData, RefundsData, SetupMandateRequestData,
+    },
+    router_response_types::{MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData},
+    types::{
+        MandateRevokeRouterData, PaymentsAuthorizeRouterData, PaymentsCancelRouterData,
+        PaymentsCaptureRouterData, PaymentsCompleteAuthorizeRouterData,
+        PaymentsIncrementalAuthorizationRouterData, PaymentsPreProcessingRouterData,
+        PaymentsSyncRouterData, RefundExecuteRouterData, RefundSyncRouterData,
+        SetupMandateRouterData,
+    },
+};
+#[cfg(feature = "payouts")]
+use hyperswitch_domain_models::{
+    router_flow_types::payouts::PoFulfill,
+    router_response_types::PayoutsResponseData,
+    types::{PayoutsData, PayoutsRouterData},
+};
+#[cfg(feature = "payouts")]
+use hyperswitch_interfaces::types::PayoutFulfillType;
+use hyperswitch_interfaces::{
+    api::{
+        self,
+        payments::PaymentSession,
+        refunds::{Refund, RefundExecute, RefundSync},
+        ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+        ConnectorValidation,
+    },
+    configs::Connectors,
+    errors,
+    events::connector_api_logs::ConnectorEvent,
+    types::{
+        IncrementalAuthorizationType, MandateRevokeType, PaymentsAuthorizeType,
+        PaymentsCaptureType, PaymentsCompleteAuthorizeType, PaymentsPreProcessingType,
+        PaymentsSyncType, PaymentsVoidType, RefundExecuteType, RefundSyncType, Response,
+        SetupMandateType,
+    },
+    webhooks,
+};
+use masking::{ExposeInterface, Mask, Maskable, PeekInterface};
 use ring::{digest, hmac};
 use time::OffsetDateTime;
 use transformers as cybersource;
 use url::Url;
 
-use super::utils::{convert_amount, PaymentsAuthorizeRequestData, RouterData};
 use crate::{
-    configs::settings,
-    connector::{
-        utils as connector_utils,
-        utils::{PaymentMethodDataType, RefundsRequestData},
-    },
-    consts,
-    core::errors::{self, CustomResult},
-    events::connector_api_logs::ConnectorEvent,
-    headers,
-    services::{
-        self,
-        request::{self, Mask},
-        ConnectorIntegration, ConnectorSpecifications, ConnectorValidation,
-    },
-    types::{
-        self,
-        api::{self, ConnectorCommon, ConnectorCommonExt},
-        transformers::ForeignTryFrom,
+    constants::{self, headers},
+    types::ResponseRouterData,
+    utils::{
+        self, convert_amount, PaymentMethodDataType, PaymentsAuthorizeRequestData,
+        RefundsRequestData, RouterData as OtherRouterData,
     },
-    utils::BytesExt,
 };
 
 #[derive(Clone)]
@@ -62,16 +105,16 @@ impl Cybersource {
         resource: &str,
         payload: &String,
         date: OffsetDateTime,
-        http_method: services::Method,
+        http_method: Method,
     ) -> CustomResult<String, errors::ConnectorError> {
         let cybersource::CybersourceAuthType {
             api_key,
             merchant_account,
             api_secret,
         } = auth;
-        let is_post_method = matches!(http_method, services::Method::Post);
-        let is_patch_method = matches!(http_method, services::Method::Patch);
-        let is_delete_method = matches!(http_method, services::Method::Delete);
+        let is_post_method = matches!(http_method, Method::Post);
+        let is_patch_method = matches!(http_method, Method::Patch);
+        let is_delete_method = matches!(http_method, Method::Delete);
         let digest_str = if is_post_method || is_patch_method {
             "digest "
         } else {
@@ -117,7 +160,7 @@ impl ConnectorCommon for Cybersource {
         "application/json;charset=utf-8"
     }
 
-    fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
+    fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
         connectors.cybersource.base_url.as_ref()
     }
 
@@ -127,18 +170,18 @@ impl ConnectorCommon for Cybersource {
 
     fn build_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: Result<
             cybersource::CybersourceErrorResponse,
             Report<common_utils::errors::ParsingError>,
         > = res.response.parse_struct("Cybersource ErrorResponse");
 
         let error_message = if res.status_code == 401 {
-            consts::CONNECTOR_UNAUTHORIZED_ERROR
+            constants::CONNECTOR_UNAUTHORIZED_ERROR
         } else {
-            consts::NO_ERROR_MESSAGE
+            hyperswitch_interfaces::consts::NO_ERROR_MESSAGE
         };
         match response {
             Ok(transformers::CybersourceErrorResponse::StandardError(response)) => {
@@ -173,12 +216,10 @@ impl ConnectorCommon for Cybersource {
                                 .join(", ")
                         });
                         (
-                            response
-                                .reason
-                                .clone()
-                                .map_or(consts::NO_ERROR_CODE.to_string(), |reason| {
-                                    reason.to_string()
-                                }),
+                            response.reason.clone().map_or(
+                                hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
+                                |reason| reason.to_string(),
+                            ),
                             response
                                 .reason
                                 .map_or(error_message.to_string(), |reason| reason.to_string()),
@@ -191,7 +232,7 @@ impl ConnectorCommon for Cybersource {
                     }
                 };
 
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
                     code,
                     message,
@@ -203,9 +244,9 @@ impl ConnectorCommon for Cybersource {
             Ok(transformers::CybersourceErrorResponse::AuthenticationError(response)) => {
                 event_builder.map(|i| i.set_error_response_body(&response));
                 router_env::logger::info!(connector_response=?response);
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
-                    code: consts::NO_ERROR_CODE.to_string(),
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: response.response.rmsg.clone(),
                     reason: Some(response.response.rmsg),
                     attempt_status: None,
@@ -227,9 +268,9 @@ impl ConnectorCommon for Cybersource {
                     })
                     .collect::<Vec<String>>()
                     .join(" & ");
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
-                    code: consts::NO_ERROR_CODE.to_string(),
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: error_response.clone(),
                     reason: Some(error_response),
                     attempt_status: None,
@@ -239,7 +280,7 @@ impl ConnectorCommon for Cybersource {
             Err(error_msg) => {
                 event_builder.map(|event| event.set_error(serde_json::json!({"error": res.response.escape_ascii().to_string(), "status_code": res.status_code})));
                 router_env::logger::error!(deserialization_error =? error_msg);
-                crate::utils::handle_json_response_deserialization_failure(res, "cybersource")
+                utils::handle_json_response_deserialization_failure(res, "cybersource")
             }
         }
     }
@@ -258,21 +299,21 @@ impl ConnectorValidation for Cybersource {
             | enums::CaptureMethod::Manual
             | enums::CaptureMethod::SequentialAutomatic => Ok(()),
             enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
-                connector_utils::construct_not_implemented_error_report(capture_method, self.id()),
+                utils::construct_not_implemented_error_report(capture_method, self.id()),
             ),
         }
     }
     fn validate_mandate_payment(
         &self,
-        pm_type: Option<types::storage::enums::PaymentMethodType>,
-        pm_data: types::domain::payments::PaymentMethodData,
+        pm_type: Option<enums::PaymentMethodType>,
+        pm_data: PaymentMethodData,
     ) -> CustomResult<(), errors::ConnectorError> {
         let mandate_supported_pmd = std::collections::HashSet::from([
             PaymentMethodDataType::Card,
             PaymentMethodDataType::ApplePay,
             PaymentMethodDataType::GooglePay,
         ]);
-        connector_utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
+        utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
     }
 }
 
@@ -282,9 +323,9 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RouterData<Flow, Request, Response>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         let date = OffsetDateTime::now_utc();
         let cybersource_req = self.get_request_body(req, connectors)?;
         let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?;
@@ -328,10 +369,7 @@ where
             ("Host".to_string(), host.to_string().into()),
             ("Signature".to_string(), signature.into_masked()),
         ];
-        if matches!(
-            http_method,
-            services::Method::Post | services::Method::Put | services::Method::Patch
-        ) {
+        if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
             headers.push((
                 "Digest".to_string(),
                 format!("SHA-256={sha256}").into_masked(),
@@ -358,28 +396,20 @@ impl api::Payouts for Cybersource {}
 #[cfg(feature = "payouts")]
 impl api::PayoutFulfill for Cybersource {}
 
-impl
-    ConnectorIntegration<
-        api::PaymentMethodToken,
-        types::PaymentMethodTokenizationData,
-        types::PaymentsResponseData,
-    > for Cybersource
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+    for Cybersource
 {
     // Not Implemented (R)
 }
 
-impl
-    ConnectorIntegration<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    > for Cybersource
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+    for Cybersource
 {
     fn get_headers(
         &self,
-        req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &SetupMandateRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
@@ -387,15 +417,15 @@ impl
     }
     fn get_url(
         &self,
-        _req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
+        _req: &SetupMandateRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}pts/v2/payments/", self.base_url(connectors)))
     }
     fn get_request_body(
         &self,
-        req: &types::SetupMandateRouterData,
-        _connectors: &settings::Connectors,
+        req: &SetupMandateRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_req = cybersource::CybersourceZeroMandateRequest::try_from(req)?;
         Ok(RequestContent::Json(Box::new(connector_req)))
@@ -403,35 +433,33 @@ impl
 
     fn build_request(
         &self,
-        req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<common_utils::request::Request>, errors::ConnectorError> {
+        req: &SetupMandateRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::SetupMandateType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&SetupMandateType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::SetupMandateType::get_headers(self, req, connectors)?)
-                .set_body(types::SetupMandateType::get_request_body(
-                    self, req, connectors,
-                )?)
+                .headers(SetupMandateType::get_headers(self, req, connectors)?)
+                .set_body(SetupMandateType::get_request_body(self, req, connectors)?)
                 .build(),
         ))
     }
 
     fn handle_response(
         &self,
-        data: &types::SetupMandateRouterData,
+        data: &SetupMandateRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::SetupMandateRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<SetupMandateRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourcePaymentsResponse = res
             .response
             .parse_struct("CybersourceSetupMandatesResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -440,17 +468,17 @@ impl
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -466,76 +494,72 @@ impl
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::MandateRevoke,
-        types::MandateRevokeRequestData,
-        types::MandateRevokeResponseData,
-    > for Cybersource
+impl ConnectorIntegration<MandateRevoke, MandateRevokeRequestData, MandateRevokeResponseData>
+    for Cybersource
 {
     fn get_headers(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Delete
+    fn get_http_method(&self) -> Method {
+        Method::Delete
     }
     fn get_content_type(&self) -> &'static str {
         self.common_get_content_type()
     }
     fn get_url(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}tms/v1/paymentinstruments/{}",
             self.base_url(connectors),
-            connector_utils::RevokeMandateRequestData::get_connector_mandate_id(&req.request)?
+            utils::RevokeMandateRequestData::get_connector_mandate_id(&req.request)?
         ))
     }
     fn build_request(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Delete)
-                .url(&types::MandateRevokeType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Delete)
+                .url(&MandateRevokeType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::MandateRevokeType::get_headers(
-                    self, req, connectors,
-                )?)
+                .headers(MandateRevokeType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::MandateRevokeRouterData,
+        data: &MandateRevokeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::MandateRevokeRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<MandateRevokeRouterData, errors::ConnectorError> {
         if matches!(res.status_code, 204) {
             event_builder.map(|i| i.set_response_body(&serde_json::json!({"mandate_status": common_enums::MandateStatus::Revoked.to_string()})));
-            Ok(types::MandateRevokeRouterData {
-                response: Ok(types::MandateRevokeResponseData {
+            Ok(MandateRevokeRouterData {
+                response: Ok(MandateRevokeResponseData {
                     mandate_status: common_enums::MandateStatus::Revoked,
                 }),
                 ..data.clone()
@@ -553,9 +577,9 @@ impl
             });
             router_env::logger::info!(connector_response=?response_string);
 
-            Ok(types::MandateRevokeRouterData {
-                response: Err(types::ErrorResponse {
-                    code: consts::NO_ERROR_CODE.to_string(),
+            Ok(MandateRevokeRouterData {
+                response: Err(ErrorResponse {
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: response_string.clone(),
                     reason: Some(response_string),
                     status_code: res.status_code,
@@ -568,37 +592,28 @@ impl
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
-impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
-    for Cybersource
-{
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Cybersource {
     // Not Implemented (R)
 }
 
-impl api::PaymentSession for Cybersource {}
+impl PaymentSession for Cybersource {}
 
-impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
-    for Cybersource
-{
-}
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Cybersource {}
 
-impl
-    ConnectorIntegration<
-        api::PreProcessing,
-        types::PaymentsPreProcessingData,
-        types::PaymentsResponseData,
-    > for Cybersource
+impl ConnectorIntegration<PreProcessing, PaymentsPreProcessingData, PaymentsResponseData>
+    for Cybersource
 {
     fn get_headers(
         &self,
-        req: &types::PaymentsPreProcessingRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsPreProcessingRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
@@ -606,8 +621,8 @@ impl
     }
     fn get_url(
         &self,
-        req: &types::PaymentsPreProcessingRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsPreProcessingRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let redirect_response = req.request.redirect_response.clone().ok_or(
             errors::ConnectorError::MissingRequiredField {
@@ -627,8 +642,8 @@ impl
     }
     fn get_request_body(
         &self,
-        req: &types::PaymentsPreProcessingRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsPreProcessingRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let minor_amount =
             req.request
@@ -650,20 +665,18 @@ impl
     }
     fn build_request(
         &self,
-        req: &types::PaymentsPreProcessingRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsPreProcessingRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsPreProcessingType::get_url(
-                    self, req, connectors,
-                )?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsPreProcessingType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsPreProcessingType::get_headers(
+                .headers(PaymentsPreProcessingType::get_headers(
                     self, req, connectors,
                 )?)
-                .set_body(types::PaymentsPreProcessingType::get_request_body(
+                .set_body(PaymentsPreProcessingType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -672,17 +685,17 @@ impl
 
     fn handle_response(
         &self,
-        data: &types::PaymentsPreProcessingRouterData,
+        data: &PaymentsPreProcessingRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsPreProcessingRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsPreProcessingRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourcePreProcessingResponse = res
             .response
             .parse_struct("Cybersource AuthEnrollmentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -691,21 +704,19 @@ impl
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
-impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -715,8 +726,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_url(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -728,8 +739,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -743,18 +754,16 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn build_request(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsCaptureType::get_headers(
-                    self, req, connectors,
-                )?)
-                .set_body(types::PaymentsCaptureType::get_request_body(
+                .headers(PaymentsCaptureType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsCaptureType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -762,11 +771,11 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsCaptureRouterData,
+        data: &PaymentsCaptureRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
+        res: Response,
     ) -> CustomResult<
-        types::RouterData<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>,
+        RouterData<Capture, PaymentsCaptureData, PaymentsResponseData>,
         errors::ConnectorError,
     > {
         let response: cybersource::CybersourcePaymentsResponse = res
@@ -775,7 +784,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -783,17 +792,17 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -802,38 +811,38 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
         event_builder.map(|event| event.set_response_body(&response));
         router_env::logger::info!(error_response=?response);
 
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req
             .request
@@ -853,31 +862,31 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn build_request(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
+                .headers(PaymentsSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsSyncRouterData,
+        data: &PaymentsSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourceTransactionResponse = res
             .response
             .parse_struct("Cybersource PaymentSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -885,21 +894,19 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
-impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -909,8 +916,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_url(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         if req.is_three_ds()
             && req.request.is_card()
@@ -932,8 +939,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -959,18 +966,14 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
-            .url(&types::PaymentsAuthorizeType::get_url(
-                self, req, connectors,
-            )?)
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
+            .url(&PaymentsAuthorizeType::get_url(self, req, connectors)?)
             .attach_default_headers()
-            .headers(types::PaymentsAuthorizeType::get_headers(
-                self, req, connectors,
-            )?)
+            .headers(PaymentsAuthorizeType::get_headers(self, req, connectors)?)
             .set_body(self.get_request_body(req, connectors)?)
             .build();
 
@@ -979,10 +982,10 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeRouterData,
+        data: &PaymentsAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
         if data.is_three_ds()
             && data.request.is_card()
             && (data.request.connector_mandate_id().is_none()
@@ -995,7 +998,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
                 .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
             event_builder.map(|i| i.set_response_body(&response));
             router_env::logger::info!(connector_response=?response);
-            types::RouterData::try_from(types::ResponseRouterData {
+            RouterData::try_from(ResponseRouterData {
                 response,
                 data: data.clone(),
                 http_code: res.status_code,
@@ -1007,7 +1010,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
                 .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
             event_builder.map(|i| i.set_response_body(&response));
             router_env::logger::info!(connector_response=?response);
-            types::RouterData::try_from(types::ResponseRouterData {
+            RouterData::try_from(ResponseRouterData {
                 response,
                 data: data.clone(),
                 http_code: res.status_code,
@@ -1017,17 +1020,17 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -1043,13 +1046,15 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
@@ -1057,29 +1062,27 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 }
 
 #[cfg(feature = "payouts")]
-impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<PoFulfill, PayoutsData, PayoutsResponseData> for Cybersource {
     fn get_url(
         &self,
-        _req: &types::PayoutsRouterData<api::PoFulfill>,
-        connectors: &settings::Connectors,
+        _req: &PayoutsRouterData<PoFulfill>,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}pts/v2/payouts", self.base_url(connectors)))
     }
 
     fn get_headers(
         &self,
-        req: &types::PayoutsRouterData<api::PoFulfill>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PayoutsRouterData<PoFulfill>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
     fn get_request_body(
         &self,
-        req: &types::PayoutsRouterData<api::PoFulfill>,
-        _connectors: &settings::Connectors,
+        req: &PayoutsRouterData<PoFulfill>,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -1094,19 +1097,15 @@ impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResp
 
     fn build_request(
         &self,
-        req: &types::PayoutsRouterData<api::PoFulfill>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
-            .url(&types::PayoutFulfillType::get_url(self, req, connectors)?)
+        req: &PayoutsRouterData<PoFulfill>,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
+            .url(&PayoutFulfillType::get_url(self, req, connectors)?)
             .attach_default_headers()
-            .headers(types::PayoutFulfillType::get_headers(
-                self, req, connectors,
-            )?)
-            .set_body(types::PayoutFulfillType::get_request_body(
-                self, req, connectors,
-            )?)
+            .headers(PayoutFulfillType::get_headers(self, req, connectors)?)
+            .set_body(PayoutFulfillType::get_request_body(self, req, connectors)?)
             .build();
 
         Ok(Some(request))
@@ -1114,10 +1113,10 @@ impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResp
 
     fn handle_response(
         &self,
-        data: &types::PayoutsRouterData<api::PoFulfill>,
+        data: &PayoutsRouterData<PoFulfill>,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PayoutsRouterData<api::PoFulfill>, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PayoutsRouterData<PoFulfill>, errors::ConnectorError> {
         let response: cybersource::CybersourceFulfillResponse = res
             .response
             .parse_struct("CybersourceFulfillResponse")
@@ -1126,7 +1125,7 @@ impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResp
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1135,17 +1134,17 @@ impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResp
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -1161,31 +1160,29 @@ impl ConnectorIntegration<api::PoFulfill, types::PayoutsData, types::PayoutsResp
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::CompleteAuthorize,
-        types::CompleteAuthorizeData,
-        types::PaymentsResponseData,
-    > for Cybersource
+impl ConnectorIntegration<CompleteAuthorize, CompleteAuthorizeData, PaymentsResponseData>
+    for Cybersource
 {
     fn get_headers(
         &self,
-        req: &types::PaymentsCompleteAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCompleteAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
@@ -1193,8 +1190,8 @@ impl
     }
     fn get_url(
         &self,
-        _req: &types::PaymentsCompleteAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsCompleteAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}pts/v2/payments/",
@@ -1203,8 +1200,8 @@ impl
     }
     fn get_request_body(
         &self,
-        req: &types::PaymentsCompleteAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCompleteAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -1218,20 +1215,20 @@ impl
     }
     fn build_request(
         &self,
-        req: &types::PaymentsCompleteAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCompleteAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsCompleteAuthorizeType::get_url(
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsCompleteAuthorizeType::get_url(
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::PaymentsCompleteAuthorizeType::get_headers(
+                .headers(PaymentsCompleteAuthorizeType::get_headers(
                     self, req, connectors,
                 )?)
-                .set_body(types::PaymentsCompleteAuthorizeType::get_request_body(
+                .set_body(PaymentsCompleteAuthorizeType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -1240,17 +1237,17 @@ impl
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCompleteAuthorizeRouterData,
+        data: &PaymentsCompleteAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsCompleteAuthorizeRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsCompleteAuthorizeRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourcePaymentsResponse = res
             .response
             .parse_struct("Cybersource PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1259,17 +1256,17 @@ impl
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -1285,34 +1282,34 @@ impl
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -1327,8 +1324,8 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let minor_amount =
             req.request
@@ -1352,15 +1349,15 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn build_request(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsVoidType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
+                .headers(PaymentsVoidType::get_headers(self, req, connectors)?)
                 .set_body(self.get_request_body(req, connectors)?)
                 .build(),
         ))
@@ -1368,17 +1365,17 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCancelRouterData,
+        data: &PaymentsCancelRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsCancelRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourcePaymentsResponse = res
             .response
             .parse_struct("Cybersource PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1387,17 +1384,17 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: cybersource::CybersourceServerErrorResponse = res
             .response
             .parse_struct("CybersourceServerErrorResponse")
@@ -1406,32 +1403,32 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
         event_builder.map(|event| event.set_response_body(&response));
         router_env::logger::info!(error_response=?response);
 
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl api::Refund for Cybersource {}
-impl api::RefundExecute for Cybersource {}
-impl api::RefundSync for Cybersource {}
+impl Refund for Cybersource {}
+impl RefundExecute for Cybersource {}
+impl RefundSync for Cybersource {}
 
 #[allow(dead_code)]
-impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -1441,8 +1438,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_url(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -1454,8 +1451,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_request_body(
         &self,
-        req: &types::RefundExecuteRouterData,
-        _connectors: &settings::Connectors,
+        req: &RefundExecuteRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let refund_amount = convert_amount(
             self.amount_converter,
@@ -1469,17 +1466,15 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
     fn build_request(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&RefundExecuteType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundExecuteType::get_headers(
-                    self, req, connectors,
-                )?)
+                .headers(RefundExecuteType::get_headers(self, req, connectors)?)
                 .set_body(self.get_request_body(req, connectors)?)
                 .build(),
         ))
@@ -1487,17 +1482,17 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn handle_response(
         &self,
-        data: &types::RefundExecuteRouterData,
+        data: &RefundExecuteRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::RefundExecuteRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<RefundExecuteRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourceRefundResponse = res
             .response
             .parse_struct("Cybersource RefundResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1505,34 +1500,32 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
 #[allow(dead_code)]
-impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData>
-    for Cybersource
-{
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Cybersource {
     fn get_headers(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
         self.common_get_content_type()
     }
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
     fn get_url(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let refund_id = req.request.get_connector_refund_id()?;
         Ok(format!(
@@ -1543,31 +1536,31 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     }
     fn build_request(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::RefundSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
+                .headers(RefundSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::RefundSyncRouterData,
+        data: &RefundSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
         let response: cybersource::CybersourceRsyncResponse = res
             .response
             .parse_struct("Cybersource RefundSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1575,30 +1568,30 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
 impl
     ConnectorIntegration<
-        api::IncrementalAuthorization,
-        types::PaymentsIncrementalAuthorizationData,
-        types::PaymentsResponseData,
+        IncrementalAuthorization,
+        PaymentsIncrementalAuthorizationData,
+        PaymentsResponseData,
     > for Cybersource
 {
     fn get_headers(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Patch
+    fn get_http_method(&self) -> Method {
+        Method::Patch
     }
 
     fn get_content_type(&self) -> &'static str {
@@ -1607,8 +1600,8 @@ impl
 
     fn get_url(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -1620,8 +1613,8 @@ impl
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let minor_additional_amount = MinorUnit::new(req.request.additional_amount);
         let additional_amount = convert_amount(
@@ -1639,20 +1632,20 @@ impl
     }
     fn build_request(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Patch)
-                .url(&types::IncrementalAuthorizationType::get_url(
+            RequestBuilder::new()
+                .method(Method::Patch)
+                .url(&IncrementalAuthorizationType::get_url(
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::IncrementalAuthorizationType::get_headers(
+                .headers(IncrementalAuthorizationType::get_headers(
                     self, req, connectors,
                 )?)
-                .set_body(types::IncrementalAuthorizationType::get_request_body(
+                .set_body(IncrementalAuthorizationType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -1660,14 +1653,14 @@ impl
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsIncrementalAuthorizationRouterData,
+        data: &PaymentsIncrementalAuthorizationRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
+        res: Response,
     ) -> CustomResult<
-        types::RouterData<
-            api::IncrementalAuthorization,
-            types::PaymentsIncrementalAuthorizationData,
-            types::PaymentsResponseData,
+        RouterData<
+            IncrementalAuthorization,
+            PaymentsIncrementalAuthorizationData,
+            PaymentsResponseData,
         >,
         errors::ConnectorError,
     > {
@@ -1677,44 +1670,41 @@ impl
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::foreign_try_from((
-            types::ResponseRouterData {
-                response,
-                data: data.clone(),
-                http_code: res.status_code,
-            },
-            true,
-        ))
+        RouterData::try_from(ResponseRouterData {
+            response,
+            data: data.clone(),
+            http_code: res.status_code,
+        })
         .change_context(errors::ConnectorError::ResponseHandlingFailed)
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
 #[async_trait::async_trait]
-impl api::IncomingWebhook for Cybersource {
+impl webhooks::IncomingWebhook for Cybersource {
     fn get_webhook_object_reference_id(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
 
     fn get_webhook_event_type(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::IncomingWebhookEvent, errors::ConnectorError> {
-        Ok(api::IncomingWebhookEvent::EventNotSupported)
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+        Ok(api_models::webhooks::IncomingWebhookEvent::EventNotSupported)
     }
 
     fn get_webhook_resource_object(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
similarity index 78%
rename from crates/router/src/connector/cybersource/transformers.rs
rename to crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
index 2aa24e5ffdf..9f3d0241719 100644
--- a/crates/router/src/connector/cybersource/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
@@ -2,40 +2,68 @@ use api_models::payments;
 #[cfg(feature = "payouts")]
 use api_models::payouts::PayoutMethodData;
 use base64::Engine;
-use common_enums::FutureUsage;
+use common_enums::{enums, FutureUsage};
 use common_utils::{
+    consts,
     ext_traits::{OptionExt, ValueExt},
     pii,
     types::{SemanticVersion, StringMajorUnit},
 };
 use error_stack::ResultExt;
 #[cfg(feature = "payouts")]
-use hyperswitch_domain_models::address::{AddressDetails, PhoneDetails};
+use hyperswitch_domain_models::{
+    address::{AddressDetails, PhoneDetails},
+    router_flow_types::PoFulfill,
+    router_response_types::PayoutsResponseData,
+    types::PayoutsRouterData,
+};
+use hyperswitch_domain_models::{
+    payment_method_data::{
+        ApplePayWalletData, GooglePayWalletData, NetworkTokenData, PaymentMethodData,
+        SamsungPayWalletData, WalletData,
+    },
+    router_data::{
+        AdditionalPaymentMethodConnectorResponse, ApplePayPredecryptData, ConnectorAuthType,
+        ConnectorResponseData, ErrorResponse, PaymentMethodToken, RouterData,
+    },
+    router_flow_types::{
+        payments::Authorize,
+        refunds::{Execute, RSync},
+        SetupMandate,
+    },
+    router_request_types::{
+        CompleteAuthorizeData, PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData,
+        PaymentsPreProcessingData, PaymentsSyncData, ResponseId, SetupMandateRequestData,
+    },
+    router_response_types::{
+        MandateReference, PaymentsResponseData, RedirectForm, RefundsResponseData,
+    },
+    types::{
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        PaymentsCompleteAuthorizeRouterData, PaymentsIncrementalAuthorizationRouterData,
+        PaymentsPreProcessingRouterData, RefundsRouterData, SetupMandateRouterData,
+    },
+};
+use hyperswitch_interfaces::{api, errors};
 use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
 use serde_json::Value;
+use utils::ForeignTryFrom;
 
 #[cfg(feature = "payouts")]
-use crate::connector::utils::PayoutsData;
+use crate::types::PayoutsResponseRouterData;
+#[cfg(feature = "payouts")]
+use crate::utils::PayoutsData;
 use crate::{
-    connector::utils::{
-        self, AddressDetailsData, ApplePayDecrypt, CardData, NetworkTokenData,
+    constants,
+    types::{RefundsResponseRouterData, ResponseRouterData},
+    unimplemented_payment_method,
+    utils::{
+        self, AddressDetailsData, ApplePayDecrypt, CardData, CardIssuer, NetworkTokenData as _,
         PaymentsAuthorizeRequestData, PaymentsCompleteAuthorizeRequestData,
-        PaymentsPreProcessingData, PaymentsSetupMandateRequestData, PaymentsSyncRequestData,
-        RecurringMandateData, RouterData,
+        PaymentsPreProcessingRequestData, PaymentsSetupMandateRequestData, PaymentsSyncRequestData,
+        RecurringMandateData, RouterData as OtherRouterData,
     },
-    consts,
-    core::errors,
-    services,
-    types::{
-        self,
-        api::{self, enums as api_enums},
-        domain,
-        storage::enums,
-        transformers::{ForeignFrom, ForeignTryFrom},
-        ApplePayPredecryptData,
-    },
-    unimplemented_payment_method,
 };
 
 #[derive(Debug, Serialize)]
@@ -53,6 +81,22 @@ impl<T> From<(StringMajorUnit, T)> for CybersourceRouterData<T> {
     }
 }
 
+impl From<CardIssuer> for String {
+    fn from(card_issuer: CardIssuer) -> Self {
+        let card_type = match card_issuer {
+            CardIssuer::AmericanExpress => "003",
+            CardIssuer::Master => "002",
+            //"042" is the type code for Masetro Cards(International). For Maestro Cards(UK-Domestic) the mapping should be "024"
+            CardIssuer::Maestro => "042",
+            CardIssuer::Visa => "001",
+            CardIssuer::Discover => "004",
+            CardIssuer::DinersClub => "005",
+            CardIssuer::CarteBlanche => "006",
+            CardIssuer::JCB => "007",
+        };
+        card_type.to_string()
+    }
+}
 #[derive(Debug, Default, Serialize, Deserialize)]
 pub struct CybersourceConnectorMetadataObject {
     pub disable_avs: Option<bool>,
@@ -79,9 +123,9 @@ pub struct CybersourceZeroMandateRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest {
+impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(item: &types::SetupMandateRouterData) -> Result<Self, Self::Error> {
+    fn try_from(item: &SetupMandateRouterData) -> Result<Self, Self::Error> {
         let email = item.get_billing_email().or(item.request.get_email())?;
         let bill_to = build_bill_to(item.get_optional_billing(), email)?;
 
@@ -118,7 +162,7 @@ impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest {
         };
 
         let (payment_information, solution) = match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(ccard) => {
+            PaymentMethodData::Card(ccard) => {
                 let card_type = match ccard
                     .card_network
                     .clone()
@@ -141,55 +185,54 @@ impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest {
                 )
             }
 
-            domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                domain::WalletData::ApplePay(apple_pay_data) => {
-                    match item.payment_method_token.clone() {
-                        Some(payment_method_token) => match payment_method_token {
-                            types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
-                                let expiration_month = decrypt_data.get_expiry_month()?;
-                                let expiration_year = decrypt_data.get_four_digit_expiry_year()?;
-                                (
-                                    PaymentInformation::ApplePay(Box::new(
-                                        ApplePayPaymentInformation {
-                                            tokenized_card: TokenizedCard {
-                                                number: decrypt_data
-                                                    .application_primary_account_number,
-                                                cryptogram: decrypt_data
-                                                    .payment_data
-                                                    .online_payment_cryptogram,
-                                                transaction_type: TransactionType::ApplePay,
-                                                expiration_year,
-                                                expiration_month,
-                                            },
+            PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                WalletData::ApplePay(apple_pay_data) => match item.payment_method_token.clone() {
+                    Some(payment_method_token) => match payment_method_token {
+                        PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                            let expiration_month = decrypt_data.get_expiry_month()?;
+                            let expiration_year = decrypt_data.get_four_digit_expiry_year()?;
+                            (
+                                PaymentInformation::ApplePay(Box::new(
+                                    ApplePayPaymentInformation {
+                                        tokenized_card: TokenizedCard {
+                                            number: decrypt_data.application_primary_account_number,
+                                            cryptogram: decrypt_data
+                                                .payment_data
+                                                .online_payment_cryptogram,
+                                            transaction_type: TransactionType::ApplePay,
+                                            expiration_year,
+                                            expiration_month,
                                         },
-                                    )),
-                                    Some(PaymentSolution::ApplePay),
-                                )
-                            }
-                            types::PaymentMethodToken::Token(_) => Err(
-                                unimplemented_payment_method!("Apple Pay", "Manual", "Cybersource"),
-                            )?,
-                            types::PaymentMethodToken::PazeDecrypt(_) => {
-                                Err(unimplemented_payment_method!("Paze", "Cybersource"))?
-                            }
-                        },
-                        None => (
-                            PaymentInformation::ApplePayToken(Box::new(
-                                ApplePayTokenPaymentInformation {
-                                    fluid_data: FluidData {
-                                        value: Secret::from(apple_pay_data.payment_data),
-                                        descriptor: Some(FLUID_DATA_DESCRIPTOR.to_string()),
-                                    },
-                                    tokenized_card: ApplePayTokenizedCard {
-                                        transaction_type: TransactionType::ApplePay,
                                     },
+                                )),
+                                Some(PaymentSolution::ApplePay),
+                            )
+                        }
+                        PaymentMethodToken::Token(_) => Err(unimplemented_payment_method!(
+                            "Apple Pay",
+                            "Manual",
+                            "Cybersource"
+                        ))?,
+                        PaymentMethodToken::PazeDecrypt(_) => {
+                            Err(unimplemented_payment_method!("Paze", "Cybersource"))?
+                        }
+                    },
+                    None => (
+                        PaymentInformation::ApplePayToken(Box::new(
+                            ApplePayTokenPaymentInformation {
+                                fluid_data: FluidData {
+                                    value: Secret::from(apple_pay_data.payment_data),
+                                    descriptor: Some(FLUID_DATA_DESCRIPTOR.to_string()),
                                 },
-                            )),
-                            Some(PaymentSolution::ApplePay),
-                        ),
-                    }
-                }
-                domain::WalletData::GooglePay(google_pay_data) => (
+                                tokenized_card: ApplePayTokenizedCard {
+                                    transaction_type: TransactionType::ApplePay,
+                                },
+                            },
+                        )),
+                        Some(PaymentSolution::ApplePay),
+                    ),
+                },
+                WalletData::GooglePay(google_pay_data) => (
                     PaymentInformation::GooglePay(Box::new(GooglePayPaymentInformation {
                         fluid_data: FluidData {
                             value: Secret::from(
@@ -201,52 +244,52 @@ impl TryFrom<&types::SetupMandateRouterData> for CybersourceZeroMandateRequest {
                     })),
                     Some(PaymentSolution::GooglePay),
                 ),
-                domain::WalletData::AliPayQr(_)
-                | domain::WalletData::AliPayRedirect(_)
-                | domain::WalletData::AliPayHkRedirect(_)
-                | domain::WalletData::MomoRedirect(_)
-                | domain::WalletData::KakaoPayRedirect(_)
-                | domain::WalletData::GoPayRedirect(_)
-                | domain::WalletData::GcashRedirect(_)
-                | domain::WalletData::ApplePayRedirect(_)
-                | domain::WalletData::ApplePayThirdPartySdk(_)
-                | domain::WalletData::DanaRedirect {}
-                | domain::WalletData::GooglePayRedirect(_)
-                | domain::WalletData::GooglePayThirdPartySdk(_)
-                | domain::WalletData::MbWayRedirect(_)
-                | domain::WalletData::MobilePayRedirect(_)
-                | domain::WalletData::PaypalRedirect(_)
-                | domain::WalletData::PaypalSdk(_)
-                | domain::WalletData::Paze(_)
-                | domain::WalletData::SamsungPay(_)
-                | domain::WalletData::TwintRedirect {}
-                | domain::WalletData::VippsRedirect {}
-                | domain::WalletData::TouchNGoRedirect(_)
-                | domain::WalletData::WeChatPayRedirect(_)
-                | domain::WalletData::WeChatPayQr(_)
-                | domain::WalletData::CashappQr(_)
-                | domain::WalletData::SwishQr(_)
-                | domain::WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+                WalletData::AliPayQr(_)
+                | WalletData::AliPayRedirect(_)
+                | WalletData::AliPayHkRedirect(_)
+                | WalletData::MomoRedirect(_)
+                | WalletData::KakaoPayRedirect(_)
+                | WalletData::GoPayRedirect(_)
+                | WalletData::GcashRedirect(_)
+                | WalletData::ApplePayRedirect(_)
+                | WalletData::ApplePayThirdPartySdk(_)
+                | WalletData::DanaRedirect {}
+                | WalletData::GooglePayRedirect(_)
+                | WalletData::GooglePayThirdPartySdk(_)
+                | WalletData::MbWayRedirect(_)
+                | WalletData::MobilePayRedirect(_)
+                | WalletData::PaypalRedirect(_)
+                | WalletData::PaypalSdk(_)
+                | WalletData::Paze(_)
+                | WalletData::SamsungPay(_)
+                | WalletData::TwintRedirect {}
+                | WalletData::VippsRedirect {}
+                | WalletData::TouchNGoRedirect(_)
+                | WalletData::WeChatPayRedirect(_)
+                | WalletData::WeChatPayQr(_)
+                | WalletData::CashappQr(_)
+                | WalletData::SwishQr(_)
+                | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Cybersource"),
                 ))?,
             },
-            domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Cybersource"),
                 ))?
@@ -568,24 +611,22 @@ pub struct BillTo {
     administrative_area: Option<Secret<String>>,
     #[serde(skip_serializing_if = "Option::is_none")]
     postal_code: Option<Secret<String>>,
-    country: Option<api_enums::CountryAlpha2>,
+    country: Option<enums::CountryAlpha2>,
     email: pii::Email,
 }
 
-impl From<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
-    for ClientReferenceInformation
-{
-    fn from(item: &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>) -> Self {
+impl From<&CybersourceRouterData<&PaymentsAuthorizeRouterData>> for ClientReferenceInformation {
+    fn from(item: &CybersourceRouterData<&PaymentsAuthorizeRouterData>) -> Self {
         Self {
             code: Some(item.router_data.connector_request_reference_id.clone()),
         }
     }
 }
 
-impl From<&CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>>
+impl From<&CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>>
     for ClientReferenceInformation
 {
-    fn from(item: &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>) -> Self {
+    fn from(item: &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>) -> Self {
         Self {
             code: Some(item.router_data.connector_request_reference_id.clone()),
         }
@@ -594,7 +635,7 @@ impl From<&CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>>
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
         Option<PaymentSolution>,
         Option<String>,
     )> for ProcessingInformation
@@ -602,7 +643,7 @@ impl
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, solution, network): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             Option<PaymentSolution>,
             Option<String>,
         ),
@@ -941,7 +982,7 @@ fn get_commerce_indicator_for_external_authentication(
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
         Option<PaymentSolution>,
         &CybersourceConsumerAuthValidateResponse,
     )> for ProcessingInformation
@@ -949,7 +990,7 @@ impl
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, solution, three_ds_data): (
-            &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
             Option<PaymentSolution>,
             &CybersourceConsumerAuthValidateResponse,
         ),
@@ -1001,13 +1042,13 @@ impl
 
 impl
     From<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
         Option<BillTo>,
     )> for OrderInformationWithBill
 {
     fn from(
         (item, bill_to): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             Option<BillTo>,
         ),
     ) -> Self {
@@ -1023,13 +1064,13 @@ impl
 
 impl
     From<(
-        &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
         BillTo,
     )> for OrderInformationWithBill
 {
     fn from(
         (item, bill_to): (
-            &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
             BillTo,
         ),
     ) -> Self {
@@ -1121,35 +1162,32 @@ fn build_bill_to(
         .unwrap_or(default_address))
 }
 
-impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
-    fn foreign_from(metadata: Value) -> Self {
-        let hashmap: std::collections::BTreeMap<String, Value> =
-            serde_json::from_str(&metadata.to_string())
-                .unwrap_or(std::collections::BTreeMap::new());
-        let mut vector: Self = Self::new();
-        let mut iter = 1;
-        for (key, value) in hashmap {
-            vector.push(MerchantDefinedInformation {
-                key: iter,
-                value: format!("{key}={value}"),
-            });
-            iter += 1;
-        }
-        vector
+fn convert_metadata_to_merchant_defined_info(metadata: Value) -> Vec<MerchantDefinedInformation> {
+    let hashmap: std::collections::BTreeMap<String, Value> =
+        serde_json::from_str(&metadata.to_string()).unwrap_or(std::collections::BTreeMap::new());
+    let mut vector = Vec::new();
+    let mut iter = 1;
+    for (key, value) in hashmap {
+        vector.push(MerchantDefinedInformation {
+            key: iter,
+            value: format!("{key}={value}"),
+        });
+        iter += 1;
     }
+    vector
 }
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::Card,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+        hyperswitch_domain_models::payment_method_data::Card,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, ccard): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::Card,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+            hyperswitch_domain_models::payment_method_data::Card,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item
@@ -1196,7 +1234,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         let consumer_authentication_information = item
             .router_data
@@ -1238,14 +1276,14 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
         hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, ccard): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             hyperswitch_domain_models::payment_method_data::CardDetailsForNetworkTransactionId,
         ),
     ) -> Result<Self, Self::Error> {
@@ -1279,7 +1317,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         let consumer_authentication_information = item
             .router_data
@@ -1321,15 +1359,15 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::NetworkTokenData,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+        NetworkTokenData,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, token_data): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::NetworkTokenData,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+            NetworkTokenData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -1360,7 +1398,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         let consumer_authentication_information = item
             .router_data
@@ -1402,14 +1440,14 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
         Box<hyperswitch_domain_models::router_data::PazeDecryptedData>,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, paze_data): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             Box<hyperswitch_domain_models::router_data::PazeDecryptedData>,
         ),
     ) -> Result<Self, Self::Error> {
@@ -1473,7 +1511,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -1488,15 +1526,15 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
-        domain::Card,
+        &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
+        hyperswitch_domain_models::payment_method_data::Card,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, ccard): (
-            &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
-            domain::Card,
+            &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
+            hyperswitch_domain_models::payment_method_data::Card,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item
@@ -1560,7 +1598,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -1575,17 +1613,17 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
         Box<ApplePayPredecryptData>,
-        domain::ApplePayWalletData,
+        ApplePayWalletData,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, apple_pay_data, apple_pay_wallet_data): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             Box<ApplePayPredecryptData>,
-            domain::ApplePayWalletData,
+            ApplePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item
@@ -1617,7 +1655,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         let ucaf_collection_indicator = match apple_pay_wallet_data
             .payment_method
             .network
@@ -1649,15 +1687,15 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::GooglePayWalletData,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+        GooglePayWalletData,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, google_pay_data): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::GooglePayWalletData,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+            GooglePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item
@@ -1684,7 +1722,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -1699,15 +1737,15 @@ impl
 
 impl
     TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-        Box<domain::SamsungPayWalletData>,
+        &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+        Box<SamsungPayWalletData>,
     )> for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, samsung_pay_data): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-            Box<domain::SamsungPayWalletData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
+            Box<SamsungPayWalletData>,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item
@@ -1748,7 +1786,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -1784,33 +1822,31 @@ fn get_samsung_pay_fluid_data_value(
     Ok(samsung_pay_fluid_data_value)
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
-    for CybersourcePaymentsRequest
-{
+impl TryFrom<&CybersourceRouterData<&PaymentsAuthorizeRouterData>> for CybersourcePaymentsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        item: &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.connector_mandate_id() {
             Some(connector_mandate_id) => Self::try_from((item, connector_mandate_id)),
             None => {
                 match item.router_data.request.payment_method_data.clone() {
-                    domain::PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
-                    domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                        domain::WalletData::ApplePay(apple_pay_data) => {
+                    PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
+                    PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                        WalletData::ApplePay(apple_pay_data) => {
                             match item.router_data.payment_method_token.clone() {
                                 Some(payment_method_token) => match payment_method_token {
-                                    types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                                    PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
                                         Self::try_from((item, decrypt_data, apple_pay_data))
                                     }
-                                    types::PaymentMethodToken::Token(_) => {
+                                    PaymentMethodToken::Token(_) => {
                                         Err(unimplemented_payment_method!(
                                             "Apple Pay",
                                             "Manual",
                                             "Cybersource"
                                         ))?
                                     }
-                                    types::PaymentMethodToken::PazeDecrypt(_) => {
+                                    PaymentMethodToken::PazeDecrypt(_) => {
                                         Err(unimplemented_payment_method!("Paze", "Cybersource"))?
                                     }
                                 },
@@ -1846,9 +1882,7 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
                                     );
                                     let merchant_defined_information =
                                         item.router_data.request.metadata.clone().map(|metadata| {
-                                            Vec::<MerchantDefinedInformation>::foreign_from(
-                                                metadata,
-                                            )
+                                            convert_metadata_to_merchant_defined_info(metadata)
                                         });
                                     let ucaf_collection_indicator = match apple_pay_data
                                         .payment_method
@@ -1881,17 +1915,17 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
                                 }
                             }
                         }
-                        domain::WalletData::GooglePay(google_pay_data) => {
+                        WalletData::GooglePay(google_pay_data) => {
                             Self::try_from((item, google_pay_data))
                         }
-                        domain::WalletData::SamsungPay(samsung_pay_data) => {
+                        WalletData::SamsungPay(samsung_pay_data) => {
                             Self::try_from((item, samsung_pay_data))
                         }
-                        domain::WalletData::Paze(_) => {
+                        WalletData::Paze(_) => {
                             match item.router_data.payment_method_token.clone() {
-                                Some(types::PaymentMethodToken::PazeDecrypt(
-                                    paze_decrypted_data,
-                                )) => Self::try_from((item, paze_decrypted_data)),
+                                Some(PaymentMethodToken::PazeDecrypt(paze_decrypted_data)) => {
+                                    Self::try_from((item, paze_decrypted_data))
+                                }
                                 _ => Err(errors::ConnectorError::NotImplemented(
                                     utils::get_unimplemented_payment_method_error_message(
                                         "Cybersource",
@@ -1900,41 +1934,37 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
                                 .into()),
                             }
                         }
-                        domain::WalletData::AliPayQr(_)
-                        | domain::WalletData::AliPayRedirect(_)
-                        | domain::WalletData::AliPayHkRedirect(_)
-                        | domain::WalletData::MomoRedirect(_)
-                        | domain::WalletData::KakaoPayRedirect(_)
-                        | domain::WalletData::GoPayRedirect(_)
-                        | domain::WalletData::GcashRedirect(_)
-                        | domain::WalletData::ApplePayRedirect(_)
-                        | domain::WalletData::ApplePayThirdPartySdk(_)
-                        | domain::WalletData::DanaRedirect {}
-                        | domain::WalletData::GooglePayRedirect(_)
-                        | domain::WalletData::GooglePayThirdPartySdk(_)
-                        | domain::WalletData::MbWayRedirect(_)
-                        | domain::WalletData::MobilePayRedirect(_)
-                        | domain::WalletData::PaypalRedirect(_)
-                        | domain::WalletData::PaypalSdk(_)
-                        | domain::WalletData::TwintRedirect {}
-                        | domain::WalletData::VippsRedirect {}
-                        | domain::WalletData::TouchNGoRedirect(_)
-                        | domain::WalletData::WeChatPayRedirect(_)
-                        | domain::WalletData::WeChatPayQr(_)
-                        | domain::WalletData::CashappQr(_)
-                        | domain::WalletData::SwishQr(_)
-                        | domain::WalletData::Mifinity(_) => {
-                            Err(errors::ConnectorError::NotImplemented(
-                                utils::get_unimplemented_payment_method_error_message(
-                                    "Cybersource",
-                                ),
-                            )
-                            .into())
-                        }
+                        WalletData::AliPayQr(_)
+                        | WalletData::AliPayRedirect(_)
+                        | WalletData::AliPayHkRedirect(_)
+                        | WalletData::MomoRedirect(_)
+                        | WalletData::KakaoPayRedirect(_)
+                        | WalletData::GoPayRedirect(_)
+                        | WalletData::GcashRedirect(_)
+                        | WalletData::ApplePayRedirect(_)
+                        | WalletData::ApplePayThirdPartySdk(_)
+                        | WalletData::DanaRedirect {}
+                        | WalletData::GooglePayRedirect(_)
+                        | WalletData::GooglePayThirdPartySdk(_)
+                        | WalletData::MbWayRedirect(_)
+                        | WalletData::MobilePayRedirect(_)
+                        | WalletData::PaypalRedirect(_)
+                        | WalletData::PaypalSdk(_)
+                        | WalletData::TwintRedirect {}
+                        | WalletData::VippsRedirect {}
+                        | WalletData::TouchNGoRedirect(_)
+                        | WalletData::WeChatPayRedirect(_)
+                        | WalletData::WeChatPayQr(_)
+                        | WalletData::CashappQr(_)
+                        | WalletData::SwishQr(_)
+                        | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+                            utils::get_unimplemented_payment_method_error_message("Cybersource"),
+                        )
+                        .into()),
                     },
                     // If connector_mandate_id is present MandatePayment will be the PMD, the case will be handled in the first `if` clause.
                     // This is a fallback implementation in the event of catastrophe.
-                    domain::PaymentMethodData::MandatePayment => {
+                    PaymentMethodData::MandatePayment => {
                         let connector_mandate_id =
                             item.router_data.request.connector_mandate_id().ok_or(
                                 errors::ConnectorError::MissingRequiredField {
@@ -1943,26 +1973,26 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
                             )?;
                         Self::try_from((item, connector_mandate_id))
                     }
-                    domain::PaymentMethodData::NetworkToken(token_data) => {
+                    PaymentMethodData::NetworkToken(token_data) => {
                         Self::try_from((item, token_data))
                     }
-                    domain::PaymentMethodData::CardDetailsForNetworkTransactionId(card) => {
+                    PaymentMethodData::CardDetailsForNetworkTransactionId(card) => {
                         Self::try_from((item, card))
                     }
-                    domain::PaymentMethodData::CardRedirect(_)
-                    | domain::PaymentMethodData::PayLater(_)
-                    | domain::PaymentMethodData::BankRedirect(_)
-                    | domain::PaymentMethodData::BankDebit(_)
-                    | domain::PaymentMethodData::BankTransfer(_)
-                    | domain::PaymentMethodData::Crypto(_)
-                    | domain::PaymentMethodData::Reward
-                    | domain::PaymentMethodData::RealTimePayment(_)
-                    | domain::PaymentMethodData::MobilePayment(_)
-                    | domain::PaymentMethodData::Upi(_)
-                    | domain::PaymentMethodData::Voucher(_)
-                    | domain::PaymentMethodData::GiftCard(_)
-                    | domain::PaymentMethodData::OpenBanking(_)
-                    | domain::PaymentMethodData::CardToken(_) => {
+                    PaymentMethodData::CardRedirect(_)
+                    | PaymentMethodData::PayLater(_)
+                    | PaymentMethodData::BankRedirect(_)
+                    | PaymentMethodData::BankDebit(_)
+                    | PaymentMethodData::BankTransfer(_)
+                    | PaymentMethodData::Crypto(_)
+                    | PaymentMethodData::Reward
+                    | PaymentMethodData::RealTimePayment(_)
+                    | PaymentMethodData::MobilePayment(_)
+                    | PaymentMethodData::Upi(_)
+                    | PaymentMethodData::Voucher(_)
+                    | PaymentMethodData::GiftCard(_)
+                    | PaymentMethodData::OpenBanking(_)
+                    | PaymentMethodData::CardToken(_) => {
                         Err(errors::ConnectorError::NotImplemented(
                             utils::get_unimplemented_payment_method_error_message("Cybersource"),
                         )
@@ -1974,16 +2004,13 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
     }
 }
 
-impl
-    TryFrom<(
-        &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
-        String,
-    )> for CybersourcePaymentsRequest
+impl TryFrom<(&CybersourceRouterData<&PaymentsAuthorizeRouterData>, String)>
+    for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, connector_mandate_id): (
-            &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+            &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
             String,
         ),
     ) -> Result<Self, Self::Error> {
@@ -2007,7 +2034,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             processing_information,
             payment_information,
@@ -2026,15 +2053,13 @@ pub struct CybersourceAuthSetupRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
-    for CybersourceAuthSetupRequest
-{
+impl TryFrom<&CybersourceRouterData<&PaymentsAuthorizeRouterData>> for CybersourceAuthSetupRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsAuthorizeRouterData>,
+        item: &CybersourceRouterData<&PaymentsAuthorizeRouterData>,
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(ccard) => {
+            PaymentMethodData::Card(ccard) => {
                 let card_type = match ccard
                     .card_network
                     .clone()
@@ -2059,24 +2084,24 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsAuthorizeRouterData>>
                     client_reference_information,
                 })
             }
-            domain::PaymentMethodData::Wallet(_)
-            | domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::Wallet(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Cybersource"),
                 )
@@ -2103,19 +2128,20 @@ pub struct CybersourcePaymentsIncrementalAuthorizationRequest {
     order_information: OrderInformationIncrementalAuthorization,
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsCaptureRouterData>>
+impl TryFrom<&CybersourceRouterData<&PaymentsCaptureRouterData>>
     for CybersourcePaymentsCaptureRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsCaptureRouterData>,
+        item: &CybersourceRouterData<&PaymentsCaptureRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = item
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
+
         Ok(Self {
             processing_information: ProcessingInformation {
                 capture_options: Some(CaptureOptions {
@@ -2144,12 +2170,12 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsCaptureRouterData>>
     }
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsIncrementalAuthorizationRouterData>>
+impl TryFrom<&CybersourceRouterData<&PaymentsIncrementalAuthorizationRouterData>>
     for CybersourcePaymentsIncrementalAuthorizationRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsIncrementalAuthorizationRouterData>,
+        item: &CybersourceRouterData<&PaymentsIncrementalAuthorizationRouterData>,
     ) -> Result<Self, Self::Error> {
         let connector_merchant_config =
             CybersourceConnectorMetadataObject::try_from(&item.router_data.connector_meta_data)?;
@@ -2204,17 +2230,18 @@ pub struct ReversalInformation {
     reason: String,
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsCancelRouterData>> for CybersourceVoidRequest {
+impl TryFrom<&CybersourceRouterData<&PaymentsCancelRouterData>> for CybersourceVoidRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: &CybersourceRouterData<&types::PaymentsCancelRouterData>,
+        value: &CybersourceRouterData<&PaymentsCancelRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = value
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
+
         Ok(Self {
             client_reference_information: ClientReferenceInformation {
                 code: Some(value.router_data.connector_request_reference_id.clone()),
@@ -2248,10 +2275,10 @@ pub struct CybersourceAuthType {
     pub(super) api_secret: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for CybersourceAuthType {
+impl TryFrom<&ConnectorAuthType> for CybersourceAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
-        if let types::ConnectorAuthType::SignatureKey {
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+        if let ConnectorAuthType::SignatureKey {
             api_key,
             key1,
             api_secret,
@@ -2301,40 +2328,42 @@ pub enum CybersourceIncrementalAuthorizationStatus {
     AuthorizedPendingReview,
 }
 
-impl ForeignFrom<(CybersourcePaymentStatus, bool)> for enums::AttemptStatus {
-    fn foreign_from((status, capture): (CybersourcePaymentStatus, bool)) -> Self {
-        match status {
-            CybersourcePaymentStatus::Authorized => {
-                if capture {
-                    // Because Cybersource will return Payment Status as Authorized even in AutoCapture Payment
-                    Self::Charged
-                } else {
-                    Self::Authorized
-                }
-            }
-            CybersourcePaymentStatus::Succeeded | CybersourcePaymentStatus::Transmitted => {
-                Self::Charged
+pub fn map_cybersource_attempt_status(
+    status: CybersourcePaymentStatus,
+    capture: bool,
+) -> enums::AttemptStatus {
+    match status {
+        CybersourcePaymentStatus::Authorized => {
+            if capture {
+                // Because Cybersource will return Payment Status as Authorized even in AutoCapture Payment
+                enums::AttemptStatus::Charged
+            } else {
+                enums::AttemptStatus::Authorized
             }
-            CybersourcePaymentStatus::Voided
-            | CybersourcePaymentStatus::Reversed
-            | CybersourcePaymentStatus::Cancelled => Self::Voided,
-            CybersourcePaymentStatus::Failed
-            | CybersourcePaymentStatus::Declined
-            | CybersourcePaymentStatus::AuthorizedRiskDeclined
-            | CybersourcePaymentStatus::Rejected
-            | CybersourcePaymentStatus::InvalidRequest
-            | CybersourcePaymentStatus::ServerError => Self::Failure,
-            CybersourcePaymentStatus::PendingAuthentication => Self::AuthenticationPending,
-            CybersourcePaymentStatus::PendingReview
-            | CybersourcePaymentStatus::StatusNotReceived
-            | CybersourcePaymentStatus::Challenge
-            | CybersourcePaymentStatus::Accepted
-            | CybersourcePaymentStatus::Pending
-            | CybersourcePaymentStatus::AuthorizedPendingReview => Self::Pending,
         }
+        CybersourcePaymentStatus::Succeeded | CybersourcePaymentStatus::Transmitted => {
+            enums::AttemptStatus::Charged
+        }
+        CybersourcePaymentStatus::Voided
+        | CybersourcePaymentStatus::Reversed
+        | CybersourcePaymentStatus::Cancelled => enums::AttemptStatus::Voided,
+        CybersourcePaymentStatus::Failed
+        | CybersourcePaymentStatus::Declined
+        | CybersourcePaymentStatus::AuthorizedRiskDeclined
+        | CybersourcePaymentStatus::Rejected
+        | CybersourcePaymentStatus::InvalidRequest
+        | CybersourcePaymentStatus::ServerError => enums::AttemptStatus::Failure,
+        CybersourcePaymentStatus::PendingAuthentication => {
+            enums::AttemptStatus::AuthenticationPending
+        }
+        CybersourcePaymentStatus::PendingReview
+        | CybersourcePaymentStatus::StatusNotReceived
+        | CybersourcePaymentStatus::Challenge
+        | CybersourcePaymentStatus::Accepted
+        | CybersourcePaymentStatus::Pending
+        | CybersourcePaymentStatus::AuthorizedPendingReview => enums::AttemptStatus::Pending,
     }
 }
-
 impl From<CybersourceIncrementalAuthorizationStatus> for common_enums::AuthorizationStatus {
     fn from(item: CybersourceIncrementalAuthorizationStatus) -> Self {
         match item {
@@ -2446,84 +2475,17 @@ pub struct CybersourceErrorInformation {
     details: Option<Vec<Details>>,
 }
 
-impl<F, T>
-    ForeignFrom<(
-        &CybersourceErrorInformationResponse,
-        types::ResponseRouterData<F, CybersourcePaymentsResponse, T, types::PaymentsResponseData>,
-        Option<enums::AttemptStatus>,
-    )> for types::RouterData<F, T, types::PaymentsResponseData>
-{
-    fn foreign_from(
-        (error_response, item, transaction_status): (
-            &CybersourceErrorInformationResponse,
-            types::ResponseRouterData<
-                F,
-                CybersourcePaymentsResponse,
-                T,
-                types::PaymentsResponseData,
-            >,
-            Option<enums::AttemptStatus>,
-        ),
-    ) -> Self {
-        let detailed_error_info =
-            error_response
-                .error_information
-                .details
-                .to_owned()
-                .map(|details| {
-                    details
-                        .iter()
-                        .map(|details| format!("{} : {}", details.field, details.reason))
-                        .collect::<Vec<_>>()
-                        .join(", ")
-                });
-
-        let reason = get_error_reason(
-            error_response.error_information.message.clone(),
-            detailed_error_info,
-            None,
-        );
-        let response = Err(types::ErrorResponse {
-            code: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code: item.http_code,
-            attempt_status: None,
-            connector_transaction_id: Some(error_response.id.clone()),
-        });
-        match transaction_status {
-            Some(status) => Self {
-                response,
-                status,
-                ..item.data
-            },
-            None => Self {
-                response,
-                ..item.data
-            },
-        }
-    }
-}
-
 fn get_error_response_if_failure(
     (info_response, status, http_code): (&CybersourcePaymentsResponse, enums::AttemptStatus, u16),
-) -> Option<types::ErrorResponse> {
+) -> Option<ErrorResponse> {
     if utils::is_payment_failure(status) {
-        Some(types::ErrorResponse::foreign_from((
+        Some(get_error_response(
             &info_response.error_information,
             &info_response.risk_information,
             Some(status),
             http_code,
             info_response.id.clone(),
-        )))
+        ))
     } else {
         None
     }
@@ -2531,7 +2493,7 @@ fn get_error_response_if_failure(
 
 fn get_payment_response(
     (info_response, status, http_code): (&CybersourcePaymentsResponse, enums::AttemptStatus, u16),
-) -> Result<types::PaymentsResponseData, types::ErrorResponse> {
+) -> Result<PaymentsResponseData, ErrorResponse> {
     let error_response = get_error_response_if_failure((info_response, status, http_code));
     match error_response {
         Some(error) => Err(error),
@@ -2542,7 +2504,7 @@ fn get_payment_response(
                 info_response
                     .token_information
                     .clone()
-                    .map(|token_info| types::MandateReference {
+                    .map(|token_info| MandateReference {
                         connector_mandate_id: token_info
                             .payment_instrument
                             .map(|payment_instrument| payment_instrument.id.expose()),
@@ -2551,8 +2513,8 @@ fn get_payment_response(
                         connector_mandate_request_reference_id: None,
                     });
 
-            Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(info_response.id.clone()),
+            Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(info_response.id.clone()),
                 redirection_data: Box::new(None),
                 mandate_reference: Box::new(mandate_reference),
                 connector_metadata: None,
@@ -2575,38 +2537,37 @@ fn get_payment_response(
 
 impl
     TryFrom<
-        types::ResponseRouterData<
-            api::Authorize,
+        ResponseRouterData<
+            Authorize,
             CybersourcePaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
-    >
-    for types::RouterData<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
+    > for RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            api::Authorize,
+        item: ResponseRouterData<
+            Authorize,
             CybersourcePaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_cybersource_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(CybersourcePaymentStatus::StatusNotReceived),
             item.data.request.is_auto_capture()?,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         let connector_response = item
             .response
             .processor_information
             .as_ref()
-            .map(types::AdditionalPaymentMethodConnectorResponse::from)
-            .map(types::ConnectorResponseData::with_additional_payment_method_data);
+            .map(AdditionalPaymentMethodConnectorResponse::from)
+            .map(ConnectorResponseData::with_additional_payment_method_data);
 
         Ok(Self {
             status,
@@ -2619,41 +2580,39 @@ impl
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourceAuthSetupResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsAuthorizeData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsAuthorizeData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourceAuthSetupResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response {
             CybersourceAuthSetupResponse::ClientAuthSetupInfo(info_response) => Ok(Self {
                 status: enums::AttemptStatus::AuthenticationPending,
-                response: Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::NoResponseId,
-                    redirection_data: Box::new(Some(
-                        services::RedirectForm::CybersourceAuthSetup {
-                            access_token: info_response
-                                .consumer_authentication_information
-                                .access_token,
-                            ddc_url: info_response
-                                .consumer_authentication_information
-                                .device_data_collection_url,
-                            reference_id: info_response
-                                .consumer_authentication_information
-                                .reference_id,
-                        },
-                    )),
+                response: Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::NoResponseId,
+                    redirection_data: Box::new(Some(RedirectForm::CybersourceAuthSetup {
+                        access_token: info_response
+                            .consumer_authentication_information
+                            .access_token,
+                        ddc_url: info_response
+                            .consumer_authentication_information
+                            .device_data_collection_url,
+                        reference_id: info_response
+                            .consumer_authentication_information
+                            .reference_id,
+                    })),
                     mandate_reference: Box::new(None),
                     connector_metadata: None,
                     network_txn_id: None,
@@ -2689,11 +2648,13 @@ impl<F>
                 );
                 let error_message = error_response.error_information.reason;
                 Ok(Self {
-                    response: Err(types::ErrorResponse {
+                    response: Err(ErrorResponse {
                         code: error_message
                             .clone()
-                            .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-                        message: error_message.unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+                        message: error_message.unwrap_or(
+                            hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string(),
+                        ),
                         reason,
                         status_code: item.http_code,
                         attempt_status: None,
@@ -2750,12 +2711,12 @@ pub enum CybersourcePreProcessingRequest {
     AuthValidate(Box<CybersourceAuthValidateRequest>),
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsPreProcessingRouterData>>
+impl TryFrom<&CybersourceRouterData<&PaymentsPreProcessingRouterData>>
     for CybersourcePreProcessingRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsPreProcessingRouterData>,
+        item: &CybersourceRouterData<&PaymentsPreProcessingRouterData>,
     ) -> Result<Self, Self::Error> {
         let client_reference_information = ClientReferenceInformation {
             code: Some(item.router_data.connector_request_reference_id.clone()),
@@ -2766,7 +2727,7 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsPreProcessingRouterData>>
             },
         )?;
         let payment_information = match payment_method_data {
-            domain::PaymentMethodData::Card(ccard) => {
+            PaymentMethodData::Card(ccard) => {
                 let card_type = match ccard
                     .card_network
                     .clone()
@@ -2787,24 +2748,24 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsPreProcessingRouterData>>
                     },
                 )))
             }
-            domain::PaymentMethodData::Wallet(_)
-            | domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::Wallet(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Cybersource"),
                 ))
@@ -2889,12 +2850,12 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsPreProcessingRouterData>>
     }
 }
 
-impl TryFrom<&CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>>
+impl TryFrom<&CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>>
     for CybersourcePaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>,
+        item: &CybersourceRouterData<&PaymentsCompleteAuthorizeRouterData>,
     ) -> Result<Self, Self::Error> {
         let payment_method_data = item.router_data.request.payment_method_data.clone().ok_or(
             errors::ConnectorError::MissingRequiredField {
@@ -2902,25 +2863,25 @@ impl TryFrom<&CybersourceRouterData<&types::PaymentsCompleteAuthorizeRouterData>
             },
         )?;
         match payment_method_data {
-            domain::PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
-            domain::PaymentMethodData::Wallet(_)
-            | domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
+            PaymentMethodData::Wallet(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Cybersource"),
                 )
@@ -2995,21 +2956,21 @@ impl From<CybersourceAuthEnrollmentStatus> for enums::AttemptStatus {
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourcePreProcessingResponse,
-            types::PaymentsPreProcessingData,
-            types::PaymentsResponseData,
+            PaymentsPreProcessingData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsPreProcessingData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsPreProcessingData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourcePreProcessingResponse,
-            types::PaymentsPreProcessingData,
-            types::PaymentsResponseData,
+            PaymentsPreProcessingData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response {
@@ -3017,13 +2978,13 @@ impl<F>
                 let status = enums::AttemptStatus::from(info_response.status);
                 let risk_info: Option<ClientRiskInformation> = None;
                 if utils::is_payment_failure(status) {
-                    let response = Err(types::ErrorResponse::foreign_from((
+                    let response = Err(get_error_response(
                         &info_response.error_information,
                         &risk_info,
                         Some(status),
                         item.http_code,
                         info_response.id.clone(),
-                    )));
+                    ));
 
                     Ok(Self {
                         status,
@@ -3047,7 +3008,7 @@ impl<F>
                             .step_up_url,
                     ) {
                         (Some(token), Some(step_up_url)) => {
-                            Some(services::RedirectForm::CybersourceConsumerAuth {
+                            Some(RedirectForm::CybersourceConsumerAuth {
                                 access_token: token.expose(),
                                 step_up_url,
                             })
@@ -3062,8 +3023,8 @@ impl<F>
                     .change_context(errors::ConnectorError::ResponseHandlingFailed)?;
                     Ok(Self {
                         status,
-                        response: Ok(types::PaymentsResponseData::TransactionResponse {
-                            resource_id: types::ResponseId::NoResponseId,
+                        response: Ok(PaymentsResponseData::TransactionResponse {
+                            resource_id: ResponseId::NoResponseId,
                             redirection_data: Box::new(redirection_data),
                             mandate_reference: Box::new(None),
                             connector_metadata: Some(serde_json::json!({
@@ -3098,11 +3059,12 @@ impl<F>
                     None,
                 );
                 let error_message = error_response.error_information.reason.to_owned();
-                let response = Err(types::ErrorResponse {
+                let response = Err(ErrorResponse {
                     code: error_message
                         .clone()
-                        .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-                    message: error_message.unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                        .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+                    message: error_message
+                        .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
                     reason,
                     status_code: item.http_code,
                     attempt_status: None,
@@ -3120,37 +3082,37 @@ impl<F>
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::CompleteAuthorizeData,
-            types::PaymentsResponseData,
+            CompleteAuthorizeData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::CompleteAuthorizeData, types::PaymentsResponseData>
+    > for RouterData<F, CompleteAuthorizeData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::CompleteAuthorizeData,
-            types::PaymentsResponseData,
+            CompleteAuthorizeData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_cybersource_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(CybersourcePaymentStatus::StatusNotReceived),
             item.data.request.is_auto_capture()?,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         let connector_response = item
             .response
             .processor_information
             .as_ref()
-            .map(types::AdditionalPaymentMethodConnectorResponse::from)
-            .map(types::ConnectorResponseData::with_additional_payment_method_data);
+            .map(AdditionalPaymentMethodConnectorResponse::from)
+            .map(ConnectorResponseData::with_additional_payment_method_data);
 
         Ok(Self {
             status,
@@ -3161,7 +3123,7 @@ impl<F>
     }
 }
 
-impl From<&ClientProcessorInformation> for types::AdditionalPaymentMethodConnectorResponse {
+impl From<&ClientProcessorInformation> for AdditionalPaymentMethodConnectorResponse {
     fn from(processor_information: &ClientProcessorInformation) -> Self {
         let payment_checks = Some(
             serde_json::json!({"avs_response": processor_information.avs, "card_verification": processor_information.card_verification}),
@@ -3176,30 +3138,30 @@ impl From<&ClientProcessorInformation> for types::AdditionalPaymentMethodConnect
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsCaptureData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsCaptureData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_cybersource_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(CybersourcePaymentStatus::StatusNotReceived),
             true,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         Ok(Self {
             status,
@@ -3211,30 +3173,30 @@ impl<F>
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
+            PaymentsCancelData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsCancelData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsCancelData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourcePaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
+            PaymentsCancelData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_cybersource_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(CybersourcePaymentStatus::StatusNotReceived),
             false,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         Ok(Self {
             status,
@@ -3247,33 +3209,28 @@ impl<F>
 // zero dollar response
 impl
     TryFrom<
-        types::ResponseRouterData<
-            api::SetupMandate,
+        ResponseRouterData<
+            SetupMandate,
             CybersourcePaymentsResponse,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
+            SetupMandateRequestData,
+            PaymentsResponseData,
         >,
-    >
-    for types::RouterData<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    >
+    > for RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            api::SetupMandate,
+        item: ResponseRouterData<
+            SetupMandate,
             CybersourcePaymentsResponse,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
+            SetupMandateRequestData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         let mandate_reference =
             item.response
                 .token_information
                 .clone()
-                .map(|token_info| types::MandateReference {
+                .map(|token_info| MandateReference {
                     connector_mandate_id: token_info
                         .payment_instrument
                         .map(|payment_instrument| payment_instrument.id.expose()),
@@ -3281,13 +3238,13 @@ impl
                     mandate_metadata: None,
                     connector_mandate_request_reference_id: None,
                 });
-        let mut mandate_status = enums::AttemptStatus::foreign_from((
+        let mut mandate_status = map_cybersource_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(CybersourcePaymentStatus::StatusNotReceived),
             false,
-        ));
+        );
         if matches!(mandate_status, enums::AttemptStatus::Authorized) {
             //In case of zero auth mandates we want to make the payment reach the terminal status so we are converting the authorized status to charged as well.
             mandate_status = enums::AttemptStatus::Charged
@@ -3299,17 +3256,15 @@ impl
             .response
             .processor_information
             .as_ref()
-            .map(types::AdditionalPaymentMethodConnectorResponse::from)
-            .map(types::ConnectorResponseData::with_additional_payment_method_data);
+            .map(AdditionalPaymentMethodConnectorResponse::from)
+            .map(ConnectorResponseData::with_additional_payment_method_data);
 
         Ok(Self {
             status: mandate_status,
             response: match error_response {
                 Some(error) => Err(error),
-                None => Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::ConnectorTransactionId(
-                        item.response.id.clone(),
-                    ),
+                None => Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                     redirection_data: Box::new(None),
                     mandate_reference: Box::new(mandate_reference),
                     connector_metadata: None,
@@ -3339,47 +3294,38 @@ impl
 }
 
 impl<F, T>
-    ForeignTryFrom<(
-        types::ResponseRouterData<
+    TryFrom<
+        ResponseRouterData<
             F,
             CybersourcePaymentsIncrementalAuthorizationResponse,
             T,
-            types::PaymentsResponseData,
+            PaymentsResponseData,
         >,
-        bool,
-    )> for types::RouterData<F, T, types::PaymentsResponseData>
+    > for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn foreign_try_from(
-        data: (
-            types::ResponseRouterData<
-                F,
-                CybersourcePaymentsIncrementalAuthorizationResponse,
-                T,
-                types::PaymentsResponseData,
-            >,
-            bool,
-        ),
+    fn try_from(
+        item: ResponseRouterData<
+            F,
+            CybersourcePaymentsIncrementalAuthorizationResponse,
+            T,
+            PaymentsResponseData,
+        >,
     ) -> Result<Self, Self::Error> {
-        let item = data.0;
         Ok(Self {
             response: match item.response.error_information {
-                Some(error) => Ok(
-                    types::PaymentsResponseData::IncrementalAuthorizationResponse {
-                        status: common_enums::AuthorizationStatus::Failure,
-                        error_code: error.reason,
-                        error_message: error.message,
-                        connector_authorization_id: None,
-                    },
-                ),
-                _ => Ok(
-                    types::PaymentsResponseData::IncrementalAuthorizationResponse {
-                        status: item.response.status.into(),
-                        error_code: None,
-                        error_message: None,
-                        connector_authorization_id: None,
-                    },
-                ),
+                Some(error) => Ok(PaymentsResponseData::IncrementalAuthorizationResponse {
+                    status: common_enums::AuthorizationStatus::Failure,
+                    error_code: error.reason,
+                    error_message: error.message,
+                    connector_authorization_id: None,
+                }),
+                None => Ok(PaymentsResponseData::IncrementalAuthorizationResponse {
+                    status: item.response.status.into(),
+                    error_code: None,
+                    error_message: None,
+                    connector_authorization_id: None,
+                }),
             },
             ..item.data
         })
@@ -3403,49 +3349,47 @@ pub struct ApplicationInformation {
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             CybersourceTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsSyncData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsSyncData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             CybersourceTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response.application_information.status {
             Some(status) => {
-                let status = enums::AttemptStatus::foreign_from((
-                    status,
-                    item.data.request.is_auto_capture()?,
-                ));
+                let status =
+                    map_cybersource_attempt_status(status, item.data.request.is_auto_capture()?);
                 let incremental_authorization_allowed =
                     Some(status == enums::AttemptStatus::Authorized);
                 let risk_info: Option<ClientRiskInformation> = None;
                 if utils::is_payment_failure(status) {
                     Ok(Self {
-                        response: Err(types::ErrorResponse::foreign_from((
+                        response: Err(get_error_response(
                             &item.response.error_information,
                             &risk_info,
                             Some(status),
                             item.http_code,
                             item.response.id.clone(),
-                        ))),
+                        )),
                         status: enums::AttemptStatus::Failure,
                         ..item.data
                     })
                 } else {
                     Ok(Self {
                         status,
-                        response: Ok(types::PaymentsResponseData::TransactionResponse {
-                            resource_id: types::ResponseId::ConnectorTransactionId(
+                        response: Ok(PaymentsResponseData::TransactionResponse {
+                            resource_id: ResponseId::ConnectorTransactionId(
                                 item.response.id.clone(),
                             ),
                             redirection_data: Box::new(None),
@@ -3466,10 +3410,8 @@ impl<F>
             }
             None => Ok(Self {
                 status: item.data.status,
-                response: Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::ConnectorTransactionId(
-                        item.response.id.clone(),
-                    ),
+                response: Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                     redirection_data: Box::new(None),
                     mandate_reference: Box::new(None),
                     connector_metadata: None,
@@ -3491,11 +3433,9 @@ pub struct CybersourceRefundRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl<F> TryFrom<&CybersourceRouterData<&types::RefundsRouterData<F>>> for CybersourceRefundRequest {
+impl<F> TryFrom<&CybersourceRouterData<&RefundsRouterData<F>>> for CybersourceRefundRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(
-        item: &CybersourceRouterData<&types::RefundsRouterData<F>>,
-    ) -> Result<Self, Self::Error> {
+    fn try_from(item: &CybersourceRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
         Ok(Self {
             order_information: OrderInformation {
                 amount_details: Amount {
@@ -3543,24 +3483,24 @@ pub struct CybersourceRefundResponse {
     error_information: Option<CybersourceErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, CybersourceRefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<RefundsResponseRouterData<Execute, CybersourceRefundResponse>>
+    for RefundsRouterData<Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, CybersourceRefundResponse>,
+        item: RefundsResponseRouterData<Execute, CybersourceRefundResponse>,
     ) -> Result<Self, Self::Error> {
         let refund_status = enums::RefundStatus::from(item.response.status.clone());
         let response = if utils::is_refund_failure(refund_status) {
-            Err(types::ErrorResponse::foreign_from((
+            Err(get_error_response(
                 &item.response.error_information,
                 &None,
                 None,
                 item.http_code,
                 item.response.id.clone(),
-            )))
+            ))
         } else {
-            Ok(types::RefundsResponseData {
+            Ok(RefundsResponseData {
                 connector_refund_id: item.response.id,
                 refund_status: enums::RefundStatus::from(item.response.status),
             })
@@ -3587,12 +3527,12 @@ pub struct CybersourceRsyncResponse {
     error_information: Option<CybersourceErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, CybersourceRsyncResponse>>
-    for types::RefundsRouterData<api::RSync>
+impl TryFrom<RefundsResponseRouterData<RSync, CybersourceRsyncResponse>>
+    for RefundsRouterData<RSync>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, CybersourceRsyncResponse>,
+        item: RefundsResponseRouterData<RSync, CybersourceRsyncResponse>,
     ) -> Result<Self, Self::Error> {
         let response = match item
             .response
@@ -3603,35 +3543,35 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, CybersourceRsyncRespon
                 let refund_status = enums::RefundStatus::from(status.clone());
                 if utils::is_refund_failure(refund_status) {
                     if status == CybersourceRefundStatus::Voided {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &Some(CybersourceErrorInformation {
-                                message: Some(consts::REFUND_VOIDED.to_string()),
-                                reason: Some(consts::REFUND_VOIDED.to_string()),
+                                message: Some(constants::REFUND_VOIDED.to_string()),
+                                reason: Some(constants::REFUND_VOIDED.to_string()),
                                 details: None,
                             }),
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     } else {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &item.response.error_information,
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     }
                 } else {
-                    Ok(types::RefundsResponseData {
+                    Ok(RefundsResponseData {
                         connector_refund_id: item.response.id,
                         refund_status,
                     })
                 }
             }
 
-            None => Ok(types::RefundsResponseData {
+            None => Ok(RefundsResponseData {
                 connector_refund_id: item.response.id.clone(),
                 refund_status: match item.data.response {
                     Ok(response) => response.refund_status,
@@ -3669,7 +3609,7 @@ pub struct CybersourceRecipientInfo {
     locality: String,
     administrative_area: Secret<String>,
     postal_code: Secret<String>,
-    country: api_enums::CountryAlpha2,
+    country: enums::CountryAlpha2,
     phone_number: Option<Secret<String>>,
 }
 
@@ -3712,12 +3652,12 @@ pub enum CybersourcePayoutBusinessType {
 }
 
 #[cfg(feature = "payouts")]
-impl TryFrom<&CybersourceRouterData<&types::PayoutsRouterData<api::PoFulfill>>>
+impl TryFrom<&CybersourceRouterData<&PayoutsRouterData<PoFulfill>>>
     for CybersourcePayoutFulfillRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &CybersourceRouterData<&types::PayoutsRouterData<api::PoFulfill>>,
+        item: &CybersourceRouterData<&PayoutsRouterData<PoFulfill>>,
     ) -> Result<Self, Self::Error> {
         let payout_type = item.router_data.request.get_payout_type()?;
         match payout_type {
@@ -3834,28 +3774,24 @@ pub enum CybersourcePayoutStatus {
 }
 
 #[cfg(feature = "payouts")]
-impl ForeignFrom<CybersourcePayoutStatus> for enums::PayoutStatus {
-    fn foreign_from(status: CybersourcePayoutStatus) -> Self {
-        match status {
-            CybersourcePayoutStatus::Accepted => Self::Success,
-            CybersourcePayoutStatus::Declined | CybersourcePayoutStatus::InvalidRequest => {
-                Self::Failed
-            }
+fn map_payout_status(status: CybersourcePayoutStatus) -> enums::PayoutStatus {
+    match status {
+        CybersourcePayoutStatus::Accepted => enums::PayoutStatus::Success,
+        CybersourcePayoutStatus::Declined | CybersourcePayoutStatus::InvalidRequest => {
+            enums::PayoutStatus::Failed
         }
     }
 }
 
 #[cfg(feature = "payouts")]
-impl<F> TryFrom<types::PayoutsResponseRouterData<F, CybersourceFulfillResponse>>
-    for types::PayoutsRouterData<F>
-{
+impl<F> TryFrom<PayoutsResponseRouterData<F, CybersourceFulfillResponse>> for PayoutsRouterData<F> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::PayoutsResponseRouterData<F, CybersourceFulfillResponse>,
+        item: PayoutsResponseRouterData<F, CybersourceFulfillResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            response: Ok(types::PayoutsResponseData {
-                status: Some(enums::PayoutStatus::foreign_from(item.response.status)),
+            response: Ok(PayoutsResponseData {
+                status: Some(map_payout_status(item.response.status)),
                 connector_payout_id: Some(item.response.id),
                 payout_eligible: None,
                 should_add_next_step_to_process_tracker: false,
@@ -3940,70 +3876,62 @@ pub struct AuthenticationErrorInformation {
     pub rmsg: String,
 }
 
-impl
-    ForeignFrom<(
-        &Option<CybersourceErrorInformation>,
-        &Option<ClientRiskInformation>,
-        Option<enums::AttemptStatus>,
-        u16,
-        String,
-    )> for types::ErrorResponse
-{
-    fn foreign_from(
-        (error_data, risk_information, attempt_status, status_code, transaction_id): (
-            &Option<CybersourceErrorInformation>,
-            &Option<ClientRiskInformation>,
-            Option<enums::AttemptStatus>,
-            u16,
-            String,
-        ),
-    ) -> Self {
-        let avs_message = risk_information
-            .clone()
-            .map(|client_risk_information| {
-                client_risk_information.rules.map(|rules| {
-                    rules
-                        .iter()
-                        .map(|risk_info| {
-                            risk_info.name.clone().map_or("".to_string(), |name| {
-                                format!(" , {}", name.clone().expose())
-                            })
+pub fn get_error_response(
+    error_data: &Option<CybersourceErrorInformation>,
+    risk_information: &Option<ClientRiskInformation>,
+    attempt_status: Option<enums::AttemptStatus>,
+    status_code: u16,
+    transaction_id: String,
+) -> ErrorResponse {
+    let avs_message = risk_information
+        .clone()
+        .map(|client_risk_information| {
+            client_risk_information.rules.map(|rules| {
+                rules
+                    .iter()
+                    .map(|risk_info| {
+                        risk_info.name.clone().map_or("".to_string(), |name| {
+                            format!(" , {}", name.clone().expose())
                         })
-                        .collect::<Vec<String>>()
-                        .join("")
-                })
+                    })
+                    .collect::<Vec<String>>()
+                    .join("")
             })
-            .unwrap_or(Some("".to_string()));
+        })
+        .unwrap_or(Some("".to_string()));
+
+    let detailed_error_info = error_data.as_ref().and_then(|error_data| {
+        error_data.details.as_ref().map(|details| {
+            details
+                .iter()
+                .map(|detail| format!("{} : {}", detail.field, detail.reason))
+                .collect::<Vec<_>>()
+                .join(", ")
+        })
+    });
 
-        let detailed_error_info = error_data
-            .clone()
-            .map(|error_data| match error_data.details {
-                Some(details) => details
-                    .iter()
-                    .map(|details| format!("{} : {}", details.field, details.reason))
-                    .collect::<Vec<_>>()
-                    .join(", "),
-                None => "".to_string(),
-            });
+    let reason = get_error_reason(
+        error_data
+            .as_ref()
+            .and_then(|error_info| error_info.message.clone()),
+        detailed_error_info,
+        avs_message,
+    );
 
-        let reason = get_error_reason(
-            error_data.clone().and_then(|error_info| error_info.message),
-            detailed_error_info,
-            avs_message,
-        );
-        let error_message = error_data.clone().and_then(|error_info| error_info.reason);
-        Self {
-            code: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code,
-            attempt_status,
-            connector_transaction_id: Some(transaction_id.clone()),
-        }
+    let error_message = error_data
+        .as_ref()
+        .and_then(|error_info| error_info.reason.clone());
+
+    ErrorResponse {
+        code: error_message
+            .clone()
+            .unwrap_or_else(|| hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+        message: error_message
+            .unwrap_or_else(|| hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
+        reason,
+        status_code,
+        attempt_status,
+        connector_transaction_id: Some(transaction_id),
     }
 }
 
diff --git a/crates/router/src/connector/wellsfargo.rs b/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
similarity index 66%
rename from crates/router/src/connector/wellsfargo.rs
rename to crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
index b47b3662253..8566ec70341 100644
--- a/crates/router/src/connector/wellsfargo.rs
+++ b/crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
@@ -1,42 +1,69 @@
 pub mod transformers;
 
 use base64::Engine;
+use common_enums::enums;
 use common_utils::{
-    request::RequestContent,
+    consts,
+    errors::CustomResult,
+    ext_traits::BytesExt,
+    request::{Method, Request, RequestBuilder, RequestContent},
     types::{AmountConvertor, MinorUnit, StringMajorUnit, StringMajorUnitForConnector},
 };
-use diesel_models::enums;
 use error_stack::{report, Report, ResultExt};
-use masking::{ExposeInterface, PeekInterface};
-use ring::{digest, hmac};
-use time::OffsetDateTime;
-use transformers as wellsfargo;
-use url::Url;
-
-use super::utils::convert_amount;
-use crate::{
-    configs::settings,
-    connector::{
-        utils as connector_utils,
-        utils::{PaymentMethodDataType, RefundsRequestData},
+use hyperswitch_domain_models::{
+    payment_method_data::PaymentMethodData,
+    router_data::{AccessToken, ErrorResponse, RouterData},
+    router_flow_types::{
+        access_token_auth::AccessTokenAuth,
+        mandate_revoke::MandateRevoke,
+        payments::{
+            Authorize, Capture, IncrementalAuthorization, PSync, PaymentMethodToken, Session,
+            SetupMandate, Void,
+        },
+        refunds::{Execute, RSync},
     },
-    consts,
-    core::errors::{self, CustomResult},
-    events::connector_api_logs::ConnectorEvent,
-    headers,
-    services::{
-        self,
-        request::{self, Mask},
-        ConnectorIntegration, ConnectorSpecifications, ConnectorValidation,
+    router_request_types::{
+        AccessTokenRequestData, MandateRevokeRequestData, PaymentMethodTokenizationData,
+        PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData,
+        PaymentsIncrementalAuthorizationData, PaymentsSessionData, PaymentsSyncData, RefundsData,
+        SetupMandateRequestData,
     },
+    router_response_types::{MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData},
     types::{
+        MandateRevokeRouterData, PaymentsAuthorizeRouterData, PaymentsCancelRouterData,
+        PaymentsCaptureRouterData, PaymentsIncrementalAuthorizationRouterData,
+        PaymentsSyncRouterData, RefundExecuteRouterData, RefundSyncRouterData,
+        SetupMandateRouterData,
+    },
+};
+use hyperswitch_interfaces::{
+    api::{
         self,
-        api::{self, ConnectorCommon, ConnectorCommonExt},
-        transformers::ForeignTryFrom,
+        refunds::{Refund, RefundExecute, RefundSync},
+        ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorSpecifications,
+        ConnectorValidation,
+    },
+    configs::Connectors,
+    errors,
+    events::connector_api_logs::ConnectorEvent,
+    types::{
+        IncrementalAuthorizationType, MandateRevokeType, PaymentsAuthorizeType,
+        PaymentsCaptureType, PaymentsSyncType, PaymentsVoidType, RefundExecuteType, RefundSyncType,
+        Response, SetupMandateType,
     },
-    utils::BytesExt,
+    webhooks,
 };
+use masking::{ExposeInterface, Mask, Maskable, PeekInterface};
+use ring::{digest, hmac};
+use time::OffsetDateTime;
+use transformers as wellsfargo;
+use url::Url;
 
+use crate::{
+    constants::{self, headers},
+    types::ResponseRouterData,
+    utils::{self, convert_amount, PaymentMethodDataType, RefundsRequestData},
+};
 #[derive(Clone)]
 pub struct Wellsfargo {
     amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
@@ -61,16 +88,16 @@ impl Wellsfargo {
         resource: &str,
         payload: &String,
         date: OffsetDateTime,
-        http_method: services::Method,
+        http_method: Method,
     ) -> CustomResult<String, errors::ConnectorError> {
         let wellsfargo::WellsfargoAuthType {
             api_key,
             merchant_account,
             api_secret,
         } = auth;
-        let is_post_method = matches!(http_method, services::Method::Post);
-        let is_patch_method = matches!(http_method, services::Method::Patch);
-        let is_delete_method = matches!(http_method, services::Method::Delete);
+        let is_post_method = matches!(http_method, Method::Post);
+        let is_patch_method = matches!(http_method, Method::Patch);
+        let is_delete_method = matches!(http_method, Method::Delete);
         let digest_str = if is_post_method || is_patch_method {
             "digest "
         } else {
@@ -116,7 +143,7 @@ impl ConnectorCommon for Wellsfargo {
         "application/json;charset=utf-8"
     }
 
-    fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
+    fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
         connectors.wellsfargo.base_url.as_ref()
     }
 
@@ -126,18 +153,18 @@ impl ConnectorCommon for Wellsfargo {
 
     fn build_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: Result<
             wellsfargo::WellsfargoErrorResponse,
             Report<common_utils::errors::ParsingError>,
         > = res.response.parse_struct("Wellsfargo ErrorResponse");
 
         let error_message = if res.status_code == 401 {
-            consts::CONNECTOR_UNAUTHORIZED_ERROR
+            constants::CONNECTOR_UNAUTHORIZED_ERROR
         } else {
-            consts::NO_ERROR_MESSAGE
+            hyperswitch_interfaces::consts::NO_ERROR_MESSAGE
         };
         match response {
             Ok(transformers::WellsfargoErrorResponse::StandardError(response)) => {
@@ -172,12 +199,10 @@ impl ConnectorCommon for Wellsfargo {
                                 .join(", ")
                         });
                         (
-                            response
-                                .reason
-                                .clone()
-                                .map_or(consts::NO_ERROR_CODE.to_string(), |reason| {
-                                    reason.to_string()
-                                }),
+                            response.reason.clone().map_or(
+                                hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
+                                |reason| reason.to_string(),
+                            ),
                             response
                                 .reason
                                 .map_or(error_message.to_string(), |reason| reason.to_string()),
@@ -190,7 +215,7 @@ impl ConnectorCommon for Wellsfargo {
                     }
                 };
 
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
                     code,
                     message,
@@ -202,9 +227,9 @@ impl ConnectorCommon for Wellsfargo {
             Ok(transformers::WellsfargoErrorResponse::AuthenticationError(response)) => {
                 event_builder.map(|i| i.set_error_response_body(&response));
                 router_env::logger::info!(connector_response=?response);
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
-                    code: consts::NO_ERROR_CODE.to_string(),
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: response.response.rmsg.clone(),
                     reason: Some(response.response.rmsg),
                     attempt_status: None,
@@ -226,9 +251,9 @@ impl ConnectorCommon for Wellsfargo {
                     })
                     .collect::<Vec<String>>()
                     .join(" & ");
-                Ok(types::ErrorResponse {
+                Ok(ErrorResponse {
                     status_code: res.status_code,
-                    code: consts::NO_ERROR_CODE.to_string(),
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: error_response.clone(),
                     reason: Some(error_response),
                     attempt_status: None,
@@ -238,7 +263,7 @@ impl ConnectorCommon for Wellsfargo {
             Err(error_msg) => {
                 event_builder.map(|event| event.set_error(serde_json::json!({"error": res.response.escape_ascii().to_string(), "status_code": res.status_code})));
                 router_env::logger::error!(deserialization_error =? error_msg);
-                crate::utils::handle_json_response_deserialization_failure(res, "wellsfargo")
+                utils::handle_json_response_deserialization_failure(res, "wellsfargo")
             }
         }
     }
@@ -257,21 +282,21 @@ impl ConnectorValidation for Wellsfargo {
             | enums::CaptureMethod::Manual
             | enums::CaptureMethod::SequentialAutomatic => Ok(()),
             enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
-                connector_utils::construct_not_implemented_error_report(capture_method, self.id()),
+                utils::construct_not_implemented_error_report(capture_method, self.id()),
             ),
         }
     }
     fn validate_mandate_payment(
         &self,
-        pm_type: Option<types::storage::enums::PaymentMethodType>,
-        pm_data: types::domain::payments::PaymentMethodData,
+        pm_type: Option<enums::PaymentMethodType>,
+        pm_data: PaymentMethodData,
     ) -> CustomResult<(), errors::ConnectorError> {
         let mandate_supported_pmd = std::collections::HashSet::from([
             PaymentMethodDataType::Card,
             PaymentMethodDataType::ApplePay,
             PaymentMethodDataType::GooglePay,
         ]);
-        connector_utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
+        utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
     }
 }
 
@@ -281,9 +306,9 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RouterData<Flow, Request, Response>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         let date = OffsetDateTime::now_utc();
         let wellsfargo_req = self.get_request_body(req, connectors)?;
         let auth = wellsfargo::WellsfargoAuthType::try_from(&req.connector_auth_type)?;
@@ -327,10 +352,7 @@ where
             ("Host".to_string(), host.to_string().into()),
             ("Signature".to_string(), signature.into_masked()),
         ];
-        if matches!(
-            http_method,
-            services::Method::Post | services::Method::Put | services::Method::Patch
-        ) {
+        if matches!(http_method, Method::Post | Method::Put | Method::Patch) {
             headers.push((
                 "Digest".to_string(),
                 format!("SHA-256={sha256}").into_masked(),
@@ -351,28 +373,20 @@ impl api::ConnectorAccessToken for Wellsfargo {}
 impl api::PaymentToken for Wellsfargo {}
 impl api::ConnectorMandateRevoke for Wellsfargo {}
 
-impl
-    ConnectorIntegration<
-        api::PaymentMethodToken,
-        types::PaymentMethodTokenizationData,
-        types::PaymentsResponseData,
-    > for Wellsfargo
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+    for Wellsfargo
 {
     // Not Implemented (R)
 }
 
-impl
-    ConnectorIntegration<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    > for Wellsfargo
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
+    for Wellsfargo
 {
     fn get_headers(
         &self,
-        req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &SetupMandateRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
@@ -380,15 +394,15 @@ impl
     }
     fn get_url(
         &self,
-        _req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
+        _req: &SetupMandateRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}pts/v2/payments/", self.base_url(connectors)))
     }
     fn get_request_body(
         &self,
-        req: &types::SetupMandateRouterData,
-        _connectors: &settings::Connectors,
+        req: &SetupMandateRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_req = wellsfargo::WellsfargoZeroMandateRequest::try_from(req)?;
         Ok(RequestContent::Json(Box::new(connector_req)))
@@ -396,35 +410,33 @@ impl
 
     fn build_request(
         &self,
-        req: &types::SetupMandateRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<common_utils::request::Request>, errors::ConnectorError> {
+        req: &SetupMandateRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::SetupMandateType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&SetupMandateType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::SetupMandateType::get_headers(self, req, connectors)?)
-                .set_body(types::SetupMandateType::get_request_body(
-                    self, req, connectors,
-                )?)
+                .headers(SetupMandateType::get_headers(self, req, connectors)?)
+                .set_body(SetupMandateType::get_request_body(self, req, connectors)?)
                 .build(),
         ))
     }
 
     fn handle_response(
         &self,
-        data: &types::SetupMandateRouterData,
+        data: &SetupMandateRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::SetupMandateRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<SetupMandateRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoPaymentsResponse = res
             .response
             .parse_struct("WellsfargoSetupMandatesResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -433,17 +445,17 @@ impl
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoServerErrorResponse = res
             .response
             .parse_struct("WellsfargoServerErrorResponse")
@@ -459,76 +471,72 @@ impl
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::MandateRevoke,
-        types::MandateRevokeRequestData,
-        types::MandateRevokeResponseData,
-    > for Wellsfargo
+impl ConnectorIntegration<MandateRevoke, MandateRevokeRequestData, MandateRevokeResponseData>
+    for Wellsfargo
 {
     fn get_headers(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Delete
+    fn get_http_method(&self) -> Method {
+        Method::Delete
     }
     fn get_content_type(&self) -> &'static str {
         self.common_get_content_type()
     }
     fn get_url(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}tms/v1/paymentinstruments/{}",
             self.base_url(connectors),
-            connector_utils::RevokeMandateRequestData::get_connector_mandate_id(&req.request)?
+            utils::RevokeMandateRequestData::get_connector_mandate_id(&req.request)?
         ))
     }
     fn build_request(
         &self,
-        req: &types::MandateRevokeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &MandateRevokeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Delete)
-                .url(&types::MandateRevokeType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Delete)
+                .url(&MandateRevokeType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::MandateRevokeType::get_headers(
-                    self, req, connectors,
-                )?)
+                .headers(MandateRevokeType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::MandateRevokeRouterData,
+        data: &MandateRevokeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::MandateRevokeRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<MandateRevokeRouterData, errors::ConnectorError> {
         if matches!(res.status_code, 204) {
             event_builder.map(|i| i.set_response_body(&serde_json::json!({"mandate_status": common_enums::MandateStatus::Revoked.to_string()})));
-            Ok(types::MandateRevokeRouterData {
-                response: Ok(types::MandateRevokeResponseData {
+            Ok(MandateRevokeRouterData {
+                response: Ok(MandateRevokeResponseData {
                     mandate_status: common_enums::MandateStatus::Revoked,
                 }),
                 ..data.clone()
@@ -546,9 +554,9 @@ impl
             });
             router_env::logger::info!(connector_response=?response_string);
 
-            Ok(types::MandateRevokeRouterData {
-                response: Err(types::ErrorResponse {
-                    code: consts::NO_ERROR_CODE.to_string(),
+            Ok(MandateRevokeRouterData {
+                response: Err(ErrorResponse {
+                    code: hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string(),
                     message: response_string.clone(),
                     reason: Some(response_string),
                     status_code: res.status_code,
@@ -561,33 +569,26 @@ impl
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
-impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
-    for Wellsfargo
-{
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Wellsfargo {
     // Not Implemented (R)
 }
 
 impl api::PaymentSession for Wellsfargo {}
 
-impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
-    for Wellsfargo
-{
-}
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Wellsfargo {}
 
-impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -597,8 +598,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_url(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -610,8 +611,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -627,18 +628,16 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn build_request(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsCaptureType::get_headers(
-                    self, req, connectors,
-                )?)
-                .set_body(types::PaymentsCaptureType::get_request_body(
+                .headers(PaymentsCaptureType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsCaptureType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -646,11 +645,11 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsCaptureRouterData,
+        data: &PaymentsCaptureRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
+        res: Response,
     ) -> CustomResult<
-        types::RouterData<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>,
+        RouterData<Capture, PaymentsCaptureData, PaymentsResponseData>,
         errors::ConnectorError,
     > {
         let response: wellsfargo::WellsfargoPaymentsResponse = res
@@ -659,7 +658,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -667,17 +666,17 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoServerErrorResponse = res
             .response
             .parse_struct("WellsfargoServerErrorResponse")
@@ -686,38 +685,38 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
         event_builder.map(|event| event.set_response_body(&response));
         router_env::logger::info!(error_response=?response);
 
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req
             .request
@@ -737,31 +736,31 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn build_request(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
+                .headers(PaymentsSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsSyncRouterData,
+        data: &PaymentsSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoTransactionResponse = res
             .response
             .parse_struct("Wellsfargo PaymentSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -769,21 +768,19 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
-impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -793,8 +790,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_url(
         &self,
-        _req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}pts/v2/payments/",
@@ -804,8 +801,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -821,18 +818,14 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
-            .url(&types::PaymentsAuthorizeType::get_url(
-                self, req, connectors,
-            )?)
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
+            .url(&PaymentsAuthorizeType::get_url(self, req, connectors)?)
             .attach_default_headers()
-            .headers(types::PaymentsAuthorizeType::get_headers(
-                self, req, connectors,
-            )?)
+            .headers(PaymentsAuthorizeType::get_headers(self, req, connectors)?)
             .set_body(self.get_request_body(req, connectors)?)
             .build();
 
@@ -841,17 +834,17 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeRouterData,
+        data: &PaymentsAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoPaymentsResponse = res
             .response
             .parse_struct("Wellsfargo PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -860,17 +853,17 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoServerErrorResponse = res
             .response
             .parse_struct("WellsfargoServerErrorResponse")
@@ -886,34 +879,34 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
             },
             None => None,
         };
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status,
             connector_transaction_id: None,
         })
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
     fn get_url(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -928,8 +921,8 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -953,15 +946,15 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn build_request(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsVoidType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
+                .headers(PaymentsVoidType::get_headers(self, req, connectors)?)
                 .set_body(self.get_request_body(req, connectors)?)
                 .build(),
         ))
@@ -969,17 +962,17 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCancelRouterData,
+        data: &PaymentsCancelRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::PaymentsCancelRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoPaymentsResponse = res
             .response
             .parse_struct("Wellsfargo PaymentResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -988,17 +981,17 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 
     fn get_5xx_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoServerErrorResponse = res
             .response
             .parse_struct("WellsfargoServerErrorResponse")
@@ -1007,31 +1000,31 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
         event_builder.map(|event| event.set_response_body(&response));
         router_env::logger::info!(error_response=?response);
 
-        Ok(types::ErrorResponse {
+        Ok(ErrorResponse {
             status_code: res.status_code,
             reason: response.status.clone(),
-            code: response.status.unwrap_or(consts::NO_ERROR_CODE.to_string()),
+            code: response
+                .status
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
             message: response
                 .message
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
+                .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
             attempt_status: None,
             connector_transaction_id: None,
         })
     }
 }
 
-impl api::Refund for Wellsfargo {}
-impl api::RefundExecute for Wellsfargo {}
-impl api::RefundSync for Wellsfargo {}
+impl Refund for Wellsfargo {}
+impl RefundExecute for Wellsfargo {}
+impl RefundSync for Wellsfargo {}
 
-impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -1041,8 +1034,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_url(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -1054,8 +1047,8 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_request_body(
         &self,
-        req: &types::RefundExecuteRouterData,
-        _connectors: &settings::Connectors,
+        req: &RefundExecuteRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -1069,17 +1062,15 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
     fn build_request(
         &self,
-        req: &types::RefundExecuteRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundExecuteRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&RefundExecuteType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundExecuteType::get_headers(
-                    self, req, connectors,
-                )?)
+                .headers(RefundExecuteType::get_headers(self, req, connectors)?)
                 .set_body(self.get_request_body(req, connectors)?)
                 .build(),
         ))
@@ -1087,17 +1078,17 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn handle_response(
         &self,
-        data: &types::RefundExecuteRouterData,
+        data: &RefundExecuteRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::RefundExecuteRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<RefundExecuteRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoRefundResponse = res
             .response
             .parse_struct("Wellsfargo RefundResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1105,33 +1096,31 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
-impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData>
-    for Wellsfargo
-{
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Wellsfargo {
     fn get_headers(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
     fn get_content_type(&self) -> &'static str {
         self.common_get_content_type()
     }
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Get
+    fn get_http_method(&self) -> Method {
+        Method::Get
     }
     fn get_url(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let refund_id = req.request.get_connector_refund_id()?;
         Ok(format!(
@@ -1142,31 +1131,31 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     }
     fn build_request(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
-                .url(&types::RefundSyncType::get_url(self, req, connectors)?)
+            RequestBuilder::new()
+                .method(Method::Get)
+                .url(&RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
+                .headers(RefundSyncType::get_headers(self, req, connectors)?)
                 .build(),
         ))
     }
     fn handle_response(
         &self,
-        data: &types::RefundSyncRouterData,
+        data: &RefundSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
-    ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
+        res: Response,
+    ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
         let response: wellsfargo::WellsfargoRsyncResponse = res
             .response
             .parse_struct("Wellsfargo RefundSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -1174,30 +1163,30 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
 impl
     ConnectorIntegration<
-        api::IncrementalAuthorization,
-        types::PaymentsIncrementalAuthorizationData,
-        types::PaymentsResponseData,
+        IncrementalAuthorization,
+        PaymentsIncrementalAuthorizationData,
+        PaymentsResponseData,
     > for Wellsfargo
 {
     fn get_headers(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
-    fn get_http_method(&self) -> services::Method {
-        services::Method::Patch
+    fn get_http_method(&self) -> Method {
+        Method::Patch
     }
 
     fn get_content_type(&self) -> &'static str {
@@ -1206,8 +1195,8 @@ impl
 
     fn get_url(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req.request.connector_transaction_id.clone();
         Ok(format!(
@@ -1219,8 +1208,8 @@ impl
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let amount = convert_amount(
             self.amount_converter,
@@ -1237,20 +1226,20 @@ impl
     }
     fn build_request(
         &self,
-        req: &types::PaymentsIncrementalAuthorizationRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsIncrementalAuthorizationRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Patch)
-                .url(&types::IncrementalAuthorizationType::get_url(
+            RequestBuilder::new()
+                .method(Method::Patch)
+                .url(&IncrementalAuthorizationType::get_url(
                     self, req, connectors,
                 )?)
                 .attach_default_headers()
-                .headers(types::IncrementalAuthorizationType::get_headers(
+                .headers(IncrementalAuthorizationType::get_headers(
                     self, req, connectors,
                 )?)
-                .set_body(types::IncrementalAuthorizationType::get_request_body(
+                .set_body(IncrementalAuthorizationType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -1258,14 +1247,14 @@ impl
     }
     fn handle_response(
         &self,
-        data: &types::PaymentsIncrementalAuthorizationRouterData,
+        data: &PaymentsIncrementalAuthorizationRouterData,
         event_builder: Option<&mut ConnectorEvent>,
-        res: types::Response,
+        res: Response,
     ) -> CustomResult<
-        types::RouterData<
-            api::IncrementalAuthorization,
-            types::PaymentsIncrementalAuthorizationData,
-            types::PaymentsResponseData,
+        RouterData<
+            IncrementalAuthorization,
+            PaymentsIncrementalAuthorizationData,
+            PaymentsResponseData,
         >,
         errors::ConnectorError,
     > {
@@ -1275,44 +1264,41 @@ impl
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::foreign_try_from((
-            types::ResponseRouterData {
-                response,
-                data: data.clone(),
-                http_code: res.status_code,
-            },
-            true,
-        ))
+        RouterData::try_from(ResponseRouterData {
+            response,
+            data: data.clone(),
+            http_code: res.status_code,
+        })
         .change_context(errors::ConnectorError::ResponseHandlingFailed)
     }
     fn get_error_response(
         &self,
-        res: types::Response,
+        res: Response,
         event_builder: Option<&mut ConnectorEvent>,
-    ) -> CustomResult<types::ErrorResponse, errors::ConnectorError> {
+    ) -> CustomResult<ErrorResponse, errors::ConnectorError> {
         self.build_error_response(res, event_builder)
     }
 }
 
 #[async_trait::async_trait]
-impl api::IncomingWebhook for Wellsfargo {
+impl webhooks::IncomingWebhook for Wellsfargo {
     fn get_webhook_object_reference_id(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
 
     fn get_webhook_event_type(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::IncomingWebhookEvent, errors::ConnectorError> {
-        Ok(api::IncomingWebhookEvent::EventNotSupported)
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> {
+        Ok(api_models::webhooks::IncomingWebhookEvent::EventNotSupported)
     }
 
     fn get_webhook_resource_object(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
diff --git a/crates/router/src/connector/wellsfargo/transformers.rs b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
similarity index 73%
rename from crates/router/src/connector/wellsfargo/transformers.rs
rename to crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
index 0500b098bb1..6ce9a4d7aa9 100644
--- a/crates/router/src/connector/wellsfargo/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
@@ -1,30 +1,47 @@
 use api_models::payments;
 use base64::Engine;
-use common_enums::FutureUsage;
+use common_enums::{enums, FutureUsage};
 use common_utils::{
-    pii,
+    consts, pii,
     types::{SemanticVersion, StringMajorUnit},
 };
+use hyperswitch_domain_models::{
+    payment_method_data::{
+        ApplePayWalletData, BankDebitData, GooglePayWalletData, PaymentMethodData, WalletData,
+    },
+    router_data::{
+        AdditionalPaymentMethodConnectorResponse, ApplePayPredecryptData, ConnectorAuthType,
+        ConnectorResponseData, ErrorResponse, PaymentMethodToken, RouterData,
+    },
+    router_flow_types::{
+        payments::Authorize,
+        refunds::{Execute, RSync},
+        SetupMandate,
+    },
+    router_request_types::{
+        PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSyncData,
+        ResponseId, SetupMandateRequestData,
+    },
+    router_response_types::{MandateReference, PaymentsResponseData, RefundsResponseData},
+    types::{
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        PaymentsIncrementalAuthorizationRouterData, RefundsRouterData, SetupMandateRouterData,
+    },
+};
+use hyperswitch_interfaces::{api, errors};
 use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
 use serde_json::Value;
 
 use crate::{
-    connector::utils::{
+    constants,
+    types::{RefundsResponseRouterData, ResponseRouterData},
+    unimplemented_payment_method,
+    utils::{
         self, AddressDetailsData, ApplePayDecrypt, CardData, PaymentsAuthorizeRequestData,
-        PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData, RouterData,
+        PaymentsSetupMandateRequestData, PaymentsSyncRequestData, RecurringMandateData,
+        RouterData as OtherRouterData,
     },
-    consts,
-    core::errors,
-    types::{
-        self,
-        api::{self, enums as api_enums},
-        domain,
-        storage::enums,
-        transformers::{ForeignFrom, ForeignTryFrom},
-        ApplePayPredecryptData,
-    },
-    unimplemented_payment_method,
 };
 
 #[derive(Debug, Serialize)]
@@ -51,9 +68,9 @@ pub struct WellsfargoZeroMandateRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl TryFrom<&types::SetupMandateRouterData> for WellsfargoZeroMandateRequest {
+impl TryFrom<&SetupMandateRouterData> for WellsfargoZeroMandateRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(item: &types::SetupMandateRouterData) -> Result<Self, Self::Error> {
+    fn try_from(item: &SetupMandateRouterData) -> Result<Self, Self::Error> {
         let email = item.request.get_email()?;
         let bill_to = build_bill_to(item.get_optional_billing(), email)?;
 
@@ -85,7 +102,7 @@ impl TryFrom<&types::SetupMandateRouterData> for WellsfargoZeroMandateRequest {
         };
 
         let (payment_information, solution) = match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(ccard) => {
+            PaymentMethodData::Card(ccard) => {
                 let card_issuer = ccard.get_card_issuer();
                 let card_type = match card_issuer {
                     Ok(issuer) => Some(String::from(issuer)),
@@ -105,55 +122,54 @@ impl TryFrom<&types::SetupMandateRouterData> for WellsfargoZeroMandateRequest {
                 )
             }
 
-            domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                domain::WalletData::ApplePay(apple_pay_data) => {
-                    match item.payment_method_token.clone() {
-                        Some(payment_method_token) => match payment_method_token {
-                            types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
-                                let expiration_month = decrypt_data.get_expiry_month()?;
-                                let expiration_year = decrypt_data.get_four_digit_expiry_year()?;
-                                (
-                                    PaymentInformation::ApplePay(Box::new(
-                                        ApplePayPaymentInformation {
-                                            tokenized_card: TokenizedCard {
-                                                number: decrypt_data
-                                                    .application_primary_account_number,
-                                                cryptogram: decrypt_data
-                                                    .payment_data
-                                                    .online_payment_cryptogram,
-                                                transaction_type: TransactionType::ApplePay,
-                                                expiration_year,
-                                                expiration_month,
-                                            },
+            PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                WalletData::ApplePay(apple_pay_data) => match item.payment_method_token.clone() {
+                    Some(payment_method_token) => match payment_method_token {
+                        PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                            let expiration_month = decrypt_data.get_expiry_month()?;
+                            let expiration_year = decrypt_data.get_four_digit_expiry_year()?;
+                            (
+                                PaymentInformation::ApplePay(Box::new(
+                                    ApplePayPaymentInformation {
+                                        tokenized_card: TokenizedCard {
+                                            number: decrypt_data.application_primary_account_number,
+                                            cryptogram: decrypt_data
+                                                .payment_data
+                                                .online_payment_cryptogram,
+                                            transaction_type: TransactionType::ApplePay,
+                                            expiration_year,
+                                            expiration_month,
                                         },
-                                    )),
-                                    Some(PaymentSolution::ApplePay),
-                                )
-                            }
-                            types::PaymentMethodToken::Token(_) => Err(
-                                unimplemented_payment_method!("Apple Pay", "Manual", "Wellsfargo"),
-                            )?,
-                            types::PaymentMethodToken::PazeDecrypt(_) => {
-                                Err(unimplemented_payment_method!("Paze", "Wellsfargo"))?
-                            }
-                        },
-                        None => (
-                            PaymentInformation::ApplePayToken(Box::new(
-                                ApplePayTokenPaymentInformation {
-                                    fluid_data: FluidData {
-                                        value: Secret::from(apple_pay_data.payment_data),
-                                        descriptor: Some(FLUID_DATA_DESCRIPTOR.to_string()),
-                                    },
-                                    tokenized_card: ApplePayTokenizedCard {
-                                        transaction_type: TransactionType::ApplePay,
                                     },
+                                )),
+                                Some(PaymentSolution::ApplePay),
+                            )
+                        }
+                        PaymentMethodToken::Token(_) => Err(unimplemented_payment_method!(
+                            "Apple Pay",
+                            "Manual",
+                            "Wellsfargo"
+                        ))?,
+                        PaymentMethodToken::PazeDecrypt(_) => {
+                            Err(unimplemented_payment_method!("Paze", "Wellsfargo"))?
+                        }
+                    },
+                    None => (
+                        PaymentInformation::ApplePayToken(Box::new(
+                            ApplePayTokenPaymentInformation {
+                                fluid_data: FluidData {
+                                    value: Secret::from(apple_pay_data.payment_data),
+                                    descriptor: Some(FLUID_DATA_DESCRIPTOR.to_string()),
                                 },
-                            )),
-                            Some(PaymentSolution::ApplePay),
-                        ),
-                    }
-                }
-                domain::WalletData::GooglePay(google_pay_data) => (
+                                tokenized_card: ApplePayTokenizedCard {
+                                    transaction_type: TransactionType::ApplePay,
+                                },
+                            },
+                        )),
+                        Some(PaymentSolution::ApplePay),
+                    ),
+                },
+                WalletData::GooglePay(google_pay_data) => (
                     PaymentInformation::GooglePay(Box::new(GooglePayPaymentInformation {
                         fluid_data: FluidData {
                             value: Secret::from(
@@ -165,52 +181,52 @@ impl TryFrom<&types::SetupMandateRouterData> for WellsfargoZeroMandateRequest {
                     })),
                     Some(PaymentSolution::GooglePay),
                 ),
-                domain::WalletData::AliPayQr(_)
-                | domain::WalletData::AliPayRedirect(_)
-                | domain::WalletData::AliPayHkRedirect(_)
-                | domain::WalletData::MomoRedirect(_)
-                | domain::WalletData::KakaoPayRedirect(_)
-                | domain::WalletData::GoPayRedirect(_)
-                | domain::WalletData::GcashRedirect(_)
-                | domain::WalletData::ApplePayRedirect(_)
-                | domain::WalletData::ApplePayThirdPartySdk(_)
-                | domain::WalletData::DanaRedirect {}
-                | domain::WalletData::GooglePayRedirect(_)
-                | domain::WalletData::GooglePayThirdPartySdk(_)
-                | domain::WalletData::MbWayRedirect(_)
-                | domain::WalletData::MobilePayRedirect(_)
-                | domain::WalletData::PaypalRedirect(_)
-                | domain::WalletData::PaypalSdk(_)
-                | domain::WalletData::Paze(_)
-                | domain::WalletData::SamsungPay(_)
-                | domain::WalletData::TwintRedirect {}
-                | domain::WalletData::VippsRedirect {}
-                | domain::WalletData::TouchNGoRedirect(_)
-                | domain::WalletData::WeChatPayRedirect(_)
-                | domain::WalletData::WeChatPayQr(_)
-                | domain::WalletData::CashappQr(_)
-                | domain::WalletData::SwishQr(_)
-                | domain::WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+                WalletData::AliPayQr(_)
+                | WalletData::AliPayRedirect(_)
+                | WalletData::AliPayHkRedirect(_)
+                | WalletData::MomoRedirect(_)
+                | WalletData::KakaoPayRedirect(_)
+                | WalletData::GoPayRedirect(_)
+                | WalletData::GcashRedirect(_)
+                | WalletData::ApplePayRedirect(_)
+                | WalletData::ApplePayThirdPartySdk(_)
+                | WalletData::DanaRedirect {}
+                | WalletData::GooglePayRedirect(_)
+                | WalletData::GooglePayThirdPartySdk(_)
+                | WalletData::MbWayRedirect(_)
+                | WalletData::MobilePayRedirect(_)
+                | WalletData::PaypalRedirect(_)
+                | WalletData::PaypalSdk(_)
+                | WalletData::Paze(_)
+                | WalletData::SamsungPay(_)
+                | WalletData::TwintRedirect {}
+                | WalletData::VippsRedirect {}
+                | WalletData::TouchNGoRedirect(_)
+                | WalletData::WeChatPayRedirect(_)
+                | WalletData::WeChatPayQr(_)
+                | WalletData::CashappQr(_)
+                | WalletData::SwishQr(_)
+                | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
                 ))?,
             },
-            domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::MobilePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_)
-            | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+            PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::MobilePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_)
+            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                 Err(errors::ConnectorError::NotImplemented(
                     utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
                 ))?
@@ -515,15 +531,13 @@ pub struct BillTo {
     administrative_area: Option<Secret<String>>,
     #[serde(skip_serializing_if = "Option::is_none")]
     postal_code: Option<Secret<String>>,
-    country: Option<api_enums::CountryAlpha2>,
+    country: Option<enums::CountryAlpha2>,
     email: pii::Email,
     phone_number: Option<Secret<String>>,
 }
 
-impl From<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
-    for ClientReferenceInformation
-{
-    fn from(item: &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>) -> Self {
+impl From<&WellsfargoRouterData<&PaymentsAuthorizeRouterData>> for ClientReferenceInformation {
+    fn from(item: &WellsfargoRouterData<&PaymentsAuthorizeRouterData>) -> Self {
         Self {
             code: Some(item.router_data.connector_request_reference_id.clone()),
         }
@@ -532,7 +546,7 @@ impl From<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
 
 impl
     TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
         Option<PaymentSolution>,
         Option<String>,
     )> for ProcessingInformation
@@ -540,7 +554,7 @@ impl
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, solution, network): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
             Option<PaymentSolution>,
             Option<String>,
         ),
@@ -781,13 +795,13 @@ fn get_commerce_indicator_for_external_authentication(
 
 impl
     From<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
         Option<BillTo>,
     )> for OrderInformationWithBill
 {
     fn from(
         (item, bill_to): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
             Option<BillTo>,
         ),
     ) -> Self {
@@ -850,35 +864,32 @@ fn build_bill_to(
     ad
 }
 
-impl ForeignFrom<Value> for Vec<MerchantDefinedInformation> {
-    fn foreign_from(metadata: Value) -> Self {
-        let hashmap: std::collections::BTreeMap<String, Value> =
-            serde_json::from_str(&metadata.to_string())
-                .unwrap_or(std::collections::BTreeMap::new());
-        let mut vector: Self = Self::new();
-        let mut iter = 1;
-        for (key, value) in hashmap {
-            vector.push(MerchantDefinedInformation {
-                key: iter,
-                value: format!("{key}={value}"),
-            });
-            iter += 1;
-        }
-        vector
+fn convert_metadata_to_merchant_defined_info(metadata: Value) -> Vec<MerchantDefinedInformation> {
+    let hashmap: std::collections::BTreeMap<String, Value> =
+        serde_json::from_str(&metadata.to_string()).unwrap_or(std::collections::BTreeMap::new());
+    let mut vector = Vec::new();
+    let mut iter = 1;
+    for (key, value) in hashmap {
+        vector.push(MerchantDefinedInformation {
+            key: iter,
+            value: format!("{key}={value}"),
+        });
+        iter += 1;
     }
+    vector
 }
 
 impl
     TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::Card,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+        hyperswitch_domain_models::payment_method_data::Card,
     )> for WellsfargoPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, ccard): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::Card,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+            hyperswitch_domain_models::payment_method_data::Card,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -908,7 +919,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         let consumer_authentication_information = item
             .router_data
@@ -950,17 +961,17 @@ impl
 
 impl
     TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
         Box<ApplePayPredecryptData>,
-        domain::ApplePayWalletData,
+        ApplePayWalletData,
     )> for WellsfargoPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, apple_pay_data, apple_pay_wallet_data): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
             Box<ApplePayPredecryptData>,
-            domain::ApplePayWalletData,
+            ApplePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -989,7 +1000,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         let ucaf_collection_indicator = match apple_pay_wallet_data
             .payment_method
             .network
@@ -1021,15 +1032,15 @@ impl
 
 impl
     TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::GooglePayWalletData,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+        GooglePayWalletData,
     )> for WellsfargoPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, google_pay_data): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::GooglePayWalletData,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+            GooglePayWalletData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
@@ -1053,7 +1064,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
 
         Ok(Self {
             processing_information,
@@ -1084,22 +1095,22 @@ impl TryFrom<Option<common_enums::BankType>> for AccountType {
 
 impl
     TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-        domain::BankDebitData,
+        &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+        BankDebitData,
     )> for WellsfargoPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (item, bank_debit_data): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-            domain::BankDebitData,
+            &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
+            BankDebitData,
         ),
     ) -> Result<Self, Self::Error> {
         let email = item.router_data.request.get_email()?;
         let bill_to = build_bill_to(item.router_data.get_optional_billing(), email)?;
         let order_information = OrderInformationWithBill::from((item, Some(bill_to)));
         let payment_information = match bank_debit_data {
-            domain::BankDebitData::AchBankDebit {
+            BankDebitData::AchBankDebit {
                 account_number,
                 routing_number,
                 bank_type,
@@ -1115,13 +1126,11 @@ impl
                     },
                 },
             ))),
-            domain::BankDebitData::SepaBankDebit { .. }
-            | domain::BankDebitData::BacsBankDebit { .. }
-            | domain::BankDebitData::BecsBankDebit { .. } => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
-                ))
-            }
+            BankDebitData::SepaBankDebit { .. }
+            | BankDebitData::BacsBankDebit { .. }
+            | BankDebitData::BecsBankDebit { .. } => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
+            )),
         }?;
         let processing_information =
             ProcessingInformation::try_from((item, Some(PaymentSolution::GooglePay), None))?;
@@ -1137,33 +1146,31 @@ impl
     }
 }
 
-impl TryFrom<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
-    for WellsfargoPaymentsRequest
-{
+impl TryFrom<&WellsfargoRouterData<&PaymentsAuthorizeRouterData>> for WellsfargoPaymentsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
+        item: &WellsfargoRouterData<&PaymentsAuthorizeRouterData>,
     ) -> Result<Self, Self::Error> {
         match item.router_data.request.connector_mandate_id() {
             Some(connector_mandate_id) => Self::try_from((item, connector_mandate_id)),
             None => {
                 match item.router_data.request.payment_method_data.clone() {
-                    domain::PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
-                    domain::PaymentMethodData::Wallet(wallet_data) => match wallet_data {
-                        domain::WalletData::ApplePay(apple_pay_data) => {
+                    PaymentMethodData::Card(ccard) => Self::try_from((item, ccard)),
+                    PaymentMethodData::Wallet(wallet_data) => match wallet_data {
+                        WalletData::ApplePay(apple_pay_data) => {
                             match item.router_data.payment_method_token.clone() {
                                 Some(payment_method_token) => match payment_method_token {
-                                    types::PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
+                                    PaymentMethodToken::ApplePayDecrypt(decrypt_data) => {
                                         Self::try_from((item, decrypt_data, apple_pay_data))
                                     }
-                                    types::PaymentMethodToken::Token(_) => {
+                                    PaymentMethodToken::Token(_) => {
                                         Err(unimplemented_payment_method!(
                                             "Apple Pay",
                                             "Manual",
                                             "Wellsfargo"
                                         ))?
                                     }
-                                    types::PaymentMethodToken::PazeDecrypt(_) => {
+                                    PaymentMethodToken::PazeDecrypt(_) => {
                                         Err(unimplemented_payment_method!("Paze", "Wellsfargo"))?
                                     }
                                 },
@@ -1196,9 +1203,7 @@ impl TryFrom<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
                                     );
                                     let merchant_defined_information =
                                         item.router_data.request.metadata.clone().map(|metadata| {
-                                            Vec::<MerchantDefinedInformation>::foreign_from(
-                                                metadata,
-                                            )
+                                            convert_metadata_to_merchant_defined_info(metadata)
                                         });
                                     let ucaf_collection_indicator = match apple_pay_data
                                         .payment_method
@@ -1231,44 +1236,42 @@ impl TryFrom<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
                                 }
                             }
                         }
-                        domain::WalletData::GooglePay(google_pay_data) => {
+                        WalletData::GooglePay(google_pay_data) => {
                             Self::try_from((item, google_pay_data))
                         }
-                        domain::WalletData::AliPayQr(_)
-                        | domain::WalletData::AliPayRedirect(_)
-                        | domain::WalletData::AliPayHkRedirect(_)
-                        | domain::WalletData::MomoRedirect(_)
-                        | domain::WalletData::KakaoPayRedirect(_)
-                        | domain::WalletData::GoPayRedirect(_)
-                        | domain::WalletData::GcashRedirect(_)
-                        | domain::WalletData::ApplePayRedirect(_)
-                        | domain::WalletData::ApplePayThirdPartySdk(_)
-                        | domain::WalletData::DanaRedirect {}
-                        | domain::WalletData::GooglePayRedirect(_)
-                        | domain::WalletData::GooglePayThirdPartySdk(_)
-                        | domain::WalletData::MbWayRedirect(_)
-                        | domain::WalletData::MobilePayRedirect(_)
-                        | domain::WalletData::PaypalRedirect(_)
-                        | domain::WalletData::PaypalSdk(_)
-                        | domain::WalletData::Paze(_)
-                        | domain::WalletData::SamsungPay(_)
-                        | domain::WalletData::TwintRedirect {}
-                        | domain::WalletData::VippsRedirect {}
-                        | domain::WalletData::TouchNGoRedirect(_)
-                        | domain::WalletData::WeChatPayRedirect(_)
-                        | domain::WalletData::WeChatPayQr(_)
-                        | domain::WalletData::CashappQr(_)
-                        | domain::WalletData::SwishQr(_)
-                        | domain::WalletData::Mifinity(_) => {
-                            Err(errors::ConnectorError::NotImplemented(
-                                utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
-                            )
-                            .into())
-                        }
+                        WalletData::AliPayQr(_)
+                        | WalletData::AliPayRedirect(_)
+                        | WalletData::AliPayHkRedirect(_)
+                        | WalletData::MomoRedirect(_)
+                        | WalletData::KakaoPayRedirect(_)
+                        | WalletData::GoPayRedirect(_)
+                        | WalletData::GcashRedirect(_)
+                        | WalletData::ApplePayRedirect(_)
+                        | WalletData::ApplePayThirdPartySdk(_)
+                        | WalletData::DanaRedirect {}
+                        | WalletData::GooglePayRedirect(_)
+                        | WalletData::GooglePayThirdPartySdk(_)
+                        | WalletData::MbWayRedirect(_)
+                        | WalletData::MobilePayRedirect(_)
+                        | WalletData::PaypalRedirect(_)
+                        | WalletData::PaypalSdk(_)
+                        | WalletData::Paze(_)
+                        | WalletData::SamsungPay(_)
+                        | WalletData::TwintRedirect {}
+                        | WalletData::VippsRedirect {}
+                        | WalletData::TouchNGoRedirect(_)
+                        | WalletData::WeChatPayRedirect(_)
+                        | WalletData::WeChatPayQr(_)
+                        | WalletData::CashappQr(_)
+                        | WalletData::SwishQr(_)
+                        | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+                            utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
+                        )
+                        .into()),
                     },
                     // If connector_mandate_id is present MandatePayment will be the PMD, the case will be handled in the first `if` clause.
                     // This is a fallback implementation in the event of catastrophe.
-                    domain::PaymentMethodData::MandatePayment => {
+                    PaymentMethodData::MandatePayment => {
                         let connector_mandate_id =
                             item.router_data.request.connector_mandate_id().ok_or(
                                 errors::ConnectorError::MissingRequiredField {
@@ -1277,24 +1280,22 @@ impl TryFrom<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
                             )?;
                         Self::try_from((item, connector_mandate_id))
                     }
-                    domain::PaymentMethodData::BankDebit(bank_debit) => {
-                        Self::try_from((item, bank_debit))
-                    }
-                    domain::PaymentMethodData::CardRedirect(_)
-                    | domain::PaymentMethodData::PayLater(_)
-                    | domain::PaymentMethodData::BankRedirect(_)
-                    | domain::PaymentMethodData::BankTransfer(_)
-                    | domain::PaymentMethodData::Crypto(_)
-                    | domain::PaymentMethodData::Reward
-                    | domain::PaymentMethodData::RealTimePayment(_)
-                    | domain::PaymentMethodData::MobilePayment(_)
-                    | domain::PaymentMethodData::Upi(_)
-                    | domain::PaymentMethodData::Voucher(_)
-                    | domain::PaymentMethodData::GiftCard(_)
-                    | domain::PaymentMethodData::OpenBanking(_)
-                    | domain::PaymentMethodData::CardToken(_)
-                    | domain::PaymentMethodData::NetworkToken(_)
-                    | domain::PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
+                    PaymentMethodData::BankDebit(bank_debit) => Self::try_from((item, bank_debit)),
+                    PaymentMethodData::CardRedirect(_)
+                    | PaymentMethodData::PayLater(_)
+                    | PaymentMethodData::BankRedirect(_)
+                    | PaymentMethodData::BankTransfer(_)
+                    | PaymentMethodData::Crypto(_)
+                    | PaymentMethodData::Reward
+                    | PaymentMethodData::RealTimePayment(_)
+                    | PaymentMethodData::MobilePayment(_)
+                    | PaymentMethodData::Upi(_)
+                    | PaymentMethodData::Voucher(_)
+                    | PaymentMethodData::GiftCard(_)
+                    | PaymentMethodData::OpenBanking(_)
+                    | PaymentMethodData::CardToken(_)
+                    | PaymentMethodData::NetworkToken(_)
+                    | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
                         Err(errors::ConnectorError::NotImplemented(
                             utils::get_unimplemented_payment_method_error_message("Wellsfargo"),
                         )
@@ -1306,18 +1307,12 @@ impl TryFrom<&WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>>
     }
 }
 
-impl
-    TryFrom<(
-        &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-        String,
-    )> for WellsfargoPaymentsRequest
+impl TryFrom<(&WellsfargoRouterData<&PaymentsAuthorizeRouterData>, String)>
+    for WellsfargoPaymentsRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (item, connector_mandate_id): (
-            &WellsfargoRouterData<&types::PaymentsAuthorizeRouterData>,
-            String,
-        ),
+        (item, connector_mandate_id): (&WellsfargoRouterData<&PaymentsAuthorizeRouterData>, String),
     ) -> Result<Self, Self::Error> {
         let processing_information = ProcessingInformation::try_from((item, None, None))?;
         let payment_instrument = WellsfargoPaymentInstrument {
@@ -1338,7 +1333,7 @@ impl
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             processing_information,
             payment_information,
@@ -1367,19 +1362,19 @@ pub struct WellsfargoPaymentsIncrementalAuthorizationRequest {
     order_information: OrderInformationIncrementalAuthorization,
 }
 
-impl TryFrom<&WellsfargoRouterData<&types::PaymentsCaptureRouterData>>
+impl TryFrom<&WellsfargoRouterData<&PaymentsCaptureRouterData>>
     for WellsfargoPaymentsCaptureRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &WellsfargoRouterData<&types::PaymentsCaptureRouterData>,
+        item: &WellsfargoRouterData<&PaymentsCaptureRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = item
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             processing_information: ProcessingInformation {
                 capture_options: Some(CaptureOptions {
@@ -1408,12 +1403,12 @@ impl TryFrom<&WellsfargoRouterData<&types::PaymentsCaptureRouterData>>
     }
 }
 
-impl TryFrom<&WellsfargoRouterData<&types::PaymentsIncrementalAuthorizationRouterData>>
+impl TryFrom<&WellsfargoRouterData<&PaymentsIncrementalAuthorizationRouterData>>
     for WellsfargoPaymentsIncrementalAuthorizationRequest
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: &WellsfargoRouterData<&types::PaymentsIncrementalAuthorizationRouterData>,
+        item: &WellsfargoRouterData<&PaymentsIncrementalAuthorizationRouterData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             processing_information: ProcessingInformation {
@@ -1463,17 +1458,17 @@ pub struct ReversalInformation {
     reason: String,
 }
 
-impl TryFrom<&WellsfargoRouterData<&types::PaymentsCancelRouterData>> for WellsfargoVoidRequest {
+impl TryFrom<&WellsfargoRouterData<&PaymentsCancelRouterData>> for WellsfargoVoidRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: &WellsfargoRouterData<&types::PaymentsCancelRouterData>,
+        value: &WellsfargoRouterData<&PaymentsCancelRouterData>,
     ) -> Result<Self, Self::Error> {
         let merchant_defined_information = value
             .router_data
             .request
             .metadata
             .clone()
-            .map(Vec::<MerchantDefinedInformation>::foreign_from);
+            .map(convert_metadata_to_merchant_defined_info);
         Ok(Self {
             client_reference_information: ClientReferenceInformation {
                 code: Some(value.router_data.connector_request_reference_id.clone()),
@@ -1507,10 +1502,10 @@ pub struct WellsfargoAuthType {
     pub(super) api_secret: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for WellsfargoAuthType {
+impl TryFrom<&ConnectorAuthType> for WellsfargoAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
-        if let types::ConnectorAuthType::SignatureKey {
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+        if let ConnectorAuthType::SignatureKey {
             api_key,
             key1,
             api_secret,
@@ -1560,43 +1555,42 @@ pub enum WellsfargoIncrementalAuthorizationStatus {
     AuthorizedPendingReview,
 }
 
-impl ForeignFrom<(WellsfargoPaymentStatus, bool)> for enums::AttemptStatus {
-    fn foreign_from((status, capture): (WellsfargoPaymentStatus, bool)) -> Self {
-        match status {
-            WellsfargoPaymentStatus::Authorized
-            | WellsfargoPaymentStatus::AuthorizedPendingReview => {
-                if capture {
-                    // Because Wellsfargo will return Payment Status as Authorized even in AutoCapture Payment
-                    Self::Charged
-                } else {
-                    Self::Authorized
-                }
-            }
-            WellsfargoPaymentStatus::Pending => {
-                if capture {
-                    Self::Charged
-                } else {
-                    Self::Pending
-                }
+fn map_attempt_status(status: WellsfargoPaymentStatus, capture: bool) -> enums::AttemptStatus {
+    match status {
+        WellsfargoPaymentStatus::Authorized | WellsfargoPaymentStatus::AuthorizedPendingReview => {
+            if capture {
+                // Because Wellsfargo will return Payment Status as Authorized even in AutoCapture Payment
+                enums::AttemptStatus::Charged
+            } else {
+                enums::AttemptStatus::Authorized
             }
-            WellsfargoPaymentStatus::Succeeded | WellsfargoPaymentStatus::Transmitted => {
-                Self::Charged
+        }
+        WellsfargoPaymentStatus::Pending => {
+            if capture {
+                enums::AttemptStatus::Charged
+            } else {
+                enums::AttemptStatus::Pending
             }
-            WellsfargoPaymentStatus::Voided
-            | WellsfargoPaymentStatus::Reversed
-            | WellsfargoPaymentStatus::Cancelled => Self::Voided,
-            WellsfargoPaymentStatus::Failed
-            | WellsfargoPaymentStatus::Declined
-            | WellsfargoPaymentStatus::AuthorizedRiskDeclined
-            | WellsfargoPaymentStatus::Rejected
-            | WellsfargoPaymentStatus::InvalidRequest
-            | WellsfargoPaymentStatus::ServerError => Self::Failure,
-            WellsfargoPaymentStatus::PendingAuthentication => Self::AuthenticationPending,
-            WellsfargoPaymentStatus::PendingReview
-            | WellsfargoPaymentStatus::StatusNotReceived
-            | WellsfargoPaymentStatus::Challenge
-            | WellsfargoPaymentStatus::Accepted => Self::Pending,
         }
+        WellsfargoPaymentStatus::Succeeded | WellsfargoPaymentStatus::Transmitted => {
+            enums::AttemptStatus::Charged
+        }
+        WellsfargoPaymentStatus::Voided
+        | WellsfargoPaymentStatus::Reversed
+        | WellsfargoPaymentStatus::Cancelled => enums::AttemptStatus::Voided,
+        WellsfargoPaymentStatus::Failed
+        | WellsfargoPaymentStatus::Declined
+        | WellsfargoPaymentStatus::AuthorizedRiskDeclined
+        | WellsfargoPaymentStatus::Rejected
+        | WellsfargoPaymentStatus::InvalidRequest
+        | WellsfargoPaymentStatus::ServerError => enums::AttemptStatus::Failure,
+        WellsfargoPaymentStatus::PendingAuthentication => {
+            enums::AttemptStatus::AuthenticationPending
+        }
+        WellsfargoPaymentStatus::PendingReview
+        | WellsfargoPaymentStatus::StatusNotReceived
+        | WellsfargoPaymentStatus::Challenge
+        | WellsfargoPaymentStatus::Accepted => enums::AttemptStatus::Pending,
     }
 }
 
@@ -1688,84 +1682,17 @@ pub struct WellsfargoErrorInformation {
     details: Option<Vec<Details>>,
 }
 
-impl<F, T>
-    ForeignFrom<(
-        &WellsfargoErrorInformationResponse,
-        types::ResponseRouterData<F, WellsfargoPaymentsResponse, T, types::PaymentsResponseData>,
-        Option<enums::AttemptStatus>,
-    )> for types::RouterData<F, T, types::PaymentsResponseData>
-{
-    fn foreign_from(
-        (error_response, item, transaction_status): (
-            &WellsfargoErrorInformationResponse,
-            types::ResponseRouterData<
-                F,
-                WellsfargoPaymentsResponse,
-                T,
-                types::PaymentsResponseData,
-            >,
-            Option<enums::AttemptStatus>,
-        ),
-    ) -> Self {
-        let detailed_error_info =
-            error_response
-                .error_information
-                .details
-                .to_owned()
-                .map(|details| {
-                    details
-                        .iter()
-                        .map(|details| format!("{} : {}", details.field, details.reason))
-                        .collect::<Vec<_>>()
-                        .join(", ")
-                });
-
-        let reason = get_error_reason(
-            error_response.error_information.message.clone(),
-            detailed_error_info,
-            None,
-        );
-        let response = Err(types::ErrorResponse {
-            code: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_response
-                .error_information
-                .reason
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code: item.http_code,
-            attempt_status: None,
-            connector_transaction_id: Some(error_response.id.clone()),
-        });
-        match transaction_status {
-            Some(status) => Self {
-                response,
-                status,
-                ..item.data
-            },
-            None => Self {
-                response,
-                ..item.data
-            },
-        }
-    }
-}
-
 fn get_error_response_if_failure(
     (info_response, status, http_code): (&WellsfargoPaymentsResponse, enums::AttemptStatus, u16),
-) -> Option<types::ErrorResponse> {
+) -> Option<ErrorResponse> {
     if utils::is_payment_failure(status) {
-        Some(types::ErrorResponse::foreign_from((
+        Some(get_error_response(
             &info_response.error_information,
             &info_response.risk_information,
             Some(status),
             http_code,
             info_response.id.clone(),
-        )))
+        ))
     } else {
         None
     }
@@ -1773,7 +1700,7 @@ fn get_error_response_if_failure(
 
 fn get_payment_response(
     (info_response, status, http_code): (&WellsfargoPaymentsResponse, enums::AttemptStatus, u16),
-) -> Result<types::PaymentsResponseData, types::ErrorResponse> {
+) -> Result<PaymentsResponseData, ErrorResponse> {
     let error_response = get_error_response_if_failure((info_response, status, http_code));
     match error_response {
         Some(error) => Err(error),
@@ -1784,7 +1711,7 @@ fn get_payment_response(
                 info_response
                     .token_information
                     .clone()
-                    .map(|token_info| types::MandateReference {
+                    .map(|token_info| MandateReference {
                         connector_mandate_id: token_info
                             .payment_instrument
                             .map(|payment_instrument| payment_instrument.id.expose()),
@@ -1793,8 +1720,8 @@ fn get_payment_response(
                         connector_mandate_request_reference_id: None,
                     });
 
-            Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(info_response.id.clone()),
+            Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(info_response.id.clone()),
                 redirection_data: Box::new(None),
                 mandate_reference: Box::new(mandate_reference),
                 connector_metadata: None,
@@ -1817,38 +1744,37 @@ fn get_payment_response(
 
 impl
     TryFrom<
-        types::ResponseRouterData<
-            api::Authorize,
+        ResponseRouterData<
+            Authorize,
             WellsfargoPaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
-    >
-    for types::RouterData<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
+    > for RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            api::Authorize,
+        item: ResponseRouterData<
+            Authorize,
             WellsfargoPaymentsResponse,
-            types::PaymentsAuthorizeData,
-            types::PaymentsResponseData,
+            PaymentsAuthorizeData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(WellsfargoPaymentStatus::StatusNotReceived),
             item.data.request.is_auto_capture()?,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         let connector_response = item
             .response
             .processor_information
             .as_ref()
-            .map(types::AdditionalPaymentMethodConnectorResponse::from)
-            .map(types::ConnectorResponseData::with_additional_payment_method_data);
+            .map(AdditionalPaymentMethodConnectorResponse::from)
+            .map(ConnectorResponseData::with_additional_payment_method_data);
 
         Ok(Self {
             status,
@@ -1859,7 +1785,7 @@ impl
     }
 }
 
-impl From<&ClientProcessorInformation> for types::AdditionalPaymentMethodConnectorResponse {
+impl From<&ClientProcessorInformation> for AdditionalPaymentMethodConnectorResponse {
     fn from(processor_information: &ClientProcessorInformation) -> Self {
         let payment_checks = Some(
             serde_json::json!({"avs_response": processor_information.avs, "card_verification": processor_information.card_verification}),
@@ -1874,30 +1800,30 @@ impl From<&ClientProcessorInformation> for types::AdditionalPaymentMethodConnect
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             WellsfargoPaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsCaptureData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsCaptureData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             WellsfargoPaymentsResponse,
-            types::PaymentsCaptureData,
-            types::PaymentsResponseData,
+            PaymentsCaptureData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(WellsfargoPaymentStatus::StatusNotReceived),
             true,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         Ok(Self {
             status,
@@ -1909,30 +1835,25 @@ impl<F>
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
-            F,
-            WellsfargoPaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
-        >,
-    > for types::RouterData<F, types::PaymentsCancelData, types::PaymentsResponseData>
+        ResponseRouterData<F, WellsfargoPaymentsResponse, PaymentsCancelData, PaymentsResponseData>,
+    > for RouterData<F, PaymentsCancelData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             WellsfargoPaymentsResponse,
-            types::PaymentsCancelData,
-            types::PaymentsResponseData,
+            PaymentsCancelData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
-        let status = enums::AttemptStatus::foreign_from((
+        let status = map_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(WellsfargoPaymentStatus::StatusNotReceived),
             false,
-        ));
+        );
         let response = get_payment_response((&item.response, status, item.http_code));
         Ok(Self {
             status,
@@ -1945,33 +1866,28 @@ impl<F>
 // zero dollar response
 impl
     TryFrom<
-        types::ResponseRouterData<
-            api::SetupMandate,
+        ResponseRouterData<
+            SetupMandate,
             WellsfargoPaymentsResponse,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
+            SetupMandateRequestData,
+            PaymentsResponseData,
         >,
-    >
-    for types::RouterData<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    >
+    > for RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            api::SetupMandate,
+        item: ResponseRouterData<
+            SetupMandate,
             WellsfargoPaymentsResponse,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
+            SetupMandateRequestData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         let mandate_reference =
             item.response
                 .token_information
                 .clone()
-                .map(|token_info| types::MandateReference {
+                .map(|token_info| MandateReference {
                     connector_mandate_id: token_info
                         .payment_instrument
                         .map(|payment_instrument| payment_instrument.id.expose()),
@@ -1979,13 +1895,13 @@ impl
                     mandate_metadata: None,
                     connector_mandate_request_reference_id: None,
                 });
-        let mut mandate_status = enums::AttemptStatus::foreign_from((
+        let mut mandate_status = map_attempt_status(
             item.response
                 .status
                 .clone()
                 .unwrap_or(WellsfargoPaymentStatus::StatusNotReceived),
             false,
-        ));
+        );
         if matches!(mandate_status, enums::AttemptStatus::Authorized) {
             //In case of zero auth mandates we want to make the payment reach the terminal status so we are converting the authorized status to charged as well.
             mandate_status = enums::AttemptStatus::Charged
@@ -1997,17 +1913,15 @@ impl
             .response
             .processor_information
             .as_ref()
-            .map(types::AdditionalPaymentMethodConnectorResponse::from)
-            .map(types::ConnectorResponseData::with_additional_payment_method_data);
+            .map(AdditionalPaymentMethodConnectorResponse::from)
+            .map(ConnectorResponseData::with_additional_payment_method_data);
 
         Ok(Self {
             status: mandate_status,
             response: match error_response {
                 Some(error) => Err(error),
-                None => Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::ConnectorTransactionId(
-                        item.response.id.clone(),
-                    ),
+                None => Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                     redirection_data: Box::new(None),
                     mandate_reference: Box::new(mandate_reference),
                     connector_metadata: None,
@@ -2037,47 +1951,38 @@ impl
 }
 
 impl<F, T>
-    ForeignTryFrom<(
-        types::ResponseRouterData<
+    TryFrom<
+        ResponseRouterData<
             F,
             WellsfargoPaymentsIncrementalAuthorizationResponse,
             T,
-            types::PaymentsResponseData,
+            PaymentsResponseData,
         >,
-        bool,
-    )> for types::RouterData<F, T, types::PaymentsResponseData>
+    > for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn foreign_try_from(
-        data: (
-            types::ResponseRouterData<
-                F,
-                WellsfargoPaymentsIncrementalAuthorizationResponse,
-                T,
-                types::PaymentsResponseData,
-            >,
-            bool,
-        ),
+    fn try_from(
+        item: ResponseRouterData<
+            F,
+            WellsfargoPaymentsIncrementalAuthorizationResponse,
+            T,
+            PaymentsResponseData,
+        >,
     ) -> Result<Self, Self::Error> {
-        let item = data.0;
         Ok(Self {
             response: match item.response.error_information {
-                Some(error) => Ok(
-                    types::PaymentsResponseData::IncrementalAuthorizationResponse {
-                        status: common_enums::AuthorizationStatus::Failure,
-                        error_code: error.reason,
-                        error_message: error.message,
-                        connector_authorization_id: None,
-                    },
-                ),
-                _ => Ok(
-                    types::PaymentsResponseData::IncrementalAuthorizationResponse {
-                        status: item.response.status.into(),
-                        error_code: None,
-                        error_message: None,
-                        connector_authorization_id: None,
-                    },
-                ),
+                Some(error) => Ok(PaymentsResponseData::IncrementalAuthorizationResponse {
+                    status: common_enums::AuthorizationStatus::Failure,
+                    error_code: error.reason,
+                    error_message: error.message,
+                    connector_authorization_id: None,
+                }),
+                _ => Ok(PaymentsResponseData::IncrementalAuthorizationResponse {
+                    status: item.response.status.into(),
+                    error_code: None,
+                    error_message: None,
+                    connector_authorization_id: None,
+                }),
             },
             ..item.data
         })
@@ -2101,49 +2006,46 @@ pub struct ApplicationInformation {
 
 impl<F>
     TryFrom<
-        types::ResponseRouterData<
+        ResponseRouterData<
             F,
             WellsfargoTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
-    > for types::RouterData<F, types::PaymentsSyncData, types::PaymentsResponseData>
+    > for RouterData<F, PaymentsSyncData, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
+        item: ResponseRouterData<
             F,
             WellsfargoTransactionResponse,
-            types::PaymentsSyncData,
-            types::PaymentsResponseData,
+            PaymentsSyncData,
+            PaymentsResponseData,
         >,
     ) -> Result<Self, Self::Error> {
         match item.response.application_information.status {
             Some(status) => {
-                let status = enums::AttemptStatus::foreign_from((
-                    status,
-                    item.data.request.is_auto_capture()?,
-                ));
+                let status = map_attempt_status(status, item.data.request.is_auto_capture()?);
                 let incremental_authorization_allowed =
                     Some(status == enums::AttemptStatus::Authorized);
                 let risk_info: Option<ClientRiskInformation> = None;
                 if utils::is_payment_failure(status) {
                     Ok(Self {
-                        response: Err(types::ErrorResponse::foreign_from((
+                        response: Err(get_error_response(
                             &item.response.error_information,
                             &risk_info,
                             Some(status),
                             item.http_code,
                             item.response.id.clone(),
-                        ))),
+                        )),
                         status: enums::AttemptStatus::Failure,
                         ..item.data
                     })
                 } else {
                     Ok(Self {
                         status,
-                        response: Ok(types::PaymentsResponseData::TransactionResponse {
-                            resource_id: types::ResponseId::ConnectorTransactionId(
+                        response: Ok(PaymentsResponseData::TransactionResponse {
+                            resource_id: ResponseId::ConnectorTransactionId(
                                 item.response.id.clone(),
                             ),
                             redirection_data: Box::new(None),
@@ -2164,10 +2066,8 @@ impl<F>
             }
             None => Ok(Self {
                 status: item.data.status,
-                response: Ok(types::PaymentsResponseData::TransactionResponse {
-                    resource_id: types::ResponseId::ConnectorTransactionId(
-                        item.response.id.clone(),
-                    ),
+                response: Ok(PaymentsResponseData::TransactionResponse {
+                    resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                     redirection_data: Box::new(None),
                     mandate_reference: Box::new(None),
                     connector_metadata: None,
@@ -2189,11 +2089,9 @@ pub struct WellsfargoRefundRequest {
     client_reference_information: ClientReferenceInformation,
 }
 
-impl<F> TryFrom<&WellsfargoRouterData<&types::RefundsRouterData<F>>> for WellsfargoRefundRequest {
+impl<F> TryFrom<&WellsfargoRouterData<&RefundsRouterData<F>>> for WellsfargoRefundRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(
-        item: &WellsfargoRouterData<&types::RefundsRouterData<F>>,
-    ) -> Result<Self, Self::Error> {
+    fn try_from(item: &WellsfargoRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> {
         Ok(Self {
             order_information: OrderInformation {
                 amount_details: Amount {
@@ -2241,24 +2139,24 @@ pub struct WellsfargoRefundResponse {
     error_information: Option<WellsfargoErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, WellsfargoRefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<RefundsResponseRouterData<Execute, WellsfargoRefundResponse>>
+    for RefundsRouterData<Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, WellsfargoRefundResponse>,
+        item: RefundsResponseRouterData<Execute, WellsfargoRefundResponse>,
     ) -> Result<Self, Self::Error> {
         let refund_status = enums::RefundStatus::from(item.response.status.clone());
         let response = if utils::is_refund_failure(refund_status) {
-            Err(types::ErrorResponse::foreign_from((
+            Err(get_error_response(
                 &item.response.error_information,
                 &None,
                 None,
                 item.http_code,
                 item.response.id.clone(),
-            )))
+            ))
         } else {
-            Ok(types::RefundsResponseData {
+            Ok(RefundsResponseData {
                 connector_refund_id: item.response.id,
                 refund_status: enums::RefundStatus::from(item.response.status),
             })
@@ -2285,12 +2183,12 @@ pub struct WellsfargoRsyncResponse {
     error_information: Option<WellsfargoErrorInformation>,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, WellsfargoRsyncResponse>>
-    for types::RefundsRouterData<api::RSync>
+impl TryFrom<RefundsResponseRouterData<RSync, WellsfargoRsyncResponse>>
+    for RefundsRouterData<RSync>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, WellsfargoRsyncResponse>,
+        item: RefundsResponseRouterData<RSync, WellsfargoRsyncResponse>,
     ) -> Result<Self, Self::Error> {
         let response = match item
             .response
@@ -2301,35 +2199,35 @@ impl TryFrom<types::RefundsResponseRouterData<api::RSync, WellsfargoRsyncRespons
                 let refund_status = enums::RefundStatus::from(status.clone());
                 if utils::is_refund_failure(refund_status) {
                     if status == WellsfargoRefundStatus::Voided {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &Some(WellsfargoErrorInformation {
-                                message: Some(consts::REFUND_VOIDED.to_string()),
-                                reason: Some(consts::REFUND_VOIDED.to_string()),
+                                message: Some(constants::REFUND_VOIDED.to_string()),
+                                reason: Some(constants::REFUND_VOIDED.to_string()),
                                 details: None,
                             }),
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     } else {
-                        Err(types::ErrorResponse::foreign_from((
+                        Err(get_error_response(
                             &item.response.error_information,
                             &None,
                             None,
                             item.http_code,
                             item.response.id.clone(),
-                        )))
+                        ))
                     }
                 } else {
-                    Ok(types::RefundsResponseData {
+                    Ok(RefundsResponseData {
                         connector_refund_id: item.response.id,
                         refund_status,
                     })
                 }
             }
 
-            None => Ok(types::RefundsResponseData {
+            None => Ok(RefundsResponseData {
                 connector_refund_id: item.response.id.clone(),
                 refund_status: match item.data.response {
                     Ok(response) => response.refund_status,
@@ -2418,73 +2316,60 @@ pub struct AuthenticationErrorInformation {
     pub rmsg: String,
 }
 
-impl
-    ForeignFrom<(
-        &Option<WellsfargoErrorInformation>,
-        &Option<ClientRiskInformation>,
-        Option<enums::AttemptStatus>,
-        u16,
-        String,
-    )> for types::ErrorResponse
-{
-    fn foreign_from(
-        (error_data, risk_information, attempt_status, status_code, transaction_id): (
-            &Option<WellsfargoErrorInformation>,
-            &Option<ClientRiskInformation>,
-            Option<enums::AttemptStatus>,
-            u16,
-            String,
-        ),
-    ) -> Self {
-        let avs_message = risk_information
-            .clone()
-            .map(|client_risk_information| {
-                client_risk_information.rules.map(|rules| {
-                    rules
-                        .iter()
-                        .map(|risk_info| {
-                            risk_info.name.clone().map_or("".to_string(), |name| {
-                                format!(" , {}", name.clone().expose())
-                            })
+pub fn get_error_response(
+    error_data: &Option<WellsfargoErrorInformation>,
+    risk_information: &Option<ClientRiskInformation>,
+    attempt_status: Option<enums::AttemptStatus>,
+    status_code: u16,
+    transaction_id: String,
+) -> ErrorResponse {
+    let avs_message = risk_information
+        .clone()
+        .map(|client_risk_information| {
+            client_risk_information.rules.map(|rules| {
+                rules
+                    .iter()
+                    .map(|risk_info| {
+                        risk_info.name.clone().map_or("".to_string(), |name| {
+                            format!(" , {}", name.clone().expose())
                         })
-                        .collect::<Vec<String>>()
-                        .join("")
-                })
+                    })
+                    .collect::<Vec<String>>()
+                    .join("")
             })
-            .unwrap_or(Some("".to_string()));
+        })
+        .unwrap_or(Some("".to_string()));
+
+    let detailed_error_info = error_data
+        .clone()
+        .map(|error_data| match error_data.details {
+            Some(details) => details
+                .iter()
+                .map(|details| format!("{} : {}", details.field, details.reason))
+                .collect::<Vec<_>>()
+                .join(", "),
+            None => "".to_string(),
+        });
 
-        let detailed_error_info = error_data
+    let reason = get_error_reason(
+        error_data.clone().and_then(|error_info| error_info.message),
+        detailed_error_info,
+        avs_message,
+    );
+    let error_message = error_data.clone().and_then(|error_info| error_info.reason);
+    ErrorResponse {
+        code: error_message
             .clone()
-            .map(|error_data| match error_data.details {
-                Some(details) => details
-                    .iter()
-                    .map(|details| format!("{} : {}", details.field, details.reason))
-                    .collect::<Vec<_>>()
-                    .join(", "),
-                None => "".to_string(),
-            });
-
-        let reason = get_error_reason(
-            error_data.clone().and_then(|error_info| error_info.message),
-            detailed_error_info,
-            avs_message,
-        );
-        let error_message = error_data.clone().and_then(|error_info| error_info.reason);
-        Self {
-            code: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_CODE.to_string()),
-            message: error_message
-                .clone()
-                .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
-            reason,
-            status_code,
-            attempt_status,
-            connector_transaction_id: Some(transaction_id.clone()),
-        }
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_CODE.to_string()),
+        message: error_message
+            .clone()
+            .unwrap_or(hyperswitch_interfaces::consts::NO_ERROR_MESSAGE.to_string()),
+        reason,
+        status_code,
+        attempt_status,
+        connector_transaction_id: Some(transaction_id.clone()),
     }
 }
-
 pub fn get_error_reason(
     error_info: Option<String>,
     detailed_error_info: Option<String>,
diff --git a/crates/hyperswitch_connectors/src/constants.rs b/crates/hyperswitch_connectors/src/constants.rs
index 3d99f8d167f..e83438d325b 100644
--- a/crates/hyperswitch_connectors/src/constants.rs
+++ b/crates/hyperswitch_connectors/src/constants.rs
@@ -32,3 +32,11 @@ pub(crate) mod headers {
 
 /// Unsupported response type error message
 pub const UNSUPPORTED_ERROR_MESSAGE: &str = "Unsupported response type";
+
+/// Error message for Authentication Error from the connector
+pub const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
+
+/// Error message when Refund request has been voided.
+pub const REFUND_VOIDED: &str = "Refund request has been voided.";
+
+pub const LOW_BALANCE_ERROR_MESSAGE: &str = "Insufficient balance in the payment method";
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 0e752a29373..a2db7ad7b6e 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -99,6 +99,7 @@ default_imp_for_authorize_session_token!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -106,6 +107,7 @@ default_imp_for_authorize_session_token!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -144,6 +146,7 @@ default_imp_for_authorize_session_token!(
     connectors::Tsys,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl,
@@ -169,6 +172,7 @@ default_imp_for_calculate_tax!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -176,6 +180,7 @@ default_imp_for_calculate_tax!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -214,6 +219,7 @@ default_imp_for_calculate_tax!(
     connectors::Volt,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl,
@@ -239,6 +245,7 @@ default_imp_for_session_update!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -246,6 +253,7 @@ default_imp_for_session_update!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Digitalvirgo,
     connectors::Dlocal,
@@ -279,6 +287,7 @@ default_imp_for_session_update!(
     connectors::Gocardless,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl,
@@ -310,6 +319,7 @@ default_imp_for_post_session_tokens!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Bitpay,
     connectors::Bluesnap,
     connectors::Boku,
@@ -317,6 +327,7 @@ default_imp_for_post_session_tokens!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Digitalvirgo,
     connectors::Dlocal,
@@ -349,6 +360,7 @@ default_imp_for_post_session_tokens!(
     connectors::Gocardless,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Powertranz,
     connectors::Prophetpay,
@@ -381,6 +393,7 @@ macro_rules! default_imp_for_complete_authorize {
 default_imp_for_complete_authorize!(
     connectors::Amazonpay,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Boku,
@@ -415,6 +428,7 @@ default_imp_for_complete_authorize!(
     connectors::Thunes,
     connectors::Tsys,
     connectors::UnifiedAuthenticationService,
+    connectors::Wellsfargo,
     connectors::Worldline,
     connectors::Volt,
     connectors::Xendit,
@@ -443,6 +457,7 @@ default_imp_for_incremental_authorization!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -515,6 +530,7 @@ default_imp_for_create_customer!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -522,6 +538,7 @@ default_imp_for_create_customer!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -558,6 +575,7 @@ default_imp_for_create_customer!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -588,9 +606,11 @@ default_imp_for_connector_redirect_response!(
     connectors::Bitpay,
     connectors::Boku,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Dlocal,
@@ -623,6 +643,7 @@ default_imp_for_connector_redirect_response!(
     connectors::Thunes,
     connectors::Tsys,
     connectors::UnifiedAuthenticationService,
+    connectors::Wellsfargo,
     connectors::Worldline,
     connectors::Volt,
     connectors::Zsl,
@@ -648,6 +669,7 @@ default_imp_for_pre_processing_steps!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -690,6 +712,7 @@ default_imp_for_pre_processing_steps!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -717,6 +740,7 @@ default_imp_for_post_processing_steps!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -724,6 +748,7 @@ default_imp_for_post_processing_steps!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -762,6 +787,7 @@ default_imp_for_post_processing_steps!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -789,6 +815,7 @@ default_imp_for_approve!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -796,6 +823,7 @@ default_imp_for_approve!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -834,6 +862,7 @@ default_imp_for_approve!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -861,6 +890,7 @@ default_imp_for_reject!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -868,6 +898,7 @@ default_imp_for_reject!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -906,6 +937,7 @@ default_imp_for_reject!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -933,6 +965,7 @@ default_imp_for_webhook_source_verification!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -940,6 +973,7 @@ default_imp_for_webhook_source_verification!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -978,6 +1012,7 @@ default_imp_for_webhook_source_verification!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1006,6 +1041,7 @@ default_imp_for_accept_dispute!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1013,6 +1049,7 @@ default_imp_for_accept_dispute!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1051,6 +1088,7 @@ default_imp_for_accept_dispute!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1078,6 +1116,7 @@ default_imp_for_submit_evidence!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1085,6 +1124,7 @@ default_imp_for_submit_evidence!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1123,6 +1163,7 @@ default_imp_for_submit_evidence!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1150,6 +1191,7 @@ default_imp_for_defend_dispute!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1157,6 +1199,7 @@ default_imp_for_defend_dispute!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1195,6 +1238,7 @@ default_imp_for_defend_dispute!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1231,6 +1275,7 @@ default_imp_for_file_upload!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1238,6 +1283,7 @@ default_imp_for_file_upload!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1276,6 +1322,7 @@ default_imp_for_file_upload!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1296,6 +1343,7 @@ default_imp_for_payouts!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1341,6 +1389,7 @@ default_imp_for_payouts!(
     connectors::Volt,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl,
@@ -1369,6 +1418,7 @@ default_imp_for_payouts_create!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1376,6 +1426,7 @@ default_imp_for_payouts_create!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1414,6 +1465,7 @@ default_imp_for_payouts_create!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1443,6 +1495,7 @@ default_imp_for_payouts_retrieve!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1450,6 +1503,7 @@ default_imp_for_payouts_retrieve!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1488,6 +1542,7 @@ default_imp_for_payouts_retrieve!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1517,6 +1572,7 @@ default_imp_for_payouts_eligibility!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1524,6 +1580,7 @@ default_imp_for_payouts_eligibility!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1562,6 +1619,7 @@ default_imp_for_payouts_eligibility!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1591,6 +1649,7 @@ default_imp_for_payouts_fulfill!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1636,6 +1695,7 @@ default_imp_for_payouts_fulfill!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1665,6 +1725,7 @@ default_imp_for_payouts_cancel!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1672,6 +1733,7 @@ default_imp_for_payouts_cancel!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1710,6 +1772,7 @@ default_imp_for_payouts_cancel!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1739,6 +1802,7 @@ default_imp_for_payouts_quote!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1746,6 +1810,7 @@ default_imp_for_payouts_quote!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1784,6 +1849,7 @@ default_imp_for_payouts_quote!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1813,6 +1879,7 @@ default_imp_for_payouts_recipient!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1820,6 +1887,7 @@ default_imp_for_payouts_recipient!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1858,6 +1926,7 @@ default_imp_for_payouts_recipient!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1887,6 +1956,7 @@ default_imp_for_payouts_recipient_account!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1894,6 +1964,7 @@ default_imp_for_payouts_recipient_account!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1932,6 +2003,7 @@ default_imp_for_payouts_recipient_account!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -1961,6 +2033,7 @@ default_imp_for_frm_sale!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1968,6 +2041,7 @@ default_imp_for_frm_sale!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2006,6 +2080,7 @@ default_imp_for_frm_sale!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2035,6 +2110,7 @@ default_imp_for_frm_checkout!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2042,6 +2118,7 @@ default_imp_for_frm_checkout!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2080,6 +2157,7 @@ default_imp_for_frm_checkout!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2109,6 +2187,7 @@ default_imp_for_frm_transaction!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2116,6 +2195,7 @@ default_imp_for_frm_transaction!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2154,6 +2234,7 @@ default_imp_for_frm_transaction!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2183,6 +2264,7 @@ default_imp_for_frm_fulfillment!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2190,6 +2272,7 @@ default_imp_for_frm_fulfillment!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2228,6 +2311,7 @@ default_imp_for_frm_fulfillment!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2257,6 +2341,7 @@ default_imp_for_frm_record_return!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2264,6 +2349,7 @@ default_imp_for_frm_record_return!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2302,6 +2388,7 @@ default_imp_for_frm_record_return!(
     connectors::UnifiedAuthenticationService,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2328,6 +2415,7 @@ default_imp_for_revoking_mandates!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2400,6 +2488,7 @@ default_imp_for_uas_pre_authentication!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bluesnap,
     connectors::Bitpay,
@@ -2408,6 +2497,7 @@ default_imp_for_uas_pre_authentication!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2445,6 +2535,7 @@ default_imp_for_uas_pre_authentication!(
     connectors::Tsys,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
@@ -2470,6 +2561,7 @@ default_imp_for_uas_post_authentication!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -2478,6 +2570,7 @@ default_imp_for_uas_post_authentication!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -2515,6 +2608,7 @@ default_imp_for_uas_post_authentication!(
     connectors::Tsys,
     connectors::Worldline,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Volt,
     connectors::Xendit,
     connectors::Zen,
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index 4161b36f906..485ff86d728 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -209,6 +209,7 @@ default_imp_for_new_connector_integration_payment!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -217,6 +218,7 @@ default_imp_for_new_connector_integration_payment!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -256,6 +258,7 @@ default_imp_for_new_connector_integration_payment!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -282,6 +285,7 @@ default_imp_for_new_connector_integration_refund!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -290,6 +294,7 @@ default_imp_for_new_connector_integration_refund!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -326,6 +331,7 @@ default_imp_for_new_connector_integration_refund!(
     connectors::Thunes,
     connectors::Tsys,
     connectors::UnifiedAuthenticationService,
+    connectors::Wellsfargo,
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
@@ -350,6 +356,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -358,6 +365,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -397,6 +405,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -424,6 +433,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -471,6 +481,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -497,6 +508,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -544,6 +556,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -570,6 +583,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -578,6 +592,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -617,6 +632,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -653,6 +669,7 @@ default_imp_for_new_connector_integration_file_upload!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -661,6 +678,7 @@ default_imp_for_new_connector_integration_file_upload!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -700,6 +718,7 @@ default_imp_for_new_connector_integration_file_upload!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -728,6 +747,7 @@ default_imp_for_new_connector_integration_payouts_create!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -736,6 +756,7 @@ default_imp_for_new_connector_integration_payouts_create!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -775,6 +796,7 @@ default_imp_for_new_connector_integration_payouts_create!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -803,6 +825,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -811,6 +834,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -850,6 +874,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -878,6 +903,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -886,6 +912,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -925,6 +952,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -953,6 +981,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -961,6 +990,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1000,6 +1030,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1028,6 +1059,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1036,6 +1068,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1075,6 +1108,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1103,6 +1137,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1111,6 +1146,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1150,6 +1186,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1178,6 +1215,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1186,6 +1224,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1225,6 +1264,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1253,6 +1293,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1261,6 +1302,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1300,6 +1342,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1326,6 +1369,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1334,6 +1378,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1373,6 +1418,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1401,6 +1447,7 @@ default_imp_for_new_connector_integration_frm_sale!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1409,6 +1456,7 @@ default_imp_for_new_connector_integration_frm_sale!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1448,6 +1496,7 @@ default_imp_for_new_connector_integration_frm_sale!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1476,6 +1525,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1484,6 +1534,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1523,6 +1574,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1551,6 +1603,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1559,6 +1612,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1598,6 +1652,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1626,6 +1681,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1634,6 +1690,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1673,6 +1730,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1701,6 +1759,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1709,6 +1768,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1748,6 +1808,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
@@ -1773,6 +1834,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connectors::Amazonpay,
     connectors::Bambora,
     connectors::Bamboraapac,
+    connectors::Bankofamerica,
     connectors::Billwerk,
     connectors::Bitpay,
     connectors::Bluesnap,
@@ -1781,6 +1843,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::CtpMastercard,
+    connectors::Cybersource,
     connectors::Datatrans,
     connectors::Deutschebank,
     connectors::Digitalvirgo,
@@ -1820,6 +1883,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connectors::Worldline,
     connectors::Volt,
     connectors::Worldpay,
+    connectors::Wellsfargo,
     connectors::Xendit,
     connectors::Zen,
     connectors::Zsl
diff --git a/crates/hyperswitch_connectors/src/types.rs b/crates/hyperswitch_connectors/src/types.rs
index 05ef62d7828..f731450f386 100644
--- a/crates/hyperswitch_connectors/src/types.rs
+++ b/crates/hyperswitch_connectors/src/types.rs
@@ -1,3 +1,5 @@
+#[cfg(feature = "payouts")]
+use hyperswitch_domain_models::types::{PayoutsData, PayoutsResponseData};
 use hyperswitch_domain_models::{
     router_data::{AccessToken, RouterData},
     router_flow_types::{AccessTokenAuth, Capture, PSync, PreProcessing, Session, Void},
@@ -25,6 +27,10 @@ pub(crate) type PaymentsPreprocessingResponseRouterData<R> =
 pub(crate) type PaymentsSessionResponseRouterData<R> =
     ResponseRouterData<Session, R, PaymentsSessionData, PaymentsResponseData>;
 
+#[cfg(feature = "payouts")]
+pub type PayoutsResponseRouterData<F, R> =
+    ResponseRouterData<F, R, PayoutsData, PayoutsResponseData>;
+
 // TODO: Remove `ResponseRouterData` from router crate after all the related type aliases are moved to this crate.
 pub struct ResponseRouterData<Flow, R, Request, Response> {
     pub response: R,
diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rs
index 671aed36378..e99777ad27e 100644
--- a/crates/hyperswitch_connectors/src/utils.rs
+++ b/crates/hyperswitch_connectors/src/utils.rs
@@ -1,6 +1,8 @@
 use std::collections::{HashMap, HashSet};
 
 use api_models::payments;
+#[cfg(feature = "payouts")]
+use api_models::payouts::PayoutVendorAccountDetails;
 use base64::Engine;
 use common_enums::{
     enums,
@@ -23,9 +25,9 @@ use hyperswitch_domain_models::{
     },
     router_request_types::{
         AuthenticationData, BrowserInformation, CompleteAuthorizeData, ConnectorCustomerData,
-        PaymentMethodTokenizationData, PaymentsAuthorizeData, PaymentsCancelData,
-        PaymentsCaptureData, PaymentsPreProcessingData, PaymentsSyncData, RefundsData, ResponseId,
-        SetupMandateRequestData,
+        MandateRevokeRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+        PaymentsCancelData, PaymentsCaptureData, PaymentsPreProcessingData, PaymentsSyncData,
+        RefundsData, ResponseId, SetupMandateRequestData,
     },
     types::OrderDetailsWithAmount,
 };
@@ -1375,6 +1377,8 @@ pub trait PaymentsAuthorizeRequestData {
         &self,
     ) -> Result<Secret<String>, Error>;
     fn is_cit_mandate_payment(&self) -> bool;
+    fn get_optional_network_transaction_id(&self) -> Option<String>;
+    fn get_optional_email(&self) -> Option<Email>;
 }
 
 impl PaymentsAuthorizeRequestData for PaymentsAuthorizeData {
@@ -1564,6 +1568,21 @@ impl PaymentsAuthorizeRequestData for PaymentsAuthorizeData {
         (self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
             && self.setup_future_usage == Some(FutureUsage::OffSession)
     }
+    fn get_optional_network_transaction_id(&self) -> Option<String> {
+        self.mandate_id
+            .as_ref()
+            .and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
+                Some(payments::MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
+                    Some(network_transaction_id.clone())
+                }
+                Some(payments::MandateReferenceId::ConnectorMandateId(_))
+                | Some(payments::MandateReferenceId::NetworkTokenWithNTI(_))
+                | None => None,
+            })
+    }
+    fn get_optional_email(&self) -> Option<Email> {
+        self.email.clone()
+    }
 }
 
 pub trait PaymentsCaptureRequestData {
@@ -1816,12 +1835,41 @@ impl AddressData for Address {
     }
 }
 pub trait PaymentsPreProcessingRequestData {
-    fn get_amount(&self) -> Result<i64, Error>;
+    fn get_redirect_response_payload(&self) -> Result<pii::SecretSerdeValue, Error>;
+    fn get_email(&self) -> Result<Email, Error>;
+    fn get_payment_method_type(&self) -> Result<enums::PaymentMethodType, Error>;
     fn get_currency(&self) -> Result<enums::Currency, Error>;
+    fn get_amount(&self) -> Result<i64, Error>;
+    fn get_minor_amount(&self) -> Result<MinorUnit, Error>;
     fn is_auto_capture(&self) -> Result<bool, Error>;
+    fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error>;
+    fn get_webhook_url(&self) -> Result<String, Error>;
+    fn get_router_return_url(&self) -> Result<String, Error>;
+    fn get_browser_info(&self) -> Result<BrowserInformation, Error>;
+    fn get_complete_authorize_url(&self) -> Result<String, Error>;
+    fn connector_mandate_id(&self) -> Option<String>;
 }
 
 impl PaymentsPreProcessingRequestData for PaymentsPreProcessingData {
+    fn get_email(&self) -> Result<Email, Error> {
+        self.email.clone().ok_or_else(missing_field_err("email"))
+    }
+    fn get_payment_method_type(&self) -> Result<enums::PaymentMethodType, Error> {
+        self.payment_method_type
+            .to_owned()
+            .ok_or_else(missing_field_err("payment_method_type"))
+    }
+    fn get_currency(&self) -> Result<enums::Currency, Error> {
+        self.currency.ok_or_else(missing_field_err("currency"))
+    }
+    fn get_amount(&self) -> Result<i64, Error> {
+        self.amount.ok_or_else(missing_field_err("amount"))
+    }
+
+    // New minor amount function for amount framework
+    fn get_minor_amount(&self) -> Result<MinorUnit, Error> {
+        self.minor_amount.ok_or_else(missing_field_err("amount"))
+    }
     fn is_auto_capture(&self) -> Result<bool, Error> {
         match self.capture_method {
             Some(enums::CaptureMethod::Automatic)
@@ -1833,11 +1881,53 @@ impl PaymentsPreProcessingRequestData for PaymentsPreProcessingData {
             }
         }
     }
-    fn get_amount(&self) -> Result<i64, Error> {
-        self.amount.ok_or_else(missing_field_err("amount"))
+    fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error> {
+        self.order_details
+            .clone()
+            .ok_or_else(missing_field_err("order_details"))
     }
-    fn get_currency(&self) -> Result<enums::Currency, Error> {
-        self.currency.ok_or_else(missing_field_err("currency"))
+    fn get_webhook_url(&self) -> Result<String, Error> {
+        self.webhook_url
+            .clone()
+            .ok_or_else(missing_field_err("webhook_url"))
+    }
+    fn get_router_return_url(&self) -> Result<String, Error> {
+        self.router_return_url
+            .clone()
+            .ok_or_else(missing_field_err("return_url"))
+    }
+    fn get_browser_info(&self) -> Result<BrowserInformation, Error> {
+        self.browser_info
+            .clone()
+            .ok_or_else(missing_field_err("browser_info"))
+    }
+    fn get_complete_authorize_url(&self) -> Result<String, Error> {
+        self.complete_authorize_url
+            .clone()
+            .ok_or_else(missing_field_err("complete_authorize_url"))
+    }
+    fn get_redirect_response_payload(&self) -> Result<pii::SecretSerdeValue, Error> {
+        self.redirect_response
+            .as_ref()
+            .and_then(|res| res.payload.to_owned())
+            .ok_or(
+                errors::ConnectorError::MissingConnectorRedirectionPayload {
+                    field_name: "request.redirect_response.payload",
+                }
+                .into(),
+            )
+    }
+    fn connector_mandate_id(&self) -> Option<String> {
+        self.mandate_id
+            .as_ref()
+            .and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
+                Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
+                    connector_mandate_ids.get_connector_mandate_id()
+                }
+                Some(payments::MandateReferenceId::NetworkMandateId(_))
+                | None
+                | Some(payments::MandateReferenceId::NetworkTokenWithNTI(_)) => None,
+            })
     }
 }
 
@@ -2544,3 +2634,180 @@ pub fn deserialize_xml_to_struct<T: serde::de::DeserializeOwned>(
 
     Ok(result)
 }
+
+#[cfg(feature = "payouts")]
+pub trait PayoutsData {
+    fn get_transfer_id(&self) -> Result<String, Error>;
+    fn get_customer_details(
+        &self,
+    ) -> Result<hyperswitch_domain_models::router_request_types::CustomerDetails, Error>;
+    fn get_vendor_details(&self) -> Result<PayoutVendorAccountDetails, Error>;
+    #[cfg(feature = "payouts")]
+    fn get_payout_type(&self) -> Result<enums::PayoutType, Error>;
+}
+
+#[cfg(feature = "payouts")]
+impl PayoutsData for hyperswitch_domain_models::router_request_types::PayoutsData {
+    fn get_transfer_id(&self) -> Result<String, Error> {
+        self.connector_payout_id
+            .clone()
+            .ok_or_else(missing_field_err("transfer_id"))
+    }
+    fn get_customer_details(
+        &self,
+    ) -> Result<hyperswitch_domain_models::router_request_types::CustomerDetails, Error> {
+        self.customer_details
+            .clone()
+            .ok_or_else(missing_field_err("customer_details"))
+    }
+    fn get_vendor_details(&self) -> Result<PayoutVendorAccountDetails, Error> {
+        self.vendor_details
+            .clone()
+            .ok_or_else(missing_field_err("vendor_details"))
+    }
+    #[cfg(feature = "payouts")]
+    fn get_payout_type(&self) -> Result<enums::PayoutType, Error> {
+        self.payout_type
+            .to_owned()
+            .ok_or_else(missing_field_err("payout_type"))
+    }
+}
+pub trait RevokeMandateRequestData {
+    fn get_connector_mandate_id(&self) -> Result<String, Error>;
+}
+
+impl RevokeMandateRequestData for MandateRevokeRequestData {
+    fn get_connector_mandate_id(&self) -> Result<String, Error> {
+        self.connector_mandate_id
+            .clone()
+            .ok_or_else(missing_field_err("connector_mandate_id"))
+    }
+}
+pub trait RecurringMandateData {
+    fn get_original_payment_amount(&self) -> Result<i64, Error>;
+    fn get_original_payment_currency(&self) -> Result<enums::Currency, Error>;
+}
+
+impl RecurringMandateData for RecurringMandatePaymentData {
+    fn get_original_payment_amount(&self) -> Result<i64, Error> {
+        self.original_payment_authorized_amount
+            .ok_or_else(missing_field_err("original_payment_authorized_amount"))
+    }
+    fn get_original_payment_currency(&self) -> Result<enums::Currency, Error> {
+        self.original_payment_authorized_currency
+            .ok_or_else(missing_field_err("original_payment_authorized_currency"))
+    }
+}
+
+#[cfg(feature = "payouts")]
+impl CardData for api_models::payouts::CardPayout {
+    fn get_card_expiry_year_2_digit(&self) -> Result<Secret<String>, errors::ConnectorError> {
+        let binding = self.expiry_year.clone();
+        let year = binding.peek();
+        Ok(Secret::new(
+            year.get(year.len() - 2..)
+                .ok_or(errors::ConnectorError::RequestEncodingFailed)?
+                .to_string(),
+        ))
+    }
+    fn get_card_issuer(&self) -> Result<CardIssuer, Error> {
+        get_card_issuer(self.card_number.peek())
+    }
+    fn get_card_expiry_month_year_2_digit_with_delimiter(
+        &self,
+        delimiter: String,
+    ) -> Result<Secret<String>, errors::ConnectorError> {
+        let year = self.get_card_expiry_year_2_digit()?;
+        Ok(Secret::new(format!(
+            "{}{}{}",
+            self.expiry_month.peek(),
+            delimiter,
+            year.peek()
+        )))
+    }
+    fn get_expiry_date_as_yyyymm(&self, delimiter: &str) -> Secret<String> {
+        let year = self.get_expiry_year_4_digit();
+        Secret::new(format!(
+            "{}{}{}",
+            year.peek(),
+            delimiter,
+            self.expiry_month.peek()
+        ))
+    }
+    fn get_expiry_date_as_mmyyyy(&self, delimiter: &str) -> Secret<String> {
+        let year = self.get_expiry_year_4_digit();
+        Secret::new(format!(
+            "{}{}{}",
+            self.expiry_month.peek(),
+            delimiter,
+            year.peek()
+        ))
+    }
+    fn get_expiry_year_4_digit(&self) -> Secret<String> {
+        let mut year = self.expiry_year.peek().clone();
+        if year.len() == 2 {
+            year = format!("20{}", year);
+        }
+        Secret::new(year)
+    }
+    fn get_expiry_date_as_yymm(&self) -> Result<Secret<String>, errors::ConnectorError> {
+        let year = self.get_card_expiry_year_2_digit()?.expose();
+        let month = self.expiry_month.clone().expose();
+        Ok(Secret::new(format!("{year}{month}")))
+    }
+    fn get_expiry_month_as_i8(&self) -> Result<Secret<i8>, Error> {
+        self.expiry_month
+            .peek()
+            .clone()
+            .parse::<i8>()
+            .change_context(errors::ConnectorError::ResponseDeserializationFailed)
+            .map(Secret::new)
+    }
+    fn get_expiry_year_as_i32(&self) -> Result<Secret<i32>, Error> {
+        self.expiry_year
+            .peek()
+            .clone()
+            .parse::<i32>()
+            .change_context(errors::ConnectorError::ResponseDeserializationFailed)
+            .map(Secret::new)
+    }
+
+    fn get_expiry_date_as_mmyy(&self) -> Result<Secret<String>, errors::ConnectorError> {
+        let year = self.get_card_expiry_year_2_digit()?.expose();
+        let month = self.expiry_month.clone().expose();
+        Ok(Secret::new(format!("{month}{year}")))
+    }
+
+    fn get_expiry_year_as_4_digit_i32(&self) -> Result<Secret<i32>, Error> {
+        self.get_expiry_year_4_digit()
+            .peek()
+            .clone()
+            .parse::<i32>()
+            .change_context(errors::ConnectorError::ResponseDeserializationFailed)
+            .map(Secret::new)
+    }
+    fn get_cardholder_name(&self) -> Result<Secret<String>, Error> {
+        self.card_holder_name
+            .clone()
+            .ok_or_else(missing_field_err("card.card_holder_name"))
+    }
+}
+
+pub trait NetworkTokenData {
+    fn get_card_issuer(&self) -> Result<CardIssuer, Error>;
+    fn get_expiry_year_4_digit(&self) -> Secret<String>;
+}
+
+impl NetworkTokenData for payment_method_data::NetworkTokenData {
+    fn get_card_issuer(&self) -> Result<CardIssuer, Error> {
+        get_card_issuer(self.token_number.peek())
+    }
+
+    fn get_expiry_year_4_digit(&self) -> Secret<String> {
+        let mut year = self.token_exp_year.peek().clone();
+        if year.len() == 2 {
+            year = format!("20{}", year);
+        }
+        Secret::new(year)
+    }
+}
diff --git a/crates/hyperswitch_domain_models/src/types.rs b/crates/hyperswitch_domain_models/src/types.rs
index 2dd38d88b6d..4bbab24edfe 100644
--- a/crates/hyperswitch_domain_models/src/types.rs
+++ b/crates/hyperswitch_domain_models/src/types.rs
@@ -3,10 +3,10 @@ pub use diesel_models::types::OrderDetailsWithAmount;
 use crate::{
     router_data::{AccessToken, RouterData},
     router_flow_types::{
-        AccessTokenAuth, Authorize, AuthorizeSessionToken, CalculateTax, Capture,
-        CompleteAuthorize, CreateConnectorCustomer, Execute, PSync, PaymentMethodToken,
-        PostAuthenticate, PostSessionTokens, PreAuthenticate, PreProcessing, RSync, Session,
-        SetupMandate, Void,
+        mandate_revoke::MandateRevoke, AccessTokenAuth, Authorize, AuthorizeSessionToken,
+        CalculateTax, Capture, CompleteAuthorize, CreateConnectorCustomer, Execute,
+        IncrementalAuthorization, PSync, PaymentMethodToken, PostAuthenticate, PostSessionTokens,
+        PreAuthenticate, PreProcessing, RSync, Session, SetupMandate, Void,
     },
     router_request_types::{
         unified_authentication_service::{
@@ -14,15 +14,19 @@ use crate::{
             UasPreAuthenticationRequestData,
         },
         AccessTokenRequestData, AuthorizeSessionTokenData, CompleteAuthorizeData,
-        ConnectorCustomerData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
-        PaymentsCancelData, PaymentsCaptureData, PaymentsPostSessionTokensData,
+        ConnectorCustomerData, MandateRevokeRequestData, PaymentMethodTokenizationData,
+        PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData,
+        PaymentsIncrementalAuthorizationData, PaymentsPostSessionTokensData,
         PaymentsPreProcessingData, PaymentsSessionData, PaymentsSyncData,
         PaymentsTaxCalculationData, RefundsData, SetupMandateRequestData,
     },
     router_response_types::{
-        PaymentsResponseData, RefundsResponseData, TaxCalculationResponseData,
+        MandateRevokeResponseData, PaymentsResponseData, RefundsResponseData,
+        TaxCalculationResponseData,
     },
 };
+#[cfg(feature = "payouts")]
+pub use crate::{router_request_types::PayoutsData, router_response_types::PayoutsResponseData};
 
 pub type PaymentsAuthorizeRouterData =
     RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData>;
@@ -56,3 +60,14 @@ pub type UasPostAuthenticationRouterData =
 
 pub type UasPreAuthenticationRouterData =
     RouterData<PreAuthenticate, UasPreAuthenticationRequestData, UasAuthenticationResponseData>;
+
+pub type MandateRevokeRouterData =
+    RouterData<MandateRevoke, MandateRevokeRequestData, MandateRevokeResponseData>;
+pub type PaymentsIncrementalAuthorizationRouterData = RouterData<
+    IncrementalAuthorization,
+    PaymentsIncrementalAuthorizationData,
+    PaymentsResponseData,
+>;
+
+#[cfg(feature = "payouts")]
+pub type PayoutsRouterData<F> = RouterData<F, PayoutsData, PayoutsResponseData>;
diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs
index 0da0e711fbc..0bd9190f11c 100644
--- a/crates/router/src/connector.rs
+++ b/crates/router/src/connector.rs
@@ -2,10 +2,8 @@ pub mod aci;
 pub mod adyen;
 pub mod adyenplatform;
 pub mod authorizedotnet;
-pub mod bankofamerica;
 pub mod braintree;
 pub mod checkout;
-pub mod cybersource;
 #[cfg(feature = "dummy_connector")]
 pub mod dummyconnector;
 pub mod ebanx;
@@ -31,16 +29,16 @@ pub mod stripe;
 pub mod threedsecureio;
 pub mod trustpay;
 pub mod utils;
-pub mod wellsfargo;
 pub mod wellsfargopayout;
 pub mod wise;
 
 pub use hyperswitch_connectors::connectors::{
     airwallex, airwallex::Airwallex, amazonpay, amazonpay::Amazonpay, bambora, bambora::Bambora,
-    bamboraapac, bamboraapac::Bamboraapac, billwerk, billwerk::Billwerk, bitpay, bitpay::Bitpay,
-    bluesnap, bluesnap::Bluesnap, boku, boku::Boku, cashtocode, cashtocode::Cashtocode, coinbase,
-    coinbase::Coinbase, cryptopay, cryptopay::Cryptopay, ctp_mastercard,
-    ctp_mastercard::CtpMastercard, datatrans, datatrans::Datatrans, deutschebank,
+    bamboraapac, bamboraapac::Bamboraapac, bankofamerica, bankofamerica::Bankofamerica, billwerk,
+    billwerk::Billwerk, bitpay, bitpay::Bitpay, bluesnap, bluesnap::Bluesnap, boku, boku::Boku,
+    cashtocode, cashtocode::Cashtocode, coinbase, coinbase::Coinbase, cryptopay,
+    cryptopay::Cryptopay, ctp_mastercard, ctp_mastercard::CtpMastercard, cybersource,
+    cybersource::Cybersource, datatrans, datatrans::Datatrans, deutschebank,
     deutschebank::Deutschebank, digitalvirgo, digitalvirgo::Digitalvirgo, dlocal, dlocal::Dlocal,
     elavon, elavon::Elavon, fiserv, fiserv::Fiserv, fiservemea, fiservemea::Fiservemea, fiuu,
     fiuu::Fiuu, forte, forte::Forte, globepay, globepay::Globepay, gocardless,
@@ -52,20 +50,19 @@ pub use hyperswitch_connectors::connectors::{
     prophetpay::Prophetpay, rapyd, rapyd::Rapyd, razorpay, razorpay::Razorpay, redsys,
     redsys::Redsys, shift4, shift4::Shift4, square, square::Square, stax, stax::Stax, taxjar,
     taxjar::Taxjar, thunes, thunes::Thunes, tsys, tsys::Tsys, unified_authentication_service,
-    unified_authentication_service::UnifiedAuthenticationService, volt, volt::Volt, worldline,
-    worldline::Worldline, worldpay, worldpay::Worldpay, xendit, xendit::Xendit, zen, zen::Zen, zsl,
-    zsl::Zsl,
+    unified_authentication_service::UnifiedAuthenticationService, volt, volt::Volt, wellsfargo,
+    wellsfargo::Wellsfargo, worldline, worldline::Worldline, worldpay, worldpay::Worldpay, xendit,
+    xendit::Xendit, zen, zen::Zen, zsl, zsl::Zsl,
 };
 
 #[cfg(feature = "dummy_connector")]
 pub use self::dummyconnector::DummyConnector;
 pub use self::{
     aci::Aci, adyen::Adyen, adyenplatform::Adyenplatform, authorizedotnet::Authorizedotnet,
-    bankofamerica::Bankofamerica, braintree::Braintree, checkout::Checkout,
-    cybersource::Cybersource, ebanx::Ebanx, globalpay::Globalpay, gpayments::Gpayments,
-    iatapay::Iatapay, itaubank::Itaubank, klarna::Klarna, mifinity::Mifinity, netcetera::Netcetera,
-    nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode, payme::Payme,
-    payone::Payone, paypal::Paypal, plaid::Plaid, riskified::Riskified, signifyd::Signifyd,
-    stripe::Stripe, threedsecureio::Threedsecureio, trustpay::Trustpay, wellsfargo::Wellsfargo,
+    braintree::Braintree, checkout::Checkout, ebanx::Ebanx, globalpay::Globalpay,
+    gpayments::Gpayments, iatapay::Iatapay, itaubank::Itaubank, klarna::Klarna, mifinity::Mifinity,
+    netcetera::Netcetera, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode,
+    payme::Payme, payone::Payone, paypal::Paypal, plaid::Plaid, riskified::Riskified,
+    signifyd::Signifyd, stripe::Stripe, threedsecureio::Threedsecureio, trustpay::Trustpay,
     wellsfargopayout::Wellsfargopayout, wise::Wise,
 };
diff --git a/crates/router/src/consts.rs b/crates/router/src/consts.rs
index 038da0be41c..9e00bcd6bce 100644
--- a/crates/router/src/consts.rs
+++ b/crates/router/src/consts.rs
@@ -41,7 +41,6 @@ pub const DEFAULT_LIST_API_LIMIT: u16 = 10;
 pub(crate) const UNSUPPORTED_ERROR_MESSAGE: &str = "Unsupported response type";
 pub(crate) const LOW_BALANCE_ERROR_MESSAGE: &str = "Insufficient balance in the payment method";
 pub(crate) const CONNECTOR_UNAUTHORIZED_ERROR: &str = "Authentication Error from the connector";
-pub(crate) const REFUND_VOIDED: &str = "Refund request has been voided.";
 
 pub(crate) const CANNOT_CONTINUE_AUTH: &str =
     "Cannot continue with Authorization due to failed Liability Shift.";
diff --git a/crates/router/src/core/payments/connector_integration_v2_impls.rs b/crates/router/src/core/payments/connector_integration_v2_impls.rs
index 697ec6fbdf1..28febe8b0b6 100644
--- a/crates/router/src/core/payments/connector_integration_v2_impls.rs
+++ b/crates/router/src/core/payments/connector_integration_v2_impls.rs
@@ -699,10 +699,8 @@ default_imp_for_new_connector_integration_payment!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -724,7 +722,6 @@ default_imp_for_new_connector_integration_payment!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise,
     connector::Plaid
@@ -751,10 +748,8 @@ default_imp_for_new_connector_integration_refund!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -776,7 +771,6 @@ default_imp_for_new_connector_integration_refund!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -797,10 +791,8 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -822,7 +814,6 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -865,10 +856,8 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -890,7 +879,6 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -915,10 +903,8 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -940,7 +926,6 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -949,10 +934,8 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -974,7 +957,6 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1010,10 +992,8 @@ default_imp_for_new_connector_integration_file_upload!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1035,7 +1015,6 @@ default_imp_for_new_connector_integration_file_upload!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1120,7 +1099,6 @@ default_imp_for_new_connector_integration_payouts!(
     connector::Tsys,
     connector::UnifiedAuthenticationService,
     connector::Volt,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Worldline,
     connector::Worldpay,
@@ -1152,10 +1130,8 @@ default_imp_for_new_connector_integration_payouts_create!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1177,7 +1153,6 @@ default_imp_for_new_connector_integration_payouts_create!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1205,10 +1180,8 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1230,7 +1203,6 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1258,10 +1230,8 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1283,7 +1253,6 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1311,10 +1280,8 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1336,7 +1303,6 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1364,10 +1330,8 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1389,7 +1353,6 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1417,10 +1380,8 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1442,7 +1403,6 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1470,10 +1430,8 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1495,7 +1453,6 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1523,10 +1480,8 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1548,7 +1503,6 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1574,10 +1528,8 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1599,7 +1551,6 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1621,7 +1572,6 @@ default_imp_for_new_connector_integration_frm!(
     connector::Authorizedotnet,
     connector::Bambora,
     connector::Bamboraapac,
-    connector::Bankofamerica,
     connector::Billwerk,
     connector::Bitpay,
     connector::Bluesnap,
@@ -1631,7 +1581,6 @@ default_imp_for_new_connector_integration_frm!(
     connector::Checkout,
     connector::Cryptopay,
     connector::Coinbase,
-    connector::Cybersource,
     connector::Deutschebank,
     connector::Digitalvirgo,
     connector::Dlocal,
@@ -1686,7 +1635,6 @@ default_imp_for_new_connector_integration_frm!(
     connector::Tsys,
     connector::UnifiedAuthenticationService,
     connector::Volt,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Worldline,
     connector::Worldpay,
@@ -1718,10 +1666,8 @@ default_imp_for_new_connector_integration_frm_sale!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1743,7 +1689,6 @@ default_imp_for_new_connector_integration_frm_sale!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1771,10 +1716,8 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1796,7 +1739,6 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1824,10 +1766,8 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1849,7 +1789,6 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1877,10 +1816,8 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1902,7 +1839,6 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1930,10 +1866,8 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1955,7 +1889,6 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -1980,10 +1913,8 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2005,7 +1936,6 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connector::Stripe,
     connector::Trustpay,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Plaid
 );
@@ -2129,7 +2059,6 @@ default_imp_for_new_connector_integration_connector_authentication!(
     connector::Tsys,
     connector::UnifiedAuthenticationService,
     connector::Volt,
-    connector::Wellsfargo,
     connector::Wise,
     connector::Worldline,
     connector::Worldpay,
@@ -2169,10 +2098,8 @@ default_imp_for_new_connector_integration_uas!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2195,7 +2122,6 @@ default_imp_for_new_connector_integration_uas!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
diff --git a/crates/router/src/core/payments/flows.rs b/crates/router/src/core/payments/flows.rs
index 925fb0f12bc..9ce3ad6c020 100644
--- a/crates/router/src/core/payments/flows.rs
+++ b/crates/router/src/core/payments/flows.rs
@@ -215,7 +215,6 @@ default_imp_for_complete_authorize!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Adyen,
-    connector::Bankofamerica,
     connector::Checkout,
     connector::Ebanx,
     connector::Gpayments,
@@ -235,7 +234,6 @@ default_imp_for_complete_authorize!(
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Wise,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 macro_rules! default_imp_for_webhook_source_verification {
@@ -269,10 +267,8 @@ default_imp_for_webhook_source_verification!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -294,7 +290,6 @@ default_imp_for_webhook_source_verification!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -331,10 +326,8 @@ default_imp_for_create_customer!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -356,7 +349,6 @@ default_imp_for_create_customer!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -394,8 +386,6 @@ default_imp_for_connector_redirect_response!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Adyen,
-    connector::Bankofamerica,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Gpayments,
     connector::Iatapay,
@@ -410,7 +400,6 @@ default_imp_for_connector_redirect_response!(
     connector::Riskified,
     connector::Signifyd,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -547,9 +536,7 @@ default_imp_for_accept_dispute!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -572,7 +559,6 @@ default_imp_for_accept_dispute!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -630,9 +616,7 @@ default_imp_for_file_upload!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -654,7 +638,6 @@ default_imp_for_file_upload!(
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Opennode,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -690,9 +673,7 @@ default_imp_for_submit_evidence!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -714,7 +695,6 @@ default_imp_for_submit_evidence!(
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Opennode,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -750,9 +730,7 @@ default_imp_for_defend_dispute!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -775,7 +753,6 @@ default_imp_for_defend_dispute!(
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Opennode,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -826,7 +803,6 @@ default_imp_for_pre_processing_steps!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
     connector::Ebanx,
@@ -845,7 +821,6 @@ default_imp_for_pre_processing_steps!(
     connector::Riskified,
     connector::Signifyd,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -865,8 +840,6 @@ impl<const T: u8>
 default_imp_for_post_processing_steps!(
     connector::Adyenplatform,
     connector::Adyen,
-    connector::Bankofamerica,
-    connector::Cybersource,
     connector::Nmi,
     connector::Nuvei,
     connector::Payme,
@@ -892,7 +865,6 @@ default_imp_for_post_processing_steps!(
     connector::Riskified,
     connector::Signifyd,
     connector::Threedsecureio,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -911,7 +883,6 @@ impl<const T: u8> Payouts for connector::DummyConnector<T> {}
 default_imp_for_payouts!(
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
     connector::Globalpay,
@@ -932,7 +903,6 @@ default_imp_for_payouts!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -968,10 +938,8 @@ default_imp_for_payouts_create!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Globalpay,
     connector::Gpayments,
     connector::Iatapay,
@@ -991,7 +959,6 @@ default_imp_for_payouts_create!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1028,10 +995,8 @@ default_imp_for_payouts_retrieve!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1053,7 +1018,6 @@ default_imp_for_payouts_retrieve!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1093,10 +1057,8 @@ default_imp_for_payouts_eligibility!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Globalpay,
     connector::Gpayments,
     connector::Iatapay,
@@ -1118,7 +1080,6 @@ default_imp_for_payouts_eligibility!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1153,7 +1114,6 @@ impl<const T: u8>
 default_imp_for_payouts_fulfill!(
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
     connector::Globalpay,
@@ -1174,7 +1134,6 @@ default_imp_for_payouts_fulfill!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1210,10 +1169,8 @@ default_imp_for_payouts_cancel!(
     connector::Adyenplatform,
     connector::Aci,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Globalpay,
     connector::Gpayments,
     connector::Iatapay,
@@ -1234,7 +1191,6 @@ default_imp_for_payouts_cancel!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1271,10 +1227,8 @@ default_imp_for_payouts_quote!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Globalpay,
     connector::Gpayments,
     connector::Iatapay,
@@ -1296,7 +1250,6 @@ default_imp_for_payouts_quote!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1333,10 +1286,8 @@ default_imp_for_payouts_recipient!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Globalpay,
     connector::Gpayments,
     connector::Iatapay,
@@ -1357,7 +1308,6 @@ default_imp_for_payouts_recipient!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout
 );
 
@@ -1397,10 +1347,8 @@ default_imp_for_payouts_recipient_account!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1422,7 +1370,6 @@ default_imp_for_payouts_recipient_account!(
     connector::Signifyd,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1459,10 +1406,8 @@ default_imp_for_approve!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1485,7 +1430,6 @@ default_imp_for_approve!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1522,10 +1466,8 @@ default_imp_for_reject!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1548,7 +1490,6 @@ default_imp_for_reject!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1685,10 +1626,8 @@ default_imp_for_frm_sale!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1709,7 +1648,6 @@ default_imp_for_frm_sale!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1748,10 +1686,8 @@ default_imp_for_frm_checkout!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1772,7 +1708,6 @@ default_imp_for_frm_checkout!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1811,10 +1746,8 @@ default_imp_for_frm_transaction!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1835,7 +1768,6 @@ default_imp_for_frm_transaction!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1874,10 +1806,8 @@ default_imp_for_frm_fulfillment!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1898,7 +1828,6 @@ default_imp_for_frm_fulfillment!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1937,10 +1866,8 @@ default_imp_for_frm_record_return!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -1961,7 +1888,6 @@ default_imp_for_frm_record_return!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -1998,7 +1924,6 @@ default_imp_for_incremental_authorization!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
     connector::Ebanx,
@@ -2057,7 +1982,6 @@ default_imp_for_revoking_mandates!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
     connector::Ebanx,
@@ -2285,10 +2209,8 @@ default_imp_for_authorize_session_token!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2310,7 +2232,6 @@ default_imp_for_authorize_session_token!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -2345,10 +2266,8 @@ default_imp_for_calculate_tax!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2371,7 +2290,6 @@ default_imp_for_calculate_tax!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -2406,10 +2324,8 @@ default_imp_for_session_update!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2431,7 +2347,6 @@ default_imp_for_session_update!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -2466,10 +2381,8 @@ default_imp_for_post_session_tokens!(
     connector::Adyen,
     connector::Adyenplatform,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2491,7 +2404,6 @@ default_imp_for_post_session_tokens!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -2529,10 +2441,8 @@ default_imp_for_uas_pre_authentication!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2555,7 +2465,6 @@ default_imp_for_uas_pre_authentication!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );
@@ -2590,10 +2499,8 @@ default_imp_for_uas_post_authentication!(
     connector::Aci,
     connector::Adyen,
     connector::Authorizedotnet,
-    connector::Bankofamerica,
     connector::Braintree,
     connector::Checkout,
-    connector::Cybersource,
     connector::Ebanx,
     connector::Globalpay,
     connector::Gpayments,
@@ -2616,7 +2523,6 @@ default_imp_for_uas_post_authentication!(
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
-    connector::Wellsfargo,
     connector::Wellsfargopayout,
     connector::Wise
 );

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

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

## Description
<!-- Describe your changes in detail -->
Move cybersource, bankofamerica, wellsfargo code to crate hyperswitch_connectors.



### Additional Changes

- [ ] This PR modifies the API contract
- [ ] 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
https://github.com/juspay/hyperswitch/issues/6585
<!--
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?
Moved the connector tot he hyperswitch crate (No logical Changes)
<!--
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 -->

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