Bug: chore: address Rust 1.78 clippy lints



Address the clippy lints occurring due to new rust version 1.78

See https://github.com/juspay/hyperswitch/issues/3391 for more information.
diff --git a/crates/analytics/src/clickhouse.rs b/crates/analytics/src/clickhouse.rs
index 4d01c20972c..8f0d00cd799 100644
--- a/crates/analytics/src/clickhouse.rs
+++ b/crates/analytics/src/clickhouse.rs
@@ -453,7 +453,7 @@ where
                         |(order_column, order)| format!(
                             " order by {} {}",
                             order_column.to_owned(),
-                            order.to_string()
+                            order
                         )
                     ),
                     alias.map_or_else(|| "".to_owned(), |alias| format!(" as {}", alias))
@@ -476,7 +476,7 @@ where
                         |(order_column, order)| format!(
                             " order by {} {}",
                             order_column.to_owned(),
-                            order.to_string()
+                            order
                         )
                     ),
                     alias.map_or_else(|| "".to_owned(), |alias| format!(" as {}", alias))
diff --git a/crates/analytics/src/lib.rs b/crates/analytics/src/lib.rs
index 2a7075a0f29..ae10fc9889e 100644
--- a/crates/analytics/src/lib.rs
+++ b/crates/analytics/src/lib.rs
@@ -78,14 +78,16 @@ impl Default for AnalyticsProvider {
     }
 }
 
-impl ToString for AnalyticsProvider {
-    fn to_string(&self) -> String {
-        String::from(match self {
+impl std::fmt::Display for AnalyticsProvider {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        let analytics_provider = match self {
             Self::Clickhouse(_) => "Clickhouse",
             Self::Sqlx(_) => "Sqlx",
             Self::CombinedCkh(_, _) => "CombinedCkh",
             Self::CombinedSqlx(_, _) => "CombinedSqlx",
-        })
+        };
+
+        write!(f, "{}", analytics_provider)
     }
 }
 
diff --git a/crates/analytics/src/payments/accumulator.rs b/crates/analytics/src/payments/accumulator.rs
index c340f2888f8..efc8aaf6983 100644
--- a/crates/analytics/src/payments/accumulator.rs
+++ b/crates/analytics/src/payments/accumulator.rs
@@ -153,10 +153,7 @@ impl PaymentMetricAccumulator for SumAccumulator {
     fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
         self.total = match (
             self.total,
-            metrics
-                .total
-                .as_ref()
-                .and_then(bigdecimal::ToPrimitive::to_i64),
+            metrics.total.as_ref().and_then(ToPrimitive::to_i64),
         ) {
             (None, None) => None,
             (None, i @ Some(_)) | (i @ Some(_), None) => i,
@@ -173,10 +170,7 @@ impl PaymentMetricAccumulator for AverageAccumulator {
     type MetricOutput = Option<f64>;
 
     fn add_metrics_bucket(&mut self, metrics: &PaymentMetricRow) {
-        let total = metrics
-            .total
-            .as_ref()
-            .and_then(bigdecimal::ToPrimitive::to_u32);
+        let total = metrics.total.as_ref().and_then(ToPrimitive::to_u32);
         let count = metrics.count.and_then(|total| u32::try_from(total).ok());
 
         match (total, count) {
diff --git a/crates/analytics/src/query.rs b/crates/analytics/src/query.rs
index d5296152076..525bc0f8467 100644
--- a/crates/analytics/src/query.rs
+++ b/crates/analytics/src/query.rs
@@ -286,12 +286,12 @@ pub enum Order {
     Descending,
 }
 
-impl ToString for Order {
-    fn to_string(&self) -> String {
-        String::from(match self {
-            Self::Ascending => "asc",
-            Self::Descending => "desc",
-        })
+impl std::fmt::Display for Order {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            Self::Ascending => write!(f, "asc"),
+            Self::Descending => write!(f, "desc"),
+        }
     }
 }
 
@@ -709,12 +709,12 @@ where
         Ok(query)
     }
 
-    pub async fn execute_query<R, P: AnalyticsDataSource>(
+    pub async fn execute_query<R, P>(
         &mut self,
         store: &P,
     ) -> CustomResult<CustomResult<Vec<R>, QueryExecutionError>, QueryBuildingError>
     where
-        P: LoadRow<R>,
+        P: LoadRow<R> + AnalyticsDataSource,
         Aggregate<&'static str>: ToSql<T>,
         Window<&'static str>: ToSql<T>,
     {
diff --git a/crates/analytics/src/refunds.rs b/crates/analytics/src/refunds.rs
index 53481e23281..590dc148ebf 100644
--- a/crates/analytics/src/refunds.rs
+++ b/crates/analytics/src/refunds.rs
@@ -6,5 +6,4 @@ pub mod metrics;
 pub mod types;
 pub use accumulator::{RefundMetricAccumulator, RefundMetricsAccumulator};
 
-pub trait RefundAnalytics: metrics::RefundMetricAnalytics {}
 pub use self::core::{get_filters, get_metrics};
diff --git a/crates/analytics/src/sdk_events.rs b/crates/analytics/src/sdk_events.rs
index fe8af7cfe2d..a02de4cbbee 100644
--- a/crates/analytics/src/sdk_events.rs
+++ b/crates/analytics/src/sdk_events.rs
@@ -5,10 +5,5 @@ pub mod filters;
 pub mod metrics;
 pub mod types;
 pub use accumulator::{SdkEventMetricAccumulator, SdkEventMetricsAccumulator};
-pub trait SDKEventAnalytics: events::SdkEventsFilterAnalytics {}
-pub trait SdkEventAnalytics:
-    metrics::SdkEventMetricAnalytics + filters::SdkEventFilterAnalytics
-{
-}
 
 pub use self::core::{get_filters, get_metrics, sdk_events_core};
diff --git a/crates/analytics/src/sqlx.rs b/crates/analytics/src/sqlx.rs
index 86782c5f750..133e959d63b 100644
--- a/crates/analytics/src/sqlx.rs
+++ b/crates/analytics/src/sqlx.rs
@@ -593,7 +593,7 @@ where
                         |(order_column, order)| format!(
                             " order by {} {}",
                             order_column.to_owned(),
-                            order.to_string()
+                            order
                         )
                     ),
                     alias.map_or_else(|| "".to_owned(), |alias| format!(" as {}", alias))
@@ -616,7 +616,7 @@ where
                         |(order_column, order)| format!(
                             " order by {} {}",
                             order_column.to_owned(),
-                            order.to_string()
+                            order
                         )
                     ),
                     alias.map_or_else(|| "".to_owned(), |alias| format!(" as {}", alias))
diff --git a/crates/analytics/src/types.rs b/crates/analytics/src/types.rs
index 356d11bb77d..d0c1d74bc10 100644
--- a/crates/analytics/src/types.rs
+++ b/crates/analytics/src/types.rs
@@ -63,11 +63,6 @@ where
     }
 }
 
-// Analytics Framework
-
-pub trait RefundAnalytics {}
-pub trait SdkEventAnalytics {}
-
 #[async_trait::async_trait]
 pub trait AnalyticsDataSource
 where
diff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rs
index 75bd2a31d8e..e845317b693 100644
--- a/crates/api_models/src/admin.rs
+++ b/crates/api_models/src/admin.rs
@@ -456,7 +456,7 @@ pub struct MerchantConnectorCreate {
     pub disabled: Option<bool>,
 
     /// Contains the frm configs for the merchant connector
-    #[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
+    #[schema(example = json!(consts::FRM_CONFIGS_EG))]
     pub frm_configs: Option<Vec<FrmConfigs>>,
 
     /// The business country to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
@@ -609,7 +609,7 @@ pub struct MerchantConnectorResponse {
     pub disabled: Option<bool>,
 
     /// Contains the frm configs for the merchant connector
-    #[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
+    #[schema(example = json!(consts::FRM_CONFIGS_EG))]
     pub frm_configs: Option<Vec<FrmConfigs>>,
 
     /// The business country to which the connector account is attached. To be deprecated soon. Use the 'profile_id' instead
@@ -702,7 +702,7 @@ pub struct MerchantConnectorUpdate {
     pub disabled: Option<bool>,
 
     /// Contains the frm configs for the merchant connector
-    #[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
+    #[schema(example = json!(consts::FRM_CONFIGS_EG))]
     pub frm_configs: Option<Vec<FrmConfigs>>,
 
     pub pm_auth_config: Option<serde_json::Value>,
diff --git a/crates/api_models/src/api_keys.rs b/crates/api_models/src/api_keys.rs
index 805c5616c2a..801bbc63f5f 100644
--- a/crates/api_models/src/api_keys.rs
+++ b/crates/api_models/src/api_keys.rs
@@ -270,7 +270,7 @@ mod api_key_expiration_tests {
         let date = time::Date::from_calendar_date(2022, time::Month::September, 10).unwrap();
         let time = time::Time::from_hms(11, 12, 13).unwrap();
         assert_eq!(
-            serde_json::to_string(&ApiKeyExpiration::DateTime(time::PrimitiveDateTime::new(
+            serde_json::to_string(&ApiKeyExpiration::DateTime(PrimitiveDateTime::new(
                 date, time
             )))
             .unwrap(),
@@ -289,7 +289,7 @@ mod api_key_expiration_tests {
         let time = time::Time::from_hms(11, 12, 13).unwrap();
         assert_eq!(
             serde_json::from_str::<ApiKeyExpiration>(r#""2022-09-10T11:12:13.000Z""#).unwrap(),
-            ApiKeyExpiration::DateTime(time::PrimitiveDateTime::new(date, time))
+            ApiKeyExpiration::DateTime(PrimitiveDateTime::new(date, time))
         );
     }
 
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index 8270ddaf3fe..0e46eb19931 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -682,7 +682,7 @@ impl PaymentsRequest {
             .as_ref()
             .map(|od| {
                 od.iter()
-                    .map(|order| order.encode_to_value().map(masking::Secret::new))
+                    .map(|order| order.encode_to_value().map(Secret::new))
                     .collect::<Result<Vec<_>, _>>()
             })
             .transpose()
@@ -1304,9 +1304,7 @@ mod payment_method_data_serde {
         match deserialize_to_inner {
             __Inner::OptionalPaymentMethod(value) => {
                 let parsed_value = serde_json::from_value::<__InnerPaymentMethodData>(value)
-                    .map_err(|serde_json_error| {
-                        serde::de::Error::custom(serde_json_error.to_string())
-                    })?;
+                    .map_err(|serde_json_error| de::Error::custom(serde_json_error.to_string()))?;
 
                 let payment_method_data = if let Some(payment_method_data_value) =
                     parsed_value.payment_method_data
@@ -1321,14 +1319,12 @@ mod payment_method_data_serde {
                                     payment_method_data_value,
                                 )
                                 .map_err(|serde_json_error| {
-                                    serde::de::Error::custom(serde_json_error.to_string())
+                                    de::Error::custom(serde_json_error.to_string())
                                 })?,
                             )
                         }
                     } else {
-                        Err(serde::de::Error::custom(
-                            "Expected a map for payment_method_data",
-                        ))?
+                        Err(de::Error::custom("Expected a map for payment_method_data"))?
                     }
                 } else {
                     None
@@ -1342,7 +1338,7 @@ mod payment_method_data_serde {
             __Inner::RewardString(inner_string) => {
                 let payment_method_data = match inner_string.as_str() {
                     "reward" => PaymentMethodData::Reward,
-                    _ => Err(serde::de::Error::custom("Invalid Variant"))?,
+                    _ => Err(de::Error::custom("Invalid Variant"))?,
                 };
 
                 Ok(Some(PaymentMethodDataRequest {
@@ -2686,8 +2682,8 @@ pub enum PaymentIdType {
     PreprocessingId(String),
 }
 
-impl std::fmt::Display for PaymentIdType {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+impl fmt::Display for PaymentIdType {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
             Self::PaymentIntentId(payment_id) => {
                 write!(f, "payment_intent_id = \"{payment_id}\"")
diff --git a/crates/api_models/src/routing.rs b/crates/api_models/src/routing.rs
index 723e6eccc36..fb9f5af8d2a 100644
--- a/crates/api_models/src/routing.rs
+++ b/crates/api_models/src/routing.rs
@@ -203,8 +203,8 @@ pub struct RoutableConnectorChoice {
     pub sub_label: Option<String>,
 }
 
-impl ToString for RoutableConnectorChoice {
-    fn to_string(&self) -> String {
+impl std::fmt::Display for RoutableConnectorChoice {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         #[cfg(feature = "connector_choice_mca_id")]
         let base = self.connector.to_string();
 
@@ -219,7 +219,7 @@ impl ToString for RoutableConnectorChoice {
             sub_base
         };
 
-        base
+        write!(f, "{}", base)
     }
 }
 
@@ -336,7 +336,7 @@ pub enum RoutingAlgorithm {
     Priority(Vec<RoutableConnectorChoice>),
     VolumeSplit(Vec<ConnectorVolumeSplit>),
     #[schema(value_type=ProgramConnectorSelection)]
-    Advanced(euclid::frontend::ast::Program<ConnectorSelection>),
+    Advanced(ast::Program<ConnectorSelection>),
 }
 
 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
@@ -345,7 +345,7 @@ pub enum RoutingAlgorithmSerde {
     Single(Box<RoutableConnectorChoice>),
     Priority(Vec<RoutableConnectorChoice>),
     VolumeSplit(Vec<ConnectorVolumeSplit>),
-    Advanced(euclid::frontend::ast::Program<ConnectorSelection>),
+    Advanced(ast::Program<ConnectorSelection>),
 }
 
 impl TryFrom<RoutingAlgorithmSerde> for RoutingAlgorithm {
diff --git a/crates/api_models/src/user/dashboard_metadata.rs b/crates/api_models/src/user/dashboard_metadata.rs
index b547a61d450..d8a437e31a6 100644
--- a/crates/api_models/src/user/dashboard_metadata.rs
+++ b/crates/api_models/src/user/dashboard_metadata.rs
@@ -33,7 +33,7 @@ pub enum SetMetaDataRequest {
 pub struct ProductionAgreementRequest {
     pub version: String,
     #[serde(skip_deserializing)]
-    pub ip_address: Option<Secret<String, common_utils::pii::IpAddress>>,
+    pub ip_address: Option<Secret<String, pii::IpAddress>>,
 }
 
 #[derive(Debug, serde::Deserialize, serde::Serialize)]
diff --git a/crates/common_utils/src/crypto.rs b/crates/common_utils/src/crypto.rs
index 46904535f01..7901dec6db2 100644
--- a/crates/common_utils/src/crypto.rs
+++ b/crates/common_utils/src/crypto.rs
@@ -38,14 +38,14 @@ impl NonceSequence {
     }
 
     /// Returns the current nonce value as bytes.
-    fn current(&self) -> [u8; ring::aead::NONCE_LEN] {
-        let mut nonce = [0_u8; ring::aead::NONCE_LEN];
+    fn current(&self) -> [u8; aead::NONCE_LEN] {
+        let mut nonce = [0_u8; aead::NONCE_LEN];
         nonce.copy_from_slice(&self.0.to_be_bytes()[Self::SEQUENCE_NUMBER_START_INDEX..]);
         nonce
     }
 
     /// Constructs a nonce sequence from bytes
-    fn from_bytes(bytes: [u8; ring::aead::NONCE_LEN]) -> Self {
+    fn from_bytes(bytes: [u8; aead::NONCE_LEN]) -> Self {
         let mut sequence_number = [0_u8; 128 / 8];
         sequence_number[Self::SEQUENCE_NUMBER_START_INDEX..].copy_from_slice(&bytes);
         let sequence_number = u128::from_be_bytes(sequence_number);
@@ -53,16 +53,16 @@ impl NonceSequence {
     }
 }
 
-impl ring::aead::NonceSequence for NonceSequence {
-    fn advance(&mut self) -> Result<ring::aead::Nonce, ring::error::Unspecified> {
-        let mut nonce = [0_u8; ring::aead::NONCE_LEN];
+impl aead::NonceSequence for NonceSequence {
+    fn advance(&mut self) -> Result<aead::Nonce, ring::error::Unspecified> {
+        let mut nonce = [0_u8; aead::NONCE_LEN];
         nonce.copy_from_slice(&self.0.to_be_bytes()[Self::SEQUENCE_NUMBER_START_INDEX..]);
 
         // Increment sequence number
         self.0 = self.0.wrapping_add(1);
 
         // Return previous sequence number as bytes
-        Ok(ring::aead::Nonce::assume_unique_for_key(nonce))
+        Ok(aead::Nonce::assume_unique_for_key(nonce))
     }
 }
 
@@ -275,8 +275,8 @@ impl DecodeMessage for GcmAes256 {
             .change_context(errors::CryptoError::DecodingFailed)?;
 
         let nonce_sequence = NonceSequence::from_bytes(
-            <[u8; ring::aead::NONCE_LEN]>::try_from(
-                msg.get(..ring::aead::NONCE_LEN)
+            <[u8; aead::NONCE_LEN]>::try_from(
+                msg.get(..aead::NONCE_LEN)
                     .ok_or(errors::CryptoError::DecodingFailed)
                     .attach_printable("Failed to read the nonce form the encrypted ciphertext")?,
             )
@@ -288,7 +288,7 @@ impl DecodeMessage for GcmAes256 {
         let output = binding.as_mut_slice();
 
         let result = key
-            .open_within(aead::Aad::empty(), output, ring::aead::NONCE_LEN..)
+            .open_within(aead::Aad::empty(), output, aead::NONCE_LEN..)
             .change_context(errors::CryptoError::DecodingFailed)?;
 
         Ok(result.to_vec())
diff --git a/crates/common_utils/src/ext_traits.rs b/crates/common_utils/src/ext_traits.rs
index f71e098a99c..5ad53ec8533 100644
--- a/crates/common_utils/src/ext_traits.rs
+++ b/crates/common_utils/src/ext_traits.rs
@@ -472,13 +472,13 @@ pub trait XmlExt {
     ///
     /// Deserialize an XML string into the specified type `<T>`.
     ///
-    fn parse_xml<T>(self) -> Result<T, quick_xml::de::DeError>
+    fn parse_xml<T>(self) -> Result<T, de::DeError>
     where
         T: serde::de::DeserializeOwned;
 }
 
 impl XmlExt for &str {
-    fn parse_xml<T>(self) -> Result<T, quick_xml::de::DeError>
+    fn parse_xml<T>(self) -> Result<T, de::DeError>
     where
         T: serde::de::DeserializeOwned,
     {
diff --git a/crates/common_utils/src/pii.rs b/crates/common_utils/src/pii.rs
index c1f9d716e4b..9c70c572fed 100644
--- a/crates/common_utils/src/pii.rs
+++ b/crates/common_utils/src/pii.rs
@@ -38,7 +38,7 @@ pub struct PhoneNumber(Secret<String, PhoneNumberStrategy>);
 
 impl<T> Strategy<T> for PhoneNumberStrategy
 where
-    T: AsRef<str> + std::fmt::Debug,
+    T: AsRef<str> + fmt::Debug,
 {
     fn fmt(val: &T, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         let val_str: &str = val.as_ref();
@@ -85,7 +85,7 @@ impl ops::DerefMut for PhoneNumber {
     }
 }
 
-impl<DB> Queryable<diesel::sql_types::Text, DB> for PhoneNumber
+impl<DB> Queryable<sql_types::Text, DB> for PhoneNumber
 where
     DB: Backend,
     Self: FromSql<sql_types::Text, DB>,
@@ -210,7 +210,7 @@ pub enum EmailStrategy {}
 
 impl<T> Strategy<T> for EmailStrategy
 where
-    T: AsRef<str> + std::fmt::Debug,
+    T: AsRef<str> + fmt::Debug,
 {
     fn fmt(val: &T, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         let val_str: &str = val.as_ref();
@@ -224,7 +224,7 @@ where
 #[derive(
     serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Default, AsExpression,
 )]
-#[diesel(sql_type = diesel::sql_types::Text)]
+#[diesel(sql_type = sql_types::Text)]
 #[serde(try_from = "String")]
 pub struct Email(Secret<String, EmailStrategy>);
 
@@ -262,7 +262,7 @@ impl ops::DerefMut for Email {
     }
 }
 
-impl<DB> Queryable<diesel::sql_types::Text, DB> for Email
+impl<DB> Queryable<sql_types::Text, DB> for Email
 where
     DB: Backend,
     Self: FromSql<sql_types::Text, DB>,
@@ -353,7 +353,7 @@ pub enum UpiVpaMaskingStrategy {}
 
 impl<T> Strategy<T> for UpiVpaMaskingStrategy
 where
-    T: AsRef<str> + std::fmt::Debug,
+    T: AsRef<str> + fmt::Debug,
 {
     fn fmt(val: &T, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         let vpa_str: &str = val.as_ref();
diff --git a/crates/common_utils/src/static_cache.rs b/crates/common_utils/src/static_cache.rs
index ca608fa9a3b..37705c892c5 100644
--- a/crates/common_utils/src/static_cache.rs
+++ b/crates/common_utils/src/static_cache.rs
@@ -26,6 +26,8 @@ impl<T> StaticCache<T>
 where
     T: Send,
 {
+    // Cannot have default impl as it cannot be called during instantiation of static item
+    #[allow(clippy::new_without_default)]
     pub const fn new() -> Self {
         Self {
             data: Lazy::new(|| RwLock::new(FxHashMap::default())),
diff --git a/crates/connector_configs/src/transformer.rs b/crates/connector_configs/src/transformer.rs
index 203e48ac507..f89c2e5921b 100644
--- a/crates/connector_configs/src/transformer.rs
+++ b/crates/connector_configs/src/transformer.rs
@@ -98,12 +98,11 @@ impl DashboardRequestPayload {
         if let Some(payment_methods_enabled) = request.payment_methods_enabled.clone() {
             for payload in payment_methods_enabled {
                 match payload.payment_method {
-                    api_models::enums::PaymentMethod::Card => {
+                    PaymentMethod::Card => {
                         if let Some(card_provider) = payload.card_provider {
-                            let payment_type = api_models::enums::PaymentMethodType::from_str(
-                                &payload.payment_method_type,
-                            )
-                            .map_err(|_| "Invalid key received".to_string());
+                            let payment_type =
+                                PaymentMethodType::from_str(&payload.payment_method_type)
+                                    .map_err(|_| "Invalid key received".to_string());
 
                             if let Ok(payment_type) = payment_type {
                                 for method in card_provider {
@@ -124,17 +123,17 @@ impl DashboardRequestPayload {
                         }
                     }
 
-                    api_models::enums::PaymentMethod::Wallet
-                    | api_models::enums::PaymentMethod::BankRedirect
-                    | api_models::enums::PaymentMethod::PayLater
-                    | api_models::enums::PaymentMethod::BankTransfer
-                    | api_models::enums::PaymentMethod::Crypto
-                    | api_models::enums::PaymentMethod::BankDebit
-                    | api_models::enums::PaymentMethod::Reward
-                    | api_models::enums::PaymentMethod::Upi
-                    | api_models::enums::PaymentMethod::Voucher
-                    | api_models::enums::PaymentMethod::GiftCard
-                    | api_models::enums::PaymentMethod::CardRedirect => {
+                    PaymentMethod::Wallet
+                    | PaymentMethod::BankRedirect
+                    | PaymentMethod::PayLater
+                    | PaymentMethod::BankTransfer
+                    | PaymentMethod::Crypto
+                    | PaymentMethod::BankDebit
+                    | PaymentMethod::Reward
+                    | PaymentMethod::Upi
+                    | PaymentMethod::Voucher
+                    | PaymentMethod::GiftCard
+                    | PaymentMethod::CardRedirect => {
                         if let Some(provider) = payload.provider {
                             let val = Self::transform_payment_method(
                                 request.connector,
@@ -154,7 +153,7 @@ impl DashboardRequestPayload {
             }
             if !card_payment_method_types.is_empty() {
                 let card = PaymentMethodsEnabled {
-                    payment_method: api_models::enums::PaymentMethod::Card,
+                    payment_method: PaymentMethod::Card,
                     payment_method_types: Some(card_payment_method_types),
                 };
                 payment_method_enabled.push(card);
diff --git a/crates/diesel_models/src/encryption.rs b/crates/diesel_models/src/encryption.rs
index 375259491c9..6c6063c1604 100644
--- a/crates/diesel_models/src/encryption.rs
+++ b/crates/diesel_models/src/encryption.rs
@@ -8,7 +8,7 @@ use diesel::{
 use masking::Secret;
 
 #[derive(Debug, AsExpression, Clone, serde::Serialize, serde::Deserialize, Eq, PartialEq)]
-#[diesel(sql_type = diesel::sql_types::Binary)]
+#[diesel(sql_type = sql_types::Binary)]
 #[repr(transparent)]
 pub struct Encryption {
     inner: Secret<Vec<u8>, EncryptionStrategy>,
@@ -41,7 +41,7 @@ where
     DB: Backend,
     Secret<Vec<u8>, EncryptionStrategy>: FromSql<sql_types::Binary, DB>,
 {
-    fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
+    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
         <Secret<Vec<u8>, EncryptionStrategy>>::from_sql(bytes).map(Self::new)
     }
 }
diff --git a/crates/diesel_models/src/query/payment_attempt.rs b/crates/diesel_models/src/query/payment_attempt.rs
index f23c2318899..4e5773800aa 100644
--- a/crates/diesel_models/src/query/payment_attempt.rs
+++ b/crates/diesel_models/src/query/payment_attempt.rs
@@ -10,7 +10,7 @@ use error_stack::{report, ResultExt};
 use super::generics;
 use crate::{
     enums::{self, IntentStatus},
-    errors::{self, DatabaseError},
+    errors::DatabaseError,
     payment_attempt::{
         PaymentAttempt, PaymentAttemptNew, PaymentAttemptUpdate, PaymentAttemptUpdateInternal,
     },
@@ -246,7 +246,7 @@ impl PaymentAttempt {
             .distinct()
             .get_results_async::<Option<String>>(conn)
             .await
-            .change_context(errors::DatabaseError::Others)
+            .change_context(DatabaseError::Others)
             .attach_printable("Error filtering records by connector")?
             .into_iter()
             .flatten()
@@ -350,7 +350,7 @@ impl PaymentAttempt {
             db_metrics::DatabaseOperation::Filter,
         )
         .await
-        .change_context(errors::DatabaseError::Others)
+        .change_context(DatabaseError::Others)
         .attach_printable("Error filtering count of payments")
     }
 }
diff --git a/crates/diesel_models/src/query/payout_attempt.rs b/crates/diesel_models/src/query/payout_attempt.rs
index ac34ee695ac..4f95877bd7c 100644
--- a/crates/diesel_models/src/query/payout_attempt.rs
+++ b/crates/diesel_models/src/query/payout_attempt.rs
@@ -11,7 +11,7 @@ use error_stack::{report, ResultExt};
 use super::generics;
 use crate::{
     enums,
-    errors::{self, DatabaseError},
+    errors::DatabaseError,
     payout_attempt::{
         PayoutAttempt, PayoutAttemptNew, PayoutAttemptUpdate, PayoutAttemptUpdateInternal,
     },
@@ -46,7 +46,7 @@ impl PayoutAttempt {
         .await
         {
             Err(error) => match error.current_context() {
-                errors::DatabaseError::NoFieldsToUpdate => Ok(self),
+                DatabaseError::NoFieldsToUpdate => Ok(self),
                 _ => Err(error),
             },
             result => result,
@@ -98,7 +98,7 @@ impl PayoutAttempt {
         .first()
         .cloned()
         .ok_or_else(|| {
-            report!(errors::DatabaseError::NotFound).attach_printable("Error while updating payout")
+            report!(DatabaseError::NotFound).attach_printable("Error while updating payout")
         })
     }
 
@@ -119,7 +119,7 @@ impl PayoutAttempt {
         .first()
         .cloned()
         .ok_or_else(|| {
-            report!(errors::DatabaseError::NotFound).attach_printable("Error while updating payout")
+            report!(DatabaseError::NotFound).attach_printable("Error while updating payout")
         })
     }
 
@@ -161,7 +161,7 @@ impl PayoutAttempt {
             .distinct()
             .get_results_async::<Option<String>>(conn)
             .await
-            .change_context(errors::DatabaseError::Others)
+            .change_context(DatabaseError::Others)
             .attach_printable("Error filtering records by connector")?
             .into_iter()
             .flatten()
diff --git a/crates/drainer/src/handler.rs b/crates/drainer/src/handler.rs
index 47b60db80d5..35ad467d5fe 100644
--- a/crates/drainer/src/handler.rs
+++ b/crates/drainer/src/handler.rs
@@ -95,7 +95,7 @@ impl Handler {
         while let Some(_c) = rx.recv().await {
             logger::info!("Awaiting shutdown!");
             metrics::SHUTDOWN_SIGNAL_RECEIVED.add(&metrics::CONTEXT, 1, &[]);
-            let shutdown_started = tokio::time::Instant::now();
+            let shutdown_started = time::Instant::now();
             rx.close();
 
             //Check until the active tasks are zero. This does not include the tasks in the stream.
diff --git a/crates/drainer/src/lib.rs b/crates/drainer/src/lib.rs
index 56f2db0907e..cb2b55d202f 100644
--- a/crates/drainer/src/lib.rs
+++ b/crates/drainer/src/lib.rs
@@ -24,7 +24,7 @@ use router_env::{
 };
 use tokio::sync::mpsc;
 
-pub(crate) type Settings = crate::settings::Settings<RawSecret>;
+pub(crate) type Settings = settings::Settings<RawSecret>;
 
 use crate::{
     connection::pg_connection, services::Store, settings::DrainerSettings, types::StreamData,
diff --git a/crates/euclid/src/dssa/graph.rs b/crates/euclid/src/dssa/graph.rs
index 526248a3817..0ffafe4d48b 100644
--- a/crates/euclid/src/dssa/graph.rs
+++ b/crates/euclid/src/dssa/graph.rs
@@ -838,7 +838,7 @@ mod test {
             None::<()>,
         );
         let mut memo = cgraph::Memoization::new();
-        let mut cycle_map = cgraph::CycleCheck::new();
+        let mut cycle_map = CycleCheck::new();
         let _edge_1 = builder
             .make_edge(
                 _node_1,
@@ -894,7 +894,7 @@ mod test {
             None::<()>,
         );
         let mut memo = cgraph::Memoization::new();
-        let mut cycle_map = cgraph::CycleCheck::new();
+        let mut cycle_map = CycleCheck::new();
 
         let _edge_1 = builder
             .make_edge(
@@ -986,7 +986,7 @@ mod test {
         );
 
         let mut memo = cgraph::Memoization::new();
-        let mut cycle_map = cgraph::CycleCheck::new();
+        let mut cycle_map = CycleCheck::new();
 
         let _edge_1 = builder
             .make_edge(
diff --git a/crates/euclid/src/frontend/ast/parser.rs b/crates/euclid/src/frontend/ast/parser.rs
index 8b2f717a868..cbfc21c96a7 100644
--- a/crates/euclid/src/frontend/ast/parser.rs
+++ b/crates/euclid/src/frontend/ast/parser.rs
@@ -3,7 +3,7 @@ use nom::{
 };
 
 use crate::{frontend::ast, types::DummyOutput};
-pub type ParseResult<T, U> = nom::IResult<T, U, nom::error::VerboseError<T>>;
+pub type ParseResult<T, U> = nom::IResult<T, U, error::VerboseError<T>>;
 
 pub enum EuclidError {
     InvalidPercentage(String),
@@ -50,9 +50,9 @@ impl EuclidParsable for DummyOutput {
         )(input)
     }
 }
-pub fn skip_ws<'a, F: 'a, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&str, O>
+pub fn skip_ws<'a, F, O>(inner: F) -> impl FnMut(&'a str) -> ParseResult<&str, O>
 where
-    F: FnMut(&'a str) -> ParseResult<&str, O>,
+    F: FnMut(&'a str) -> ParseResult<&str, O> + 'a,
 {
     sequence::preceded(pchar::multispace0, inner)
 }
diff --git a/crates/euclid_macros/src/inner/knowledge.rs b/crates/euclid_macros/src/inner/knowledge.rs
index a9c453b42c6..baef55338f0 100644
--- a/crates/euclid_macros/src/inner/knowledge.rs
+++ b/crates/euclid_macros/src/inner/knowledge.rs
@@ -1,4 +1,8 @@
-use std::{hash::Hash, rc::Rc};
+use std::{
+    fmt::{Display, Formatter},
+    hash::Hash,
+    rc::Rc,
+};
 
 use proc_macro2::{Span, TokenStream};
 use quote::{format_ident, quote};
@@ -24,15 +28,16 @@ enum Comparison {
     LessThanEqual,
 }
 
-impl ToString for Comparison {
-    fn to_string(&self) -> String {
-        match self {
-            Self::LessThan => "< ".to_string(),
-            Self::Equal => String::new(),
-            Self::GreaterThanEqual => ">= ".to_string(),
-            Self::LessThanEqual => "<= ".to_string(),
-            Self::GreaterThan => "> ".to_string(),
-        }
+impl Display for Comparison {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        let symbol = match self {
+            Self::LessThan => "< ",
+            Self::Equal => return Ok(()),
+            Self::GreaterThanEqual => ">= ",
+            Self::LessThanEqual => "<= ",
+            Self::GreaterThan => "> ",
+        };
+        write!(f, "{}", symbol)
     }
 }
 
@@ -69,7 +74,7 @@ impl ValueType {
             Self::Any => format!("{key}(any)"),
             Self::EnumVariant(s) => format!("{key}({s})"),
             Self::Number { number, comparison } => {
-                format!("{}({}{})", key, comparison.to_string(), number)
+                format!("{}({}{})", key, comparison, number)
             }
         }
     }
@@ -104,9 +109,9 @@ struct Atom {
     value: ValueType,
 }
 
-impl ToString for Atom {
-    fn to_string(&self) -> String {
-        self.value.to_string(&self.key)
+impl Display for Atom {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.value.to_string(&self.key))
     }
 }
 
@@ -317,15 +322,14 @@ impl Parse for Scope {
     }
 }
 
-impl ToString for Scope {
-    fn to_string(&self) -> String {
+impl Display for Scope {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
         match self {
-            Self::Crate => "crate".to_string(),
-            Self::Extern => "euclid".to_string(),
+            Self::Crate => write!(f, "crate"),
+            Self::Extern => write!(f, "euclid"),
         }
     }
 }
-
 #[derive(Clone)]
 struct Program {
     rules: Vec<Rc<Rule>>,
diff --git a/crates/euclid_wasm/src/lib.rs b/crates/euclid_wasm/src/lib.rs
index 4920243bcc0..3668130608e 100644
--- a/crates/euclid_wasm/src/lib.rs
+++ b/crates/euclid_wasm/src/lib.rs
@@ -193,9 +193,7 @@ pub fn run_program(program: JsValue, input: JsValue) -> JsResult {
 
 #[wasm_bindgen(js_name = getAllConnectors)]
 pub fn get_all_connectors() -> JsResult {
-    Ok(serde_wasm_bindgen::to_value(
-        common_enums::RoutableConnectors::VARIANTS,
-    )?)
+    Ok(serde_wasm_bindgen::to_value(RoutableConnectors::VARIANTS)?)
 }
 
 #[wasm_bindgen(js_name = getAllKeys)]
diff --git a/crates/hyperswitch_domain_models/src/mandates.rs b/crates/hyperswitch_domain_models/src/mandates.rs
index 912ddc67058..180f733cfeb 100644
--- a/crates/hyperswitch_domain_models/src/mandates.rs
+++ b/crates/hyperswitch_domain_models/src/mandates.rs
@@ -169,8 +169,7 @@ impl CustomerAcceptance {
     }
 
     pub fn get_accepted_at(&self) -> PrimitiveDateTime {
-        self.accepted_at
-            .unwrap_or_else(common_utils::date_time::now)
+        self.accepted_at.unwrap_or_else(date_time::now)
     }
 }
 
diff --git a/crates/masking/src/diesel.rs b/crates/masking/src/diesel.rs
index f3576298bdb..ea60a861c9d 100644
--- a/crates/masking/src/diesel.rs
+++ b/crates/masking/src/diesel.rs
@@ -52,7 +52,7 @@ where
     S: FromSql<T, DB>,
     I: Strategy<S>,
 {
-    fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
+    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
         S::from_sql(bytes).map(|raw| raw.into())
     }
 }
@@ -122,7 +122,7 @@ where
     S: FromSql<T, DB> + ZeroizableSecret,
     I: Strategy<S>,
 {
-    fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
+    fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
         S::from_sql(bytes).map(|raw| raw.into())
     }
 }
diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index 1e384408397..7abbc3b77e4 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -514,6 +514,8 @@ Never share your secret api keys. Keep them guarded and secure.
     )),
     modifiers(&SecurityAddon)
 )]
+// Bypass clippy lint for not being constructed
+#[allow(dead_code)]
 pub struct ApiDoc;
 
 struct SecurityAddon;
diff --git a/crates/pm_auth/src/types.rs b/crates/pm_auth/src/types.rs
index 51fd796072b..d5c66b9c64a 100644
--- a/crates/pm_auth/src/types.rs
+++ b/crates/pm_auth/src/types.rs
@@ -110,12 +110,12 @@ pub type BankDetailsRouterData = PaymentAuthRouterData<
 >;
 
 pub type PaymentAuthLinkTokenType =
-    dyn self::api::ConnectorIntegration<LinkToken, LinkTokenRequest, LinkTokenResponse>;
+    dyn api::ConnectorIntegration<LinkToken, LinkTokenRequest, LinkTokenResponse>;
 
 pub type PaymentAuthExchangeTokenType =
-    dyn self::api::ConnectorIntegration<ExchangeToken, ExchangeTokenRequest, ExchangeTokenResponse>;
+    dyn api::ConnectorIntegration<ExchangeToken, ExchangeTokenRequest, ExchangeTokenResponse>;
 
-pub type PaymentAuthBankAccountDetailsType = dyn self::api::ConnectorIntegration<
+pub type PaymentAuthBankAccountDetailsType = dyn api::ConnectorIntegration<
     BankAccountCredentials,
     BankAccountCredentialsRequest,
     BankAccountCredentialsResponse,
diff --git a/crates/router/src/analytics.rs b/crates/router/src/analytics.rs
index d509cf03d3c..8eb94a29124 100644
--- a/crates/router/src/analytics.rs
+++ b/crates/router/src/analytics.rs
@@ -114,7 +114,7 @@ pub mod routes {
     pub async fn get_info(
         state: web::Data<AppState>,
         req: actix_web::HttpRequest,
-        domain: actix_web::web::Path<analytics::AnalyticsDomain>,
+        domain: web::Path<analytics::AnalyticsDomain>,
     ) -> impl Responder {
         let flow = AnalyticsFlow::GetInfo;
         Box::pin(api::server_wrap(
@@ -631,7 +631,7 @@ pub mod routes {
         state: web::Data<AppState>,
         req: actix_web::HttpRequest,
         json_payload: web::Json<GetSearchRequest>,
-        index: actix_web::web::Path<SearchIndex>,
+        index: web::Path<SearchIndex>,
     ) -> impl Responder {
         let flow = AnalyticsFlow::GetSearchResults;
         let indexed_req = GetSearchRequestWithIndex {
diff --git a/crates/router/src/bin/scheduler.rs b/crates/router/src/bin/scheduler.rs
index 47f41d8700f..5341a1b09c1 100644
--- a/crates/router/src/bin/scheduler.rs
+++ b/crates/router/src/bin/scheduler.rs
@@ -40,7 +40,7 @@ async fn main() -> CustomResult<(), ProcessTrackerError> {
             conf.proxy.clone(),
             services::proxy_bypass_urls(&conf.locker),
         )
-        .change_context(errors::ProcessTrackerError::ConfigurationError)?,
+        .change_context(ProcessTrackerError::ConfigurationError)?,
     );
     // channel for listening to redis disconnect events
     let (redis_shutdown_signal_tx, redis_shutdown_signal_rx) = oneshot::channel();
@@ -320,7 +320,7 @@ async fn start_scheduler(
         .conf
         .scheduler
         .clone()
-        .ok_or(errors::ProcessTrackerError::ConfigurationError)?;
+        .ok_or(ProcessTrackerError::ConfigurationError)?;
     scheduler::start_process_tracker(
         state,
         scheduler_flow,
diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rs
index eed80a1128e..3d5264ddbed 100644
--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs
@@ -649,7 +649,7 @@ fn from_timestamp_to_datetime(
             }
         })?;
 
-        Ok(Some(time::PrimitiveDateTime::new(time.date(), time.time())))
+        Ok(Some(PrimitiveDateTime::new(time.date(), time.time())))
     } else {
         Ok(None)
     }
@@ -744,7 +744,7 @@ impl ForeignTryFrom<(Option<MandateData>, Option<String>)> for Option<payments::
                         },
                     ))),
                 },
-                None => Some(api_models::payments::MandateType::MultiUse(Some(
+                None => Some(payments::MandateType::MultiUse(Some(
                     payments::MandateAmountData {
                         amount: mandate.amount.unwrap_or_default(),
                         currency,
diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs
index adc09fb55af..5b55ca8b0e3 100644
--- a/crates/router/src/configs/settings.rs
+++ b/crates/router/src/configs/settings.rs
@@ -200,7 +200,7 @@ pub struct ApplepayMerchantConfigs {
 #[derive(Debug, Deserialize, Clone, Default)]
 pub struct MultipleApiVersionSupportedConnectors {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub supported_connectors: HashSet<api_models::enums::Connector>,
+    pub supported_connectors: HashSet<enums::Connector>,
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
@@ -214,10 +214,10 @@ pub struct TempLockerEnableConfig(pub HashMap<String, TempLockerEnablePaymentMet
 #[derive(Debug, Deserialize, Clone, Default)]
 pub struct ConnectorCustomer {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub connector_list: HashSet<api_models::enums::Connector>,
+    pub connector_list: HashSet<enums::Connector>,
     #[cfg(feature = "payouts")]
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub payout_connector_list: HashSet<api_models::enums::PayoutConnectors>,
+    pub payout_connector_list: HashSet<enums::PayoutConnectors>,
 }
 
 #[cfg(feature = "dummy_connector")]
@@ -263,7 +263,7 @@ pub struct Mandates {
 #[derive(Debug, Deserialize, Clone, Default)]
 pub struct NetworkTransactionIdSupportedConnectors {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub connector_list: HashSet<api_models::enums::Connector>,
+    pub connector_list: HashSet<enums::Connector>,
 }
 
 #[derive(Debug, Deserialize, Clone)]
@@ -279,7 +279,7 @@ pub struct SupportedPaymentMethodTypesForMandate(
 #[derive(Debug, Deserialize, Clone)]
 pub struct SupportedConnectorsForMandate {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub connector_list: HashSet<api_models::enums::Connector>,
+    pub connector_list: HashSet<enums::Connector>,
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
@@ -322,9 +322,7 @@ pub enum PaymentMethodTypeTokenFilter {
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
-pub struct BankRedirectConfig(
-    pub HashMap<api_models::enums::PaymentMethodType, ConnectorBankNames>,
-);
+pub struct BankRedirectConfig(pub HashMap<enums::PaymentMethodType, ConnectorBankNames>);
 #[derive(Debug, Deserialize, Clone)]
 pub struct ConnectorBankNames(pub HashMap<String, BanksVector>);
 
@@ -345,17 +343,17 @@ pub struct PaymentMethodFilters(pub HashMap<PaymentMethodFilterKey, CurrencyCoun
 #[derive(Debug, Deserialize, Clone, PartialEq, Eq, Hash)]
 #[serde(untagged)]
 pub enum PaymentMethodFilterKey {
-    PaymentMethodType(api_models::enums::PaymentMethodType),
-    CardNetwork(api_models::enums::CardNetwork),
+    PaymentMethodType(enums::PaymentMethodType),
+    CardNetwork(enums::CardNetwork),
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
 #[serde(default)]
 pub struct CurrencyCountryFlowFilter {
     #[serde(deserialize_with = "deserialize_optional_hashset")]
-    pub currency: Option<HashSet<api_models::enums::Currency>>,
+    pub currency: Option<HashSet<enums::Currency>>,
     #[serde(deserialize_with = "deserialize_optional_hashset")]
-    pub country: Option<HashSet<api_models::enums::CountryAlpha2>>,
+    pub country: Option<HashSet<enums::CountryAlpha2>>,
     pub not_available_flows: Option<NotAvailableFlows>,
 }
 
@@ -628,13 +626,13 @@ pub struct ApiKeys {
 #[derive(Debug, Deserialize, Clone, Default)]
 pub struct DelayedSessionConfig {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub connectors_with_delayed_session_response: HashSet<api_models::enums::Connector>,
+    pub connectors_with_delayed_session_response: HashSet<enums::Connector>,
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
 pub struct WebhookSourceVerificationCall {
     #[serde(deserialize_with = "deserialize_hashset")]
-    pub connectors_with_webhook_source_verification_call: HashSet<api_models::enums::Connector>,
+    pub connectors_with_webhook_source_verification_call: HashSet<enums::Connector>,
 }
 
 #[derive(Debug, Deserialize, Clone, Default)]
diff --git a/crates/router/src/connector/aci/transformers.rs b/crates/router/src/connector/aci/transformers.rs
index 23288e3819d..9353b848bdb 100644
--- a/crates/router/src/connector/aci/transformers.rs
+++ b/crates/router/src/connector/aci/transformers.rs
@@ -22,20 +22,13 @@ pub struct AciRouterData<T> {
     router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for AciRouterData<T>
-{
+impl<T> TryFrom<(&types::api::CurrencyUnit, enums::Currency, i64, T)> for AciRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (currency_unit, currency, amount, item): (
             &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rs
index 6dfe899f2d1..77abaacf40b 100644
--- a/crates/router/src/connector/adyen/transformers.rs
+++ b/crates/router/src/connector/adyen/transformers.rs
@@ -1720,7 +1720,7 @@ fn get_amount_data(item: &AdyenRouterData<&types::PaymentsAuthorizeRouterData>)
 }
 
 fn get_address_info(
-    address: Option<&api_models::payments::Address>,
+    address: Option<&payments::Address>,
 ) -> Option<Result<Address, error_stack::Report<errors::ConnectorError>>> {
     address.and_then(|add| {
         add.address.as_ref().map(
@@ -1783,7 +1783,7 @@ fn get_telephone_number(item: &types::PaymentsAuthorizeRouterData) -> Option<Sec
     })
 }
 
-fn get_shopper_name(address: Option<&api_models::payments::Address>) -> Option<ShopperName> {
+fn get_shopper_name(address: Option<&payments::Address>) -> Option<ShopperName> {
     let billing = address.and_then(|billing| billing.address.as_ref());
     Some(ShopperName {
         first_name: billing.and_then(|a| a.first_name.clone()),
@@ -1791,9 +1791,7 @@ fn get_shopper_name(address: Option<&api_models::payments::Address>) -> Option<S
     })
 }
 
-fn get_country_code(
-    address: Option<&api_models::payments::Address>,
-) -> Option<api_enums::CountryAlpha2> {
+fn get_country_code(address: Option<&payments::Address>) -> Option<api_enums::CountryAlpha2> {
     address.and_then(|billing| billing.address.as_ref().and_then(|address| address.country))
 }
 
diff --git a/crates/router/src/connector/airwallex.rs b/crates/router/src/connector/airwallex.rs
index 91a27fc3df0..bdd842bf958 100644
--- a/crates/router/src/connector/airwallex.rs
+++ b/crates/router/src/connector/airwallex.rs
@@ -223,7 +223,7 @@ impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, t
         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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -312,7 +312,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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -442,7 +442,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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -523,7 +523,7 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
         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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -614,7 +614,7 @@ impl
             .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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -703,7 +703,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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -779,7 +779,7 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
             .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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -892,7 +892,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
             .change_context(errors::ConnectorError::RequestEncodingFailed)?;
         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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -965,7 +965,7 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
             .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(types::ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
diff --git a/crates/router/src/connector/airwallex/transformers.rs b/crates/router/src/connector/airwallex/transformers.rs
index e80909d7e01..fe0cd021ebc 100644
--- a/crates/router/src/connector/airwallex/transformers.rs
+++ b/crates/router/src/connector/airwallex/transformers.rs
@@ -59,20 +59,13 @@ pub struct AirwallexRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for AirwallexRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for AirwallexRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (currency_unit, currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/authorizedotnet.rs b/crates/router/src/connector/authorizedotnet.rs
index 7f9cdc376e1..2ca78e630fa 100644
--- a/crates/router/src/connector/authorizedotnet.rs
+++ b/crates/router/src/connector/authorizedotnet.rs
@@ -39,8 +39,7 @@ where
         &self,
         _req: &types::RouterData<Flow, Request, Response>,
         _connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
         Ok(vec![(
             headers::CONTENT_TYPE.to_string(),
             self.get_content_type().to_string().into(),
diff --git a/crates/router/src/connector/authorizedotnet/transformers.rs b/crates/router/src/connector/authorizedotnet/transformers.rs
index a072fcf3214..ca8b13298b0 100644
--- a/crates/router/src/connector/authorizedotnet/transformers.rs
+++ b/crates/router/src/connector/authorizedotnet/transformers.rs
@@ -46,22 +46,10 @@ pub struct AuthorizedotnetRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for AuthorizedotnetRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for AuthorizedotnetRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_f64(currency_unit, amount, currency)?;
         Ok(Self {
diff --git a/crates/router/src/connector/bambora/transformers.rs b/crates/router/src/connector/bambora/transformers.rs
index dbb655c6ca0..77c91af709d 100644
--- a/crates/router/src/connector/bambora/transformers.rs
+++ b/crates/router/src/connector/bambora/transformers.rs
@@ -20,22 +20,10 @@ pub struct BamboraRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BamboraRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BamboraRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = crate::connector::utils::get_amount_as_f64(currency_unit, amount, currency)?;
         Ok(Self {
diff --git a/crates/router/src/connector/bankofamerica.rs b/crates/router/src/connector/bankofamerica.rs
index 0c01facf386..e5ddd3743b9 100644
--- a/crates/router/src/connector/bankofamerica.rs
+++ b/crates/router/src/connector/bankofamerica.rs
@@ -120,8 +120,7 @@ where
         &self,
         req: &types::RouterData<Flow, Request, Response>,
         connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::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();
diff --git a/crates/router/src/connector/bankofamerica/transformers.rs b/crates/router/src/connector/bankofamerica/transformers.rs
index efece7f61fb..2d7b2307039 100644
--- a/crates/router/src/connector/bankofamerica/transformers.rs
+++ b/crates/router/src/connector/bankofamerica/transformers.rs
@@ -58,22 +58,10 @@ pub struct BankOfAmericaRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BankOfAmericaRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BankOfAmericaRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
         Ok(Self {
@@ -602,7 +590,7 @@ impl
                     merchant_intitiated_transaction: Some(MerchantInitiatedTransaction {
                         reason: None,
                         original_authorized_amount: Some(utils::get_amount_as_string(
-                            &types::api::CurrencyUnit::Base,
+                            &api::CurrencyUnit::Base,
                             original_amount,
                             original_currency,
                         )?),
diff --git a/crates/router/src/connector/billwerk/transformers.rs b/crates/router/src/connector/billwerk/transformers.rs
index 4e91a2c9ffb..3e5e53286e3 100644
--- a/crates/router/src/connector/billwerk/transformers.rs
+++ b/crates/router/src/connector/billwerk/transformers.rs
@@ -14,22 +14,10 @@ pub struct BillwerkRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BillwerkRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BillwerkRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
diff --git a/crates/router/src/connector/bitpay/transformers.rs b/crates/router/src/connector/bitpay/transformers.rs
index 74fa0b5c595..a70c4ba3ac2 100644
--- a/crates/router/src/connector/bitpay/transformers.rs
+++ b/crates/router/src/connector/bitpay/transformers.rs
@@ -15,20 +15,13 @@ pub struct BitpayRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BitpayRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BitpayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (_currency_unit, _currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
@@ -81,7 +74,7 @@ impl TryFrom<&ConnectorAuthType> for BitpayAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
         match auth_type {
-            types::ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
+            ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
                 api_key: api_key.to_owned(),
             }),
             _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),
diff --git a/crates/router/src/connector/bluesnap/transformers.rs b/crates/router/src/connector/bluesnap/transformers.rs
index 2a572a2231a..0630fef2748 100644
--- a/crates/router/src/connector/bluesnap/transformers.rs
+++ b/crates/router/src/connector/bluesnap/transformers.rs
@@ -36,22 +36,10 @@ pub struct BluesnapRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BluesnapRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BluesnapRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
         Ok(Self {
@@ -150,7 +138,7 @@ pub struct BluesnapGooglePayObject {
 #[derive(Debug, Serialize)]
 #[serde(rename_all = "camelCase")]
 pub struct BluesnapApplePayObject {
-    token: api_models::payments::ApplePayWalletData,
+    token: payments::ApplePayWalletData,
 }
 
 #[derive(Debug, Serialize)]
@@ -447,23 +435,19 @@ impl TryFrom<&types::PaymentsSessionRouterData> for BluesnapCreateWalletToken {
         let apple_pay_metadata = item.get_connector_meta()?.expose();
         let applepay_metadata = apple_pay_metadata
             .clone()
-            .parse_value::<api_models::payments::ApplepayCombinedSessionTokenData>(
+            .parse_value::<payments::ApplepayCombinedSessionTokenData>(
                 "ApplepayCombinedSessionTokenData",
             )
             .map(|combined_metadata| {
-                api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(
+                payments::ApplepaySessionTokenMetadata::ApplePayCombined(
                     combined_metadata.apple_pay_combined,
                 )
             })
             .or_else(|_| {
                 apple_pay_metadata
-                    .parse_value::<api_models::payments::ApplepaySessionTokenData>(
-                        "ApplepaySessionTokenData",
-                    )
+                    .parse_value::<payments::ApplepaySessionTokenData>("ApplepaySessionTokenData")
                     .map(|old_metadata| {
-                        api_models::payments::ApplepaySessionTokenMetadata::ApplePay(
-                            old_metadata.apple_pay,
-                        )
+                        payments::ApplepaySessionTokenMetadata::ApplePay(old_metadata.apple_pay)
                     })
             })
             .change_context(errors::ConnectorError::ParsingFailed)?;
@@ -500,31 +484,26 @@ impl TryFrom<types::PaymentsSessionResponseRouterData<BluesnapWalletTokenRespons
             .decode(response.wallet_token.clone().expose())
             .change_context(errors::ConnectorError::ResponseHandlingFailed)?;
 
-        let session_response: api_models::payments::NoThirdPartySdkSessionResponse =
-            wallet_token[..]
-                .parse_struct("NoThirdPartySdkSessionResponse")
-                .change_context(errors::ConnectorError::ParsingFailed)?;
+        let session_response: payments::NoThirdPartySdkSessionResponse = wallet_token
+            .parse_struct("NoThirdPartySdkSessionResponse")
+            .change_context(errors::ConnectorError::ParsingFailed)?;
 
         let metadata = item.data.get_connector_meta()?.expose();
         let applepay_metadata = metadata
             .clone()
-            .parse_value::<api_models::payments::ApplepayCombinedSessionTokenData>(
+            .parse_value::<payments::ApplepayCombinedSessionTokenData>(
                 "ApplepayCombinedSessionTokenData",
             )
             .map(|combined_metadata| {
-                api_models::payments::ApplepaySessionTokenMetadata::ApplePayCombined(
+                payments::ApplepaySessionTokenMetadata::ApplePayCombined(
                     combined_metadata.apple_pay_combined,
                 )
             })
             .or_else(|_| {
                 metadata
-                    .parse_value::<api_models::payments::ApplepaySessionTokenData>(
-                        "ApplepaySessionTokenData",
-                    )
+                    .parse_value::<payments::ApplepaySessionTokenData>("ApplepaySessionTokenData")
                     .map(|old_metadata| {
-                        api_models::payments::ApplepaySessionTokenMetadata::ApplePay(
-                            old_metadata.apple_pay,
-                        )
+                        payments::ApplepaySessionTokenMetadata::ApplePay(old_metadata.apple_pay)
                     })
             })
             .change_context(errors::ConnectorError::ParsingFailed)?;
@@ -543,16 +522,15 @@ impl TryFrom<types::PaymentsSessionResponseRouterData<BluesnapWalletTokenRespons
 
         Ok(Self {
             response: Ok(types::PaymentsResponseData::SessionResponse {
-                session_token: types::api::SessionToken::ApplePay(Box::new(
-                    api_models::payments::ApplepaySessionTokenResponse {
-                        session_token_data:
-                            api_models::payments::ApplePaySessionResponse::NoThirdPartySdk(
-                                session_response,
-                            ),
-                        payment_request_data: Some(api_models::payments::ApplePayPaymentRequest {
+                session_token: api::SessionToken::ApplePay(Box::new(
+                    payments::ApplepaySessionTokenResponse {
+                        session_token_data: payments::ApplePaySessionResponse::NoThirdPartySdk(
+                            session_response,
+                        ),
+                        payment_request_data: Some(payments::ApplePayPaymentRequest {
                             country_code: item.data.get_billing_country()?,
                             currency_code: item.data.request.currency,
-                            total: api_models::payments::AmountInfo {
+                            total: payments::AmountInfo {
                                 label: payment_request_data.label,
                                 total_type: Some("final".to_string()),
                                 amount: item.data.request.amount.to_string(),
diff --git a/crates/router/src/connector/boku/transformers.rs b/crates/router/src/connector/boku/transformers.rs
index 07b48a5353c..c22b6567732 100644
--- a/crates/router/src/connector/boku/transformers.rs
+++ b/crates/router/src/connector/boku/transformers.rs
@@ -295,7 +295,7 @@ fn get_authorize_response(
     let redirection_data = match response.hosted {
         Some(hosted_value) => Ok(hosted_value
             .redirect_url
-            .map(|url| services::RedirectForm::from((url, services::Method::Get)))),
+            .map(|url| RedirectForm::from((url, services::Method::Get)))),
         None => Err(errors::ConnectorError::MissingConnectorRedirectionPayload {
             field_name: "redirect_url",
         }),
diff --git a/crates/router/src/connector/braintree.rs b/crates/router/src/connector/braintree.rs
index 1b55f12cab1..f7e142a9af9 100644
--- a/crates/router/src/connector/braintree.rs
+++ b/crates/router/src/connector/braintree.rs
@@ -1467,10 +1467,8 @@ impl api::IncomingWebhook for Braintree {
 
         match response.dispute {
             Some(dispute_data) => {
-                let currency = diesel_models::enums::Currency::from_str(
-                    dispute_data.currency_iso_code.as_str(),
-                )
-                .change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
+                let currency = enums::Currency::from_str(dispute_data.currency_iso_code.as_str())
+                    .change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
                 Ok(api::disputes::DisputePayload {
                     amount: connector_utils::to_currency_lower_unit(
                         dispute_data.amount_disputed.to_string(),
diff --git a/crates/router/src/connector/braintree/braintree_graphql_transformers.rs b/crates/router/src/connector/braintree/braintree_graphql_transformers.rs
index 480867c6cbd..bd860e72900 100644
--- a/crates/router/src/connector/braintree/braintree_graphql_transformers.rs
+++ b/crates/router/src/connector/braintree/braintree_graphql_transformers.rs
@@ -27,22 +27,10 @@ pub struct BraintreeRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for BraintreeRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for BraintreeRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
         Ok(Self {
@@ -80,7 +68,7 @@ pub enum BraintreePaymentsRequest {
 #[derive(Debug, Deserialize)]
 pub struct BraintreeMeta {
     merchant_account_id: Secret<String>,
-    merchant_config_currency: types::storage::enums::Currency,
+    merchant_config_currency: enums::Currency,
 }
 
 impl TryFrom<&Option<pii::SecretSerdeValue>> for BraintreeMeta {
diff --git a/crates/router/src/connector/braintree/transformers.rs b/crates/router/src/connector/braintree/transformers.rs
index ef111a2588a..e278ff40b43 100644
--- a/crates/router/src/connector/braintree/transformers.rs
+++ b/crates/router/src/connector/braintree/transformers.rs
@@ -21,7 +21,7 @@ pub struct PaymentOptions {
 #[derive(Debug, Deserialize)]
 pub struct BraintreeMeta {
     merchant_account_id: Option<Secret<String>>,
-    merchant_config_currency: Option<types::storage::enums::Currency>,
+    merchant_config_currency: Option<enums::Currency>,
 }
 
 #[derive(Debug, Serialize, Eq, PartialEq)]
@@ -304,7 +304,7 @@ impl<F, T>
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             response: Ok(types::PaymentsResponseData::SessionResponse {
-                session_token: types::api::SessionToken::Paypal(Box::new(
+                session_token: api::SessionToken::Paypal(Box::new(
                     payments::PaypalSessionTokenResponse {
                         session_token: item.response.client_token.value.expose(),
                     },
diff --git a/crates/router/src/connector/cashtocode/transformers.rs b/crates/router/src/connector/cashtocode/transformers.rs
index 525b19df001..f8c275df33b 100644
--- a/crates/router/src/connector/cashtocode/transformers.rs
+++ b/crates/router/src/connector/cashtocode/transformers.rs
@@ -203,13 +203,13 @@ fn get_redirect_form_data(
         enums::PaymentMethodType::ClassicReward => Ok(services::RedirectForm::Form {
             //redirect form is manually constructed because the connector for this pm type expects query params in the url
             endpoint: response_data.pay_url.to_string(),
-            method: services::Method::Post,
+            method: Method::Post,
             form_fields: Default::default(),
         }),
         enums::PaymentMethodType::Evoucher => Ok(services::RedirectForm::from((
             //here the pay url gets parsed, and query params are sent as formfields as the connector expects
             response_data.pay_url,
-            services::Method::Get,
+            Method::Get,
         ))),
         _ => Err(errors::ConnectorError::NotImplemented(
             utils::get_unimplemented_payment_method_error_message("CashToCode"),
diff --git a/crates/router/src/connector/checkout/transformers.rs b/crates/router/src/connector/checkout/transformers.rs
index 3fff6d940d6..cc937c0ef60 100644
--- a/crates/router/src/connector/checkout/transformers.rs
+++ b/crates/router/src/connector/checkout/transformers.rs
@@ -23,22 +23,10 @@ pub struct CheckoutRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for CheckoutRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for CheckoutRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
diff --git a/crates/router/src/connector/coinbase.rs b/crates/router/src/connector/coinbase.rs
index 8bfbe8b695a..497cf81918e 100644
--- a/crates/router/src/connector/coinbase.rs
+++ b/crates/router/src/connector/coinbase.rs
@@ -52,8 +52,7 @@ where
         &self,
         req: &types::RouterData<Flow, Request, Response>,
         _connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
         let mut header = vec![
             (
                 headers::CONTENT_TYPE.to_string(),
diff --git a/crates/router/src/connector/cryptopay/transformers.rs b/crates/router/src/connector/cryptopay/transformers.rs
index b8f398a0d96..baea07faa60 100644
--- a/crates/router/src/connector/cryptopay/transformers.rs
+++ b/crates/router/src/connector/cryptopay/transformers.rs
@@ -19,19 +19,12 @@ pub struct CryptopayRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for CryptopayRouterData<T>
-{
+impl<T> TryFrom<(&types::api::CurrencyUnit, enums::Currency, i64, T)> for CryptopayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (currency_unit, currency, amount, item): (
             &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/cybersource.rs b/crates/router/src/connector/cybersource.rs
index d93a9405ae3..1a85498ad06 100644
--- a/crates/router/src/connector/cybersource.rs
+++ b/crates/router/src/connector/cybersource.rs
@@ -233,8 +233,7 @@ where
         &self,
         req: &types::RouterData<Flow, Request, Response>,
         connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::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)?;
@@ -740,8 +739,7 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
         &self,
         req: &types::PaymentsSyncRouterData,
         connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -837,12 +835,12 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         {
             Ok(format!(
                 "{}risk/v1/authentication-setups",
-                api::ConnectorCommon::base_url(self, connectors)
+                ConnectorCommon::base_url(self, connectors)
             ))
         } else {
             Ok(format!(
                 "{}pts/v2/payments/",
-                api::ConnectorCommon::base_url(self, connectors)
+                ConnectorCommon::base_url(self, connectors)
             ))
         }
     }
@@ -1111,7 +1109,7 @@ impl
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}pts/v2/payments/",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
     fn get_request_body(
diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs
index 8251de8ca31..545ee672ed9 100644
--- a/crates/router/src/connector/cybersource/transformers.rs
+++ b/crates/router/src/connector/cybersource/transformers.rs
@@ -38,22 +38,10 @@ pub struct CybersourceRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for CybersourceRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for CybersourceRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         // This conversion function is used at different places in the file, if updating this, keep a check for those
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
@@ -570,7 +558,7 @@ impl
                 .clone()
                 .and_then(|mandate_id| mandate_id.mandate_reference_id)
             {
-                Some(api_models::payments::MandateReferenceId::ConnectorMandateId(_)) => {
+                Some(payments::MandateReferenceId::ConnectorMandateId(_)) => {
                     let original_amount = item
                         .router_data
                         .get_recurring_mandate_payment_data()?
@@ -587,7 +575,7 @@ impl
                             merchant_intitiated_transaction: Some(MerchantInitiatedTransaction {
                                 reason: None,
                                 original_authorized_amount: Some(utils::get_amount_as_string(
-                                    &types::api::CurrencyUnit::Base,
+                                    &api::CurrencyUnit::Base,
                                     original_amount,
                                     original_currency,
                                 )?),
@@ -596,9 +584,7 @@ impl
                         }),
                     )
                 }
-                Some(api_models::payments::MandateReferenceId::NetworkMandateId(
-                    network_transaction_id,
-                )) => {
+                Some(payments::MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
                     let (original_amount, original_currency) = match network
                         .clone()
                         .map(|network| network.to_lowercase())
diff --git a/crates/router/src/connector/dlocal.rs b/crates/router/src/connector/dlocal.rs
index c92c6b8b854..dc99619e9da 100644
--- a/crates/router/src/connector/dlocal.rs
+++ b/crates/router/src/connector/dlocal.rs
@@ -56,8 +56,7 @@ where
         &self,
         req: &types::RouterData<Flow, Request, Response>,
         connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, services::request::Maskable<String>)>, errors::ConnectorError>
-    {
+    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
         let dlocal_req = self.get_request_body(req, connectors)?;
 
         let date = date_time::date_as_yyyymmddthhmmssmmmz()
diff --git a/crates/router/src/connector/dlocal/transformers.rs b/crates/router/src/connector/dlocal/transformers.rs
index 14337ca0765..c073dc03cc9 100644
--- a/crates/router/src/connector/dlocal/transformers.rs
+++ b/crates/router/src/connector/dlocal/transformers.rs
@@ -57,20 +57,13 @@ pub struct DlocalRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for DlocalRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for DlocalRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (_currency_unit, _currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/fiserv/transformers.rs b/crates/router/src/connector/fiserv/transformers.rs
index fcb808c6700..3d40876c353 100644
--- a/crates/router/src/connector/fiserv/transformers.rs
+++ b/crates/router/src/connector/fiserv/transformers.rs
@@ -18,20 +18,13 @@ pub struct FiservRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for FiservRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for FiservRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (currency_unit, currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/globalpay/transformers.rs b/crates/router/src/connector/globalpay/transformers.rs
index cfb822715bf..478da2cf902 100644
--- a/crates/router/src/connector/globalpay/transformers.rs
+++ b/crates/router/src/connector/globalpay/transformers.rs
@@ -269,7 +269,7 @@ impl<F, T>
             })
             .transpose()?;
         let redirection_data =
-            redirect_url.map(|url| services::RedirectForm::from((url, services::Method::Get)));
+            redirect_url.map(|url| RedirectForm::from((url, services::Method::Get)));
         Ok(Self {
             status,
             response: get_payment_response(status, item.response, redirection_data),
@@ -434,8 +434,8 @@ fn get_mandate_details(item: &types::PaymentsAuthorizeRouterData) -> Result<Mand
             Some(StoredCredential {
                 model: Some(requests::Model::Recurring),
                 sequence: Some(match connector_mandate_id.is_some() {
-                    true => requests::Sequence::Subsequent,
-                    false => requests::Sequence::First,
+                    true => Sequence::Subsequent,
+                    false => Sequence::First,
                 }),
             }),
             connector_mandate_id,
diff --git a/crates/router/src/connector/gocardless/transformers.rs b/crates/router/src/connector/gocardless/transformers.rs
index 59177307f22..e05f1b469ac 100644
--- a/crates/router/src/connector/gocardless/transformers.rs
+++ b/crates/router/src/connector/gocardless/transformers.rs
@@ -24,22 +24,10 @@ pub struct GocardlessRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for GocardlessRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for GocardlessRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
@@ -736,7 +724,7 @@ impl<F>
         Ok(Self {
             status: enums::AttemptStatus::from(item.response.payments.status),
             response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.payments.id),
+                resource_id: ResponseId::ConnectorTransactionId(item.response.payments.id),
                 redirection_data: None,
                 mandate_reference: Some(mandate_reference),
                 connector_metadata: None,
@@ -771,7 +759,7 @@ impl<F>
         Ok(Self {
             status: enums::AttemptStatus::from(item.response.payments.status),
             response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.payments.id),
+                resource_id: ResponseId::ConnectorTransactionId(item.response.payments.id),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
diff --git a/crates/router/src/connector/helcim/transformers.rs b/crates/router/src/connector/helcim/transformers.rs
index 2dc44c8a19b..655d8a8663b 100644
--- a/crates/router/src/connector/helcim/transformers.rs
+++ b/crates/router/src/connector/helcim/transformers.rs
@@ -19,22 +19,10 @@ pub struct HelcimRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for HelcimRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for HelcimRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_f64(currency_unit, amount, currency)?;
         Ok(Self {
@@ -45,9 +33,9 @@ impl<T>
 }
 
 pub fn check_currency(
-    currency: types::storage::enums::Currency,
-) -> Result<types::storage::enums::Currency, errors::ConnectorError> {
-    if currency == types::storage::enums::Currency::USD {
+    currency: enums::Currency,
+) -> Result<enums::Currency, errors::ConnectorError> {
+    if currency == enums::Currency::USD {
         Ok(currency)
     } else {
         Err(errors::ConnectorError::NotSupported {
diff --git a/crates/router/src/connector/iatapay/transformers.rs b/crates/router/src/connector/iatapay/transformers.rs
index 8e45b96e69c..bce25a76429 100644
--- a/crates/router/src/connector/iatapay/transformers.rs
+++ b/crates/router/src/connector/iatapay/transformers.rs
@@ -37,22 +37,10 @@ pub struct IatapayRouterData<T> {
     amount: f64,
     router_data: T,
 }
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for IatapayRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for IatapayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount: connector_util::get_amount_as_f64(currency_unit, amount, currency)?,
@@ -114,7 +102,7 @@ impl
     TryFrom<
         &IatapayRouterData<
             &types::RouterData<
-                types::api::payments::Authorize,
+                api::payments::Authorize,
                 PaymentsAuthorizeData,
                 types::PaymentsResponseData,
             >,
@@ -126,7 +114,7 @@ impl
     fn try_from(
         item: &IatapayRouterData<
             &types::RouterData<
-                types::api::payments::Authorize,
+                api::payments::Authorize,
                 PaymentsAuthorizeData,
                 types::PaymentsResponseData,
             >,
diff --git a/crates/router/src/connector/klarna/transformers.rs b/crates/router/src/connector/klarna/transformers.rs
index 29dccfbf32b..db77b9c30cd 100644
--- a/crates/router/src/connector/klarna/transformers.rs
+++ b/crates/router/src/connector/klarna/transformers.rs
@@ -14,20 +14,13 @@ pub struct KlarnaRouterData<T> {
     router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for KlarnaRouterData<T>
-{
+impl<T> TryFrom<(&types::api::CurrencyUnit, enums::Currency, i64, T)> for KlarnaRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (_currency_unit, _currency, amount, router_data): (
             &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/multisafepay/transformers.rs b/crates/router/src/connector/multisafepay/transformers.rs
index 850bd058e41..f993928d94f 100644
--- a/crates/router/src/connector/multisafepay/transformers.rs
+++ b/crates/router/src/connector/multisafepay/transformers.rs
@@ -20,23 +20,11 @@ pub struct MultisafepayRouterData<T> {
     router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for MultisafepayRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for MultisafepayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
@@ -677,9 +665,8 @@ impl<F, T>
                     MultisafepayPaymentStatus::Declined
                 };
 
-                let status = enums::AttemptStatus::from(
-                    payment_response.data.status.unwrap_or(default_status),
-                );
+                let status =
+                    AttemptStatus::from(payment_response.data.status.unwrap_or(default_status));
 
                 Ok(Self {
                     status,
diff --git a/crates/router/src/connector/netcetera/transformers.rs b/crates/router/src/connector/netcetera/transformers.rs
index 7c95578bfd6..4bf61ce1ca4 100644
--- a/crates/router/src/connector/netcetera/transformers.rs
+++ b/crates/router/src/connector/netcetera/transformers.rs
@@ -16,18 +16,13 @@ pub struct NetceteraRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for NetceteraRouterData<T>
+impl<T> TryFrom<(&api::CurrencyUnit, types::storage::enums::Currency, i64, T)>
+    for NetceteraRouterData<T>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
+            &api::CurrencyUnit,
             types::storage::enums::Currency,
             i64,
             T,
diff --git a/crates/router/src/connector/nexinets.rs b/crates/router/src/connector/nexinets.rs
index 1370fcf11cd..88aa149a267 100644
--- a/crates/router/src/connector/nexinets.rs
+++ b/crates/router/src/connector/nexinets.rs
@@ -120,7 +120,7 @@ impl ConnectorCommon for Nexinets {
             if !field.is_empty() {
                 msg.push_str(format!("{} : {}", field, error.message).as_str());
             } else {
-                msg = error.message.to_owned();
+                error.message.clone_into(&mut msg)
             }
             if message.is_empty() {
                 message.push_str(&msg);
diff --git a/crates/router/src/connector/nmi/transformers.rs b/crates/router/src/connector/nmi/transformers.rs
index ea61782d498..fdc65963fe8 100644
--- a/crates/router/src/connector/nmi/transformers.rs
+++ b/crates/router/src/connector/nmi/transformers.rs
@@ -42,11 +42,11 @@ impl TryFrom<&ConnectorAuthType> for NmiAuthType {
     type Error = Error;
     fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
         match auth_type {
-            types::ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
+            ConnectorAuthType::HeaderKey { api_key } => Ok(Self {
                 api_key: api_key.to_owned(),
                 public_key: None,
             }),
-            types::ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self {
+            ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self {
                 api_key: api_key.to_owned(),
                 public_key: Some(key1.to_owned()),
             }),
@@ -61,20 +61,13 @@ pub struct NmiRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for NmiRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for NmiRouterData<T> {
     type Error = Report<errors::ConnectorError>;
 
     fn try_from(
         (_currency_unit, currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/nuvei.rs b/crates/router/src/connector/nuvei.rs
index aa4157a68d8..d08820266c3 100644
--- a/crates/router/src/connector/nuvei.rs
+++ b/crates/router/src/connector/nuvei.rs
@@ -161,7 +161,7 @@ impl
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/payment.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
     fn get_request_body(
@@ -248,7 +248,7 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/voidTransaction.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -334,7 +334,7 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/getPaymentStatus.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -417,7 +417,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/settleTransaction.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -509,7 +509,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/payment.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -671,7 +671,7 @@ impl
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/getSessionToken.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -756,7 +756,7 @@ impl ConnectorIntegration<InitPayment, types::PaymentsAuthorizeData, types::Paym
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/initPayment.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -839,7 +839,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}ppp/api/v1/refundTransaction.do",
-            api::ConnectorCommon::base_url(self, connectors)
+            ConnectorCommon::base_url(self, connectors)
         ))
     }
 
@@ -954,7 +954,7 @@ impl api::IncomingWebhook for Nuvei {
             serde_urlencoded::from_str::<nuvei::NuveiWebhookTransactionId>(&request.query_params)
                 .change_context(errors::ConnectorError::WebhookBodyDecodingFailed)?;
         Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
-            types::api::PaymentIdType::ConnectorTransactionId(body.ppp_transaction_id),
+            api::PaymentIdType::ConnectorTransactionId(body.ppp_transaction_id),
         ))
     }
 
diff --git a/crates/router/src/connector/opennode/transformers.rs b/crates/router/src/connector/opennode/transformers.rs
index 3267caf60d6..09da5fc8f94 100644
--- a/crates/router/src/connector/opennode/transformers.rs
+++ b/crates/router/src/connector/opennode/transformers.rs
@@ -16,20 +16,13 @@ pub struct OpennodeRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for OpennodeRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for OpennodeRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (_currency_unit, _currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/payeezy/transformers.rs b/crates/router/src/connector/payeezy/transformers.rs
index 0ceed1390be..a8442f7ea8a 100644
--- a/crates/router/src/connector/payeezy/transformers.rs
+++ b/crates/router/src/connector/payeezy/transformers.rs
@@ -15,20 +15,13 @@ pub struct PayeezyRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for PayeezyRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for PayeezyRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
         (currency_unit, currency, amount, router_data): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            &api::CurrencyUnit,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/connector/payme/transformers.rs b/crates/router/src/connector/payme/transformers.rs
index 7f5e30402d6..0b3f4fb48ce 100644
--- a/crates/router/src/connector/payme/transformers.rs
+++ b/crates/router/src/connector/payme/transformers.rs
@@ -29,22 +29,10 @@ pub struct PaymeRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for PaymeRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for PaymeRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
@@ -630,7 +618,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PayRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> {
         match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(req_card) => {
+            PaymentMethodData::Card(req_card) => {
                 let card = PaymeCard {
                     credit_card_cvv: req_card.card_cvc.clone(),
                     credit_card_exp: req_card
@@ -652,23 +640,21 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PayRequest {
                     language: LANGUAGE.to_string(),
                 })
             }
-            domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::Wallet(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::CardToken(_) => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("payme"),
-                ))?
-            }
+            PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::Wallet(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::CardToken(_) => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("payme"),
+            ))?,
         }
     }
 }
@@ -681,7 +667,7 @@ impl TryFrom<&types::PaymentsCompleteAuthorizeRouterData> for Pay3dsRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(item: &types::PaymentsCompleteAuthorizeRouterData) -> Result<Self, Self::Error> {
         match item.request.payment_method_data.clone() {
-            Some(domain::PaymentMethodData::Card(_)) => {
+            Some(PaymentMethodData::Card(_)) => {
                 let buyer_email = item.request.get_email()?;
                 let buyer_name = item.get_billing_address()?.get_full_name()?;
 
@@ -712,19 +698,19 @@ impl TryFrom<&types::PaymentsCompleteAuthorizeRouterData> for Pay3dsRequest {
                     meta_data_jwt: Secret::new(jwt_data.meta_data),
                 })
             }
-            Some(domain::PaymentMethodData::CardRedirect(_))
-            | Some(domain::PaymentMethodData::Wallet(_))
-            | Some(domain::PaymentMethodData::PayLater(_))
-            | Some(domain::PaymentMethodData::BankRedirect(_))
-            | Some(domain::PaymentMethodData::BankDebit(_))
-            | Some(domain::PaymentMethodData::BankTransfer(_))
-            | Some(domain::PaymentMethodData::Crypto(_))
-            | Some(domain::PaymentMethodData::MandatePayment)
-            | Some(domain::PaymentMethodData::Reward)
-            | Some(domain::PaymentMethodData::Upi(_))
-            | Some(domain::PaymentMethodData::Voucher(_))
-            | Some(domain::PaymentMethodData::GiftCard(_))
-            | Some(domain::PaymentMethodData::CardToken(_))
+            Some(PaymentMethodData::CardRedirect(_))
+            | Some(PaymentMethodData::Wallet(_))
+            | Some(PaymentMethodData::PayLater(_))
+            | Some(PaymentMethodData::BankRedirect(_))
+            | Some(PaymentMethodData::BankDebit(_))
+            | Some(PaymentMethodData::BankTransfer(_))
+            | Some(PaymentMethodData::Crypto(_))
+            | Some(PaymentMethodData::MandatePayment)
+            | Some(PaymentMethodData::Reward)
+            | Some(PaymentMethodData::Upi(_))
+            | Some(PaymentMethodData::Voucher(_))
+            | Some(PaymentMethodData::GiftCard(_))
+            | Some(PaymentMethodData::CardToken(_))
             | None => {
                 Err(errors::ConnectorError::NotImplemented("Tokenize Flow".to_string()).into())
             }
@@ -736,7 +722,7 @@ impl TryFrom<&types::TokenizationRouterData> for CaptureBuyerRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(item: &types::TokenizationRouterData) -> Result<Self, Self::Error> {
         match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(req_card) => {
+            PaymentMethodData::Card(req_card) => {
                 let seller_payme_id =
                     PaymeAuthType::try_from(&item.connector_auth_type)?.seller_payme_id;
                 let card = PaymeCard {
@@ -750,19 +736,19 @@ impl TryFrom<&types::TokenizationRouterData> for CaptureBuyerRequest {
                     seller_payme_id,
                 })
             }
-            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::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::CardToken(_) => {
+            PaymentMethodData::Wallet(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::CardToken(_) => {
                 Err(errors::ConnectorError::NotImplemented("Tokenize Flow".to_string()).into())
             }
         }
@@ -1151,14 +1137,14 @@ impl<F, T>
 
 fn get_services(item: &types::PaymentsPreProcessingRouterData) -> Option<ThreeDs> {
     match item.auth_type {
-        api_models::enums::AuthenticationType::ThreeDs => {
+        AuthenticationType::ThreeDs => {
             let settings = ThreeDsSettings { active: true };
             Some(ThreeDs {
                 name: ThreeDsType::ThreeDs,
                 settings,
             })
         }
-        api_models::enums::AuthenticationType::NoThreeDs => None,
+        AuthenticationType::NoThreeDs => None,
     }
 }
 
diff --git a/crates/router/src/connector/paypal.rs b/crates/router/src/connector/paypal.rs
index 63912391787..cf81fec6341 100644
--- a/crates/router/src/connector/paypal.rs
+++ b/crates/router/src/connector/paypal.rs
@@ -960,8 +960,7 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     ) -> CustomResult<String, errors::ConnectorError> {
         let paypal_meta: PaypalMeta = to_connector_meta(req.request.connector_meta.clone())?;
         match req.payment_method {
-            diesel_models::enums::PaymentMethod::Wallet
-            | diesel_models::enums::PaymentMethod::BankRedirect => Ok(format!(
+            enums::PaymentMethod::Wallet | enums::PaymentMethod::BankRedirect => Ok(format!(
                 "{}v2/checkout/orders/{}",
                 self.base_url(connectors),
                 req.request
@@ -1633,9 +1632,9 @@ impl services::ConnectorRedirectResponse for Paypal {
         action: PaymentAction,
     ) -> CustomResult<payments::CallConnectorAction, errors::ConnectorError> {
         match action {
-            services::PaymentAction::PSync
-            | services::PaymentAction::CompleteAuthorize
-            | services::PaymentAction::PaymentAuthenticateCompleteAuthorize => {
+            PaymentAction::PSync
+            | PaymentAction::CompleteAuthorize
+            | PaymentAction::PaymentAuthenticateCompleteAuthorize => {
                 Ok(payments::CallConnectorAction::Trigger)
             }
         }
diff --git a/crates/router/src/connector/paypal/transformers.rs b/crates/router/src/connector/paypal/transformers.rs
index 21b0f04af86..338b8c5ba4e 100644
--- a/crates/router/src/connector/paypal/transformers.rs
+++ b/crates/router/src/connector/paypal/transformers.rs
@@ -29,18 +29,13 @@ pub struct PaypalRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for PaypalRouterData<T>
+impl<T> TryFrom<(&api::CurrencyUnit, types::storage::enums::Currency, i64, T)>
+    for PaypalRouterData<T>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
+            &api::CurrencyUnit,
             types::storage::enums::Currency,
             i64,
             T,
@@ -153,7 +148,7 @@ impl From<&PaypalRouterData<&types::PaymentsAuthorizeRouterData>> for ItemDetail
 pub struct Address {
     address_line_1: Option<Secret<String>>,
     postal_code: Option<Secret<String>>,
-    country_code: api_models::enums::CountryAlpha2,
+    country_code: enums::CountryAlpha2,
     admin_area_2: Option<String>,
 }
 
@@ -216,7 +211,7 @@ pub enum ThreeDsType {
 #[derive(Debug, Serialize)]
 pub struct RedirectRequest {
     name: Secret<String>,
-    country_code: api_models::enums::CountryAlpha2,
+    country_code: enums::CountryAlpha2,
     experience_context: ContextStruct,
 }
 
@@ -454,12 +449,12 @@ impl TryFrom<&PaypalRouterData<&types::PaymentsAuthorizeRouterData>> for PaypalP
                 let expiry = Some(card.get_expiry_date_as_yyyymm("-"));
 
                 let attributes = match item.router_data.auth_type {
-                    api_models::enums::AuthenticationType::ThreeDs => Some(ThreeDsSetting {
+                    enums::AuthenticationType::ThreeDs => Some(ThreeDsSetting {
                         verification: ThreeDsMethod {
                             method: ThreeDsType::ScaAlways,
                         },
                     }),
-                    api_models::enums::AuthenticationType::NoThreeDs => None,
+                    enums::AuthenticationType::NoThreeDs => None,
                 };
 
                 let payment_source = Some(PaymentSourceItem::Card(CardRequest {
@@ -858,13 +853,13 @@ impl TryFrom<&ConnectorAuthType> for PaypalAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
         match auth_type {
-            types::ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::AuthWithDetails(
+            ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::AuthWithDetails(
                 PaypalConnectorCredentials::StandardIntegration(StandardFlowCredentials {
                     client_id: key1.to_owned(),
                     client_secret: api_key.to_owned(),
                 }),
             )),
-            types::ConnectorAuthType::SignatureKey {
+            ConnectorAuthType::SignatureKey {
                 api_key,
                 key1,
                 api_secret,
@@ -875,7 +870,7 @@ impl TryFrom<&ConnectorAuthType> for PaypalAuthType {
                     payer_id: api_secret.to_owned(),
                 }),
             )),
-            types::ConnectorAuthType::TemporaryAuth => Ok(Self::TemporaryAuth),
+            ConnectorAuthType::TemporaryAuth => Ok(Self::TemporaryAuth),
             _ => Err(errors::ConnectorError::FailedToObtainAuthType)?,
         }
     }
@@ -1216,7 +1211,7 @@ fn get_redirect_url(
     let mut link: Option<Url> = None;
     for item2 in link_vec.iter() {
         if item2.rel == "payer-action" {
-            link = item2.href.clone();
+            link.clone_from(&item2.href)
         }
     }
     Ok(link)
diff --git a/crates/router/src/connector/placetopay/transformers.rs b/crates/router/src/connector/placetopay/transformers.rs
index 6ad3d3c2039..e400dc9b399 100644
--- a/crates/router/src/connector/placetopay/transformers.rs
+++ b/crates/router/src/connector/placetopay/transformers.rs
@@ -20,18 +20,13 @@ pub struct PlacetopayRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for PlacetopayRouterData<T>
+impl<T> TryFrom<(&api::CurrencyUnit, types::storage::enums::Currency, i64, T)>
+    for PlacetopayRouterData<T>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
+            &api::CurrencyUnit,
             types::storage::enums::Currency,
             i64,
             T,
diff --git a/crates/router/src/connector/prophetpay/transformers.rs b/crates/router/src/connector/prophetpay/transformers.rs
index 570bf8d2b3a..7a8cd6e14d0 100644
--- a/crates/router/src/connector/prophetpay/transformers.rs
+++ b/crates/router/src/connector/prophetpay/transformers.rs
@@ -19,22 +19,10 @@ pub struct ProphetpayRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for ProphetpayRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for ProphetpayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_f64(currency_unit, amount, currency)?;
         Ok(Self {
@@ -229,7 +217,7 @@ fn get_redirect_url_form(
     mut redirect_url: Url,
     complete_auth_url: Option<String>,
 ) -> CustomResult<services::RedirectForm, errors::ConnectorError> {
-    let mut form_fields = std::collections::HashMap::<String, String>::new();
+    let mut form_fields = HashMap::<String, String>::new();
 
     form_fields.insert(
         String::from("redirectUrl"),
diff --git a/crates/router/src/connector/rapyd.rs b/crates/router/src/connector/rapyd.rs
index c5f92c20f5c..5d4579fffa7 100644
--- a/crates/router/src/connector/rapyd.rs
+++ b/crates/router/src/connector/rapyd.rs
@@ -652,7 +652,7 @@ impl services::ConnectorIntegration<api::Execute, types::RefundsData, types::Ref
     }
 
     fn get_content_type(&self) -> &'static str {
-        api::ConnectorCommon::common_get_content_type(self)
+        ConnectorCommon::common_get_content_type(self)
     }
 
     fn get_url(
diff --git a/crates/router/src/connector/rapyd/transformers.rs b/crates/router/src/connector/rapyd/transformers.rs
index 04dc4496b62..22e1074802d 100644
--- a/crates/router/src/connector/rapyd/transformers.rs
+++ b/crates/router/src/connector/rapyd/transformers.rs
@@ -19,22 +19,10 @@ pub struct RapydRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for RapydRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for RapydRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
diff --git a/crates/router/src/connector/shift4.rs b/crates/router/src/connector/shift4.rs
index e11a79cb027..e7487e795b6 100644
--- a/crates/router/src/connector/shift4.rs
+++ b/crates/router/src/connector/shift4.rs
@@ -217,8 +217,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         router_data: &mut types::PaymentsAuthorizeRouterData,
         app_state: &routes::AppState,
     ) -> CustomResult<(), errors::ConnectorError> {
-        if router_data.auth_type == diesel_models::enums::AuthenticationType::ThreeDs
-            && router_data.payment_method == diesel_models::enums::PaymentMethod::Card
+        if router_data.auth_type == enums::AuthenticationType::ThreeDs
+            && router_data.payment_method == enums::PaymentMethod::Card
         {
             let integ: Box<
                 &(dyn ConnectorIntegration<
diff --git a/crates/router/src/connector/shift4/transformers.rs b/crates/router/src/connector/shift4/transformers.rs
index 92a72f42d1e..30f327c700e 100644
--- a/crates/router/src/connector/shift4/transformers.rs
+++ b/crates/router/src/connector/shift4/transformers.rs
@@ -747,9 +747,9 @@ impl<F> TryFrom<&types::RefundsRouterData<F>> for Shift4RefundRequest {
 impl From<Shift4RefundStatus> for enums::RefundStatus {
     fn from(item: Shift4RefundStatus) -> Self {
         match item {
-            self::Shift4RefundStatus::Successful => Self::Success,
-            self::Shift4RefundStatus::Failed => Self::Failure,
-            self::Shift4RefundStatus::Processing => Self::Pending,
+            Shift4RefundStatus::Successful => Self::Success,
+            Shift4RefundStatus::Failed => Self::Failure,
+            Shift4RefundStatus::Processing => Self::Pending,
         }
     }
 }
diff --git a/crates/router/src/connector/signifyd.rs b/crates/router/src/connector/signifyd.rs
index 550e1ae30a8..1c045b8da01 100644
--- a/crates/router/src/connector/signifyd.rs
+++ b/crates/router/src/connector/signifyd.rs
@@ -94,7 +94,7 @@ impl ConnectorCommon for Signifyd {
 
         Ok(ErrorResponse {
             status_code: res.status_code,
-            code: crate::consts::NO_ERROR_CODE.to_string(),
+            code: consts::NO_ERROR_CODE.to_string(),
             message: response.messages.join(" &"),
             reason: Some(response.errors.to_string()),
             attempt_status: None,
diff --git a/crates/router/src/connector/square/transformers.rs b/crates/router/src/connector/square/transformers.rs
index 318e33978cc..c980a4e7494 100644
--- a/crates/router/src/connector/square/transformers.rs
+++ b/crates/router/src/connector/square/transformers.rs
@@ -5,10 +5,7 @@ use serde::{Deserialize, Serialize};
 use crate::{
     connector::utils::{self, CardData, PaymentsAuthorizeRequestData, RouterData},
     core::errors,
-    types::{
-        self, api, domain,
-        storage::{self, enums},
-    },
+    types::{self, api, domain, storage::enums},
     unimplemented_payment_method,
 };
 
@@ -199,7 +196,7 @@ impl<F, T>
         item: types::ResponseRouterData<F, SquareSessionResponse, T, types::PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            status: storage::enums::AttemptStatus::Pending,
+            status: enums::AttemptStatus::Pending,
             session_token: Some(item.response.session_id.clone().expose()),
             response: Ok(types::PaymentsResponseData::SessionTokenResponse {
                 session_token: item.response.session_id.expose(),
diff --git a/crates/router/src/connector/stax.rs b/crates/router/src/connector/stax.rs
index c923ca0577d..4604e9da872 100644
--- a/crates/router/src/connector/stax.rs
+++ b/crates/router/src/connector/stax.rs
@@ -869,29 +869,25 @@ impl api::IncomingWebhook for Stax {
             .change_context(errors::ConnectorError::WebhookReferenceIdNotFound)?;
 
         match webhook_body.transaction_type {
-            stax::StaxWebhookEventType::Refund => {
-                Ok(api_models::webhooks::ObjectReferenceId::RefundId(
-                    api_models::webhooks::RefundIdType::ConnectorRefundId(webhook_body.id),
-                ))
-            }
-            stax::StaxWebhookEventType::Unknown => {
+            StaxWebhookEventType::Refund => Ok(api_models::webhooks::ObjectReferenceId::RefundId(
+                api_models::webhooks::RefundIdType::ConnectorRefundId(webhook_body.id),
+            )),
+            StaxWebhookEventType::Unknown => {
                 Err(errors::ConnectorError::WebhookEventTypeNotFound.into())
             }
-            stax::StaxWebhookEventType::PreAuth
-            | stax::StaxWebhookEventType::Capture
-            | stax::StaxWebhookEventType::Charge
-            | stax::StaxWebhookEventType::Void => {
-                Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
-                    api_models::payments::PaymentIdType::ConnectorTransactionId(match webhook_body
-                        .transaction_type
-                    {
-                        stax::StaxWebhookEventType::Capture => webhook_body
+            StaxWebhookEventType::PreAuth
+            | StaxWebhookEventType::Capture
+            | StaxWebhookEventType::Charge
+            | StaxWebhookEventType::Void => Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
+                api_models::payments::PaymentIdType::ConnectorTransactionId(
+                    match webhook_body.transaction_type {
+                        StaxWebhookEventType::Capture => webhook_body
                             .auth_id
                             .ok_or(errors::ConnectorError::WebhookReferenceIdNotFound)?,
                         _ => webhook_body.id,
-                    }),
-                ))
-            }
+                    },
+                ),
+            )),
         }
     }
 
diff --git a/crates/router/src/connector/stax/transformers.rs b/crates/router/src/connector/stax/transformers.rs
index 1d097c40e7f..d48a2b1e82b 100644
--- a/crates/router/src/connector/stax/transformers.rs
+++ b/crates/router/src/connector/stax/transformers.rs
@@ -18,22 +18,10 @@ pub struct StaxRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for StaxRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for StaxRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_f64(currency_unit, amount, currency)?;
         Ok(Self {
diff --git a/crates/router/src/connector/stripe.rs b/crates/router/src/connector/stripe.rs
index 64789e176fc..724a0ea6f78 100644
--- a/crates/router/src/connector/stripe.rs
+++ b/crates/router/src/connector/stripe.rs
@@ -2274,7 +2274,7 @@ impl services::ConnectorRedirectResponse for Stripe {
         _query_params: &str,
         _json_payload: Option<serde_json::Value>,
         action: services::PaymentAction,
-    ) -> CustomResult<crate::core::payments::CallConnectorAction, errors::ConnectorError> {
+    ) -> CustomResult<payments::CallConnectorAction, errors::ConnectorError> {
         match action {
             services::PaymentAction::PSync
             | services::PaymentAction::CompleteAuthorize
diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs
index 6932f6b7495..6b82c87b5d1 100644
--- a/crates/router/src/connector/stripe/transformers.rs
+++ b/crates/router/src/connector/stripe/transformers.rs
@@ -1107,9 +1107,7 @@ impl TryFrom<(&domain::BankRedirectData, Option<bool>)> for StripeBillingAddress
                     },
                 )?;
                 Self {
-                    name: Some(connector_util::BankRedirectBillingData::get_billing_name(
-                        &billing_data,
-                    )?),
+                    name: Some(BankRedirectBillingData::get_billing_name(&billing_data)?),
                     ..Self::default()
                 }
             }),
@@ -2859,16 +2857,14 @@ impl Serialize for StripeNextActionResponse {
     {
         match *self {
             Self::CashappHandleRedirectOrDisplayQrCode(ref i) => {
-                serde::Serialize::serialize(i, serializer)
-            }
-            Self::RedirectToUrl(ref i) => serde::Serialize::serialize(i, serializer),
-            Self::AlipayHandleRedirect(ref i) => serde::Serialize::serialize(i, serializer),
-            Self::VerifyWithMicrodeposits(ref i) => serde::Serialize::serialize(i, serializer),
-            Self::WechatPayDisplayQrCode(ref i) => serde::Serialize::serialize(i, serializer),
-            Self::DisplayBankTransferInstructions(ref i) => {
-                serde::Serialize::serialize(i, serializer)
+                Serialize::serialize(i, serializer)
             }
-            Self::NoNextActionBody => serde::Serialize::serialize("NoNextActionBody", serializer),
+            Self::RedirectToUrl(ref i) => Serialize::serialize(i, serializer),
+            Self::AlipayHandleRedirect(ref i) => Serialize::serialize(i, serializer),
+            Self::VerifyWithMicrodeposits(ref i) => Serialize::serialize(i, serializer),
+            Self::WechatPayDisplayQrCode(ref i) => Serialize::serialize(i, serializer),
+            Self::DisplayBankTransferInstructions(ref i) => Serialize::serialize(i, serializer),
+            Self::NoNextActionBody => Serialize::serialize("NoNextActionBody", serializer),
         }
     }
 }
@@ -2984,10 +2980,10 @@ pub enum RefundStatus {
 impl From<RefundStatus> for enums::RefundStatus {
     fn from(item: RefundStatus) -> Self {
         match item {
-            self::RefundStatus::Succeeded => Self::Success,
-            self::RefundStatus::Failed => Self::Failure,
-            self::RefundStatus::Pending => Self::Pending,
-            self::RefundStatus::RequiresAction => Self::ManualReview,
+            RefundStatus::Succeeded => Self::Success,
+            RefundStatus::Failed => Self::Failure,
+            RefundStatus::Pending => Self::Pending,
+            RefundStatus::RequiresAction => Self::ManualReview,
         }
     }
 }
@@ -3382,12 +3378,12 @@ impl<F, T> TryFrom<types::ResponseRouterData<F, ChargesResponse, T, types::Payme
                 code: item
                     .response
                     .failure_code
-                    .unwrap_or_else(|| crate::consts::NO_ERROR_CODE.to_string()),
+                    .unwrap_or_else(|| consts::NO_ERROR_CODE.to_string()),
                 message: item
                     .response
                     .failure_message
                     .clone()
-                    .unwrap_or_else(|| crate::consts::NO_ERROR_MESSAGE.to_string()),
+                    .unwrap_or_else(|| consts::NO_ERROR_MESSAGE.to_string()),
                 reason: item.response.failure_message,
                 status_code: item.http_code,
                 attempt_status: Some(status),
diff --git a/crates/router/src/connector/threedsecureio/transformers.rs b/crates/router/src/connector/threedsecureio/transformers.rs
index f0a2f116a40..d6a77fef31e 100644
--- a/crates/router/src/connector/threedsecureio/transformers.rs
+++ b/crates/router/src/connector/threedsecureio/transformers.rs
@@ -27,18 +27,13 @@ pub struct ThreedsecureioRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for ThreedsecureioRouterData<T>
+impl<T> TryFrom<(&api::CurrencyUnit, types::storage::enums::Currency, i64, T)>
+    for ThreedsecureioRouterData<T>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
+            &api::CurrencyUnit,
             types::storage::enums::Currency,
             i64,
             T,
@@ -168,7 +163,7 @@ impl
                 let creq_str = to_string(&creq)
                     .change_context(errors::ConnectorError::ResponseDeserializationFailed)
                     .attach_printable("error while constructing creq_str")?;
-                let creq_base64 = base64::Engine::encode(&BASE64_ENGINE, creq_str)
+                let creq_base64 = Engine::encode(&BASE64_ENGINE, creq_str)
                     .trim_end_matches('=')
                     .to_owned();
                 Ok(
@@ -270,7 +265,7 @@ impl TryFrom<&ThreedsecureioRouterData<&types::authentication::ConnectorAuthenti
             .map(|currency| currency.to_string())
             .ok_or(errors::ConnectorError::RequestEncodingFailed)
             .attach_printable("missing field currency")?;
-        let purchase_currency: Currency = iso_currency::Currency::from_code(&currency)
+        let purchase_currency: Currency = Currency::from_code(&currency)
             .ok_or(errors::ConnectorError::RequestEncodingFailed)
             .attach_printable("error while parsing Currency")?;
         let billing_address = request.billing_address.address.clone().ok_or(
diff --git a/crates/router/src/connector/trustpay/transformers.rs b/crates/router/src/connector/trustpay/transformers.rs
index c40435c01bb..5a318e5e440 100644
--- a/crates/router/src/connector/trustpay/transformers.rs
+++ b/crates/router/src/connector/trustpay/transformers.rs
@@ -28,19 +28,12 @@ pub struct TrustpayRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for TrustpayRouterData<T>
-{
+impl<T> TryFrom<(&types::api::CurrencyUnit, enums::Currency, i64, T)> for TrustpayRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (currency_unit, currency, amount, item): (
             &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            enums::Currency,
             i64,
             T,
         ),
@@ -1179,7 +1172,7 @@ impl<F>
         let create_intent_response = item.response.init_result_data.to_owned();
         let secrets = item.response.secrets.to_owned();
         let instance_id = item.response.instance_id.to_owned();
-        let pmt = utils::PaymentsPreProcessingData::get_payment_method_type(&item.data.request)?;
+        let pmt = PaymentsPreProcessingData::get_payment_method_type(&item.data.request)?;
 
         match (pmt, create_intent_response) {
             (
diff --git a/crates/router/src/connector/tsys/transformers.rs b/crates/router/src/connector/tsys/transformers.rs
index 6ffe1f1ed7f..dfc7e61c000 100644
--- a/crates/router/src/connector/tsys/transformers.rs
+++ b/crates/router/src/connector/tsys/transformers.rs
@@ -5,10 +5,7 @@ use serde::{Deserialize, Serialize};
 use crate::{
     connector::utils::{self, CardData, PaymentsAuthorizeRequestData, RefundsRequestData},
     core::errors,
-    types::{
-        self, api, domain,
-        storage::{self, enums},
-    },
+    types::{self, api, domain, storage::enums},
 };
 
 #[derive(Debug, Serialize)]
@@ -25,7 +22,7 @@ pub struct TsysPaymentAuthSaleRequest {
     transaction_key: Secret<String>,
     card_data_source: String,
     transaction_amount: String,
-    currency_code: storage::enums::Currency,
+    currency_code: enums::Currency,
     card_number: cards::CardNumber,
     expiration_date: Secret<String>,
     cvv2: Secret<String>,
diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs
index bb52d4885fb..5a5b1242611 100644
--- a/crates/router/src/connector/utils.rs
+++ b/crates/router/src/connector/utils.rs
@@ -363,10 +363,7 @@ impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Re
     }
 
     fn is_three_ds(&self) -> bool {
-        matches!(
-            self.auth_type,
-            diesel_models::enums::AuthenticationType::ThreeDs
-        )
+        matches!(self.auth_type, enums::AuthenticationType::ThreeDs)
     }
 
     fn get_shipping_address(&self) -> Result<&api::AddressDetails, Error> {
@@ -430,8 +427,8 @@ impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Re
 
 pub trait PaymentsPreProcessingData {
     fn get_email(&self) -> Result<Email, Error>;
-    fn get_payment_method_type(&self) -> Result<diesel_models::enums::PaymentMethodType, Error>;
-    fn get_currency(&self) -> Result<diesel_models::enums::Currency, 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 is_auto_capture(&self) -> Result<bool, Error>;
     fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error>;
@@ -445,12 +442,12 @@ impl PaymentsPreProcessingData for types::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<diesel_models::enums::PaymentMethodType, Error> {
+    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<diesel_models::enums::Currency, Error> {
+    fn get_currency(&self) -> Result<enums::Currency, Error> {
         self.currency.ok_or_else(missing_field_err("currency"))
     }
     fn get_amount(&self) -> Result<i64, Error> {
@@ -458,8 +455,8 @@ impl PaymentsPreProcessingData for types::PaymentsPreProcessingData {
     }
     fn is_auto_capture(&self) -> Result<bool, Error> {
         match self.capture_method {
-            Some(diesel_models::enums::CaptureMethod::Automatic) | None => Ok(true),
-            Some(diesel_models::enums::CaptureMethod::Manual) => Ok(false),
+            Some(enums::CaptureMethod::Automatic) | None => Ok(true),
+            Some(enums::CaptureMethod::Manual) => Ok(false),
             Some(_) => Err(errors::ConnectorError::CaptureMethodNotSupported.into()),
         }
     }
@@ -551,7 +548,7 @@ pub trait PaymentsAuthorizeRequestData {
     fn get_router_return_url(&self) -> Result<String, Error>;
     fn is_wallet(&self) -> bool;
     fn is_card(&self) -> bool;
-    fn get_payment_method_type(&self) -> Result<diesel_models::enums::PaymentMethodType, Error>;
+    fn get_payment_method_type(&self) -> Result<enums::PaymentMethodType, Error>;
     fn get_connector_mandate_id(&self) -> Result<String, Error>;
     fn get_complete_authorize_url(&self) -> Result<String, Error>;
     fn get_ip_address_as_optional(&self) -> Option<Secret<String, IpAddress>>;
@@ -578,8 +575,8 @@ impl PaymentMethodTokenizationRequestData for types::PaymentMethodTokenizationDa
 impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
     fn is_auto_capture(&self) -> Result<bool, Error> {
         match self.capture_method {
-            Some(diesel_models::enums::CaptureMethod::Automatic) | None => Ok(true),
-            Some(diesel_models::enums::CaptureMethod::Manual) => Ok(false),
+            Some(enums::CaptureMethod::Automatic) | None => Ok(true),
+            Some(enums::CaptureMethod::Manual) => Ok(false),
             Some(_) => Err(errors::ConnectorError::CaptureMethodNotSupported.into()),
         }
     }
@@ -619,9 +616,9 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
         self.mandate_id
             .as_ref()
             .and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
-                Some(api_models::payments::MandateReferenceId::ConnectorMandateId(
-                    connector_mandate_ids,
-                )) => connector_mandate_ids.connector_mandate_id.clone(),
+                Some(payments::MandateReferenceId::ConnectorMandateId(connector_mandate_ids)) => {
+                    connector_mandate_ids.connector_mandate_id.clone()
+                }
                 _ => None,
             })
     }
@@ -653,7 +650,7 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
         matches!(self.payment_method_data, domain::PaymentMethodData::Card(_))
     }
 
-    fn get_payment_method_type(&self) -> Result<diesel_models::enums::PaymentMethodType, Error> {
+    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"))
@@ -797,8 +794,8 @@ pub trait PaymentsCompleteAuthorizeRequestData {
 impl PaymentsCompleteAuthorizeRequestData for types::CompleteAuthorizeData {
     fn is_auto_capture(&self) -> Result<bool, Error> {
         match self.capture_method {
-            Some(diesel_models::enums::CaptureMethod::Automatic) | None => Ok(true),
-            Some(diesel_models::enums::CaptureMethod::Manual) => Ok(false),
+            Some(enums::CaptureMethod::Automatic) | None => Ok(true),
+            Some(enums::CaptureMethod::Manual) => Ok(false),
             Some(_) => Err(errors::ConnectorError::CaptureMethodNotSupported.into()),
         }
     }
@@ -831,8 +828,8 @@ pub trait PaymentsSyncRequestData {
 impl PaymentsSyncRequestData for types::PaymentsSyncData {
     fn is_auto_capture(&self) -> Result<bool, Error> {
         match self.capture_method {
-            Some(diesel_models::enums::CaptureMethod::Automatic) | None => Ok(true),
-            Some(diesel_models::enums::CaptureMethod::Manual) => Ok(false),
+            Some(enums::CaptureMethod::Automatic) | None => Ok(true),
+            Some(enums::CaptureMethod::Manual) => Ok(false),
             Some(_) => Err(errors::ConnectorError::CaptureMethodNotSupported.into()),
         }
     }
@@ -910,7 +907,7 @@ impl CustomerDetails for types::CustomerDetails {
 
 pub trait PaymentsCancelRequestData {
     fn get_amount(&self) -> Result<i64, Error>;
-    fn get_currency(&self) -> Result<diesel_models::enums::Currency, Error>;
+    fn get_currency(&self) -> Result<enums::Currency, Error>;
     fn get_cancellation_reason(&self) -> Result<String, Error>;
     fn get_browser_info(&self) -> Result<BrowserInformation, Error>;
 }
@@ -919,7 +916,7 @@ impl PaymentsCancelRequestData for PaymentsCancelData {
     fn get_amount(&self) -> Result<i64, Error> {
         self.amount.ok_or_else(missing_field_err("amount"))
     }
-    fn get_currency(&self) -> Result<diesel_models::enums::Currency, Error> {
+    fn get_currency(&self) -> Result<enums::Currency, Error> {
         self.currency.ok_or_else(missing_field_err("currency"))
     }
     fn get_cancellation_reason(&self) -> Result<String, Error> {
@@ -1540,7 +1537,7 @@ impl MandateData for payments::MandateAmountData {
 
 pub trait RecurringMandateData {
     fn get_original_payment_amount(&self) -> Result<i64, Error>;
-    fn get_original_payment_currency(&self) -> Result<diesel_models::enums::Currency, Error>;
+    fn get_original_payment_currency(&self) -> Result<enums::Currency, Error>;
 }
 
 impl RecurringMandateData for RecurringMandatePaymentData {
@@ -1548,7 +1545,7 @@ impl RecurringMandateData for RecurringMandatePaymentData {
         self.original_payment_authorized_amount
             .ok_or_else(missing_field_err("original_payment_authorized_amount"))
     }
-    fn get_original_payment_currency(&self) -> Result<diesel_models::enums::Currency, Error> {
+    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"))
     }
@@ -1558,7 +1555,7 @@ pub trait MandateReferenceData {
     fn get_connector_mandate_id(&self) -> Result<String, Error>;
 }
 
-impl MandateReferenceData for api_models::payments::ConnectorMandateReferenceId {
+impl MandateReferenceData for payments::ConnectorMandateReferenceId {
     fn get_connector_mandate_id(&self) -> Result<String, Error> {
         self.connector_mandate_id
             .clone()
@@ -1645,7 +1642,7 @@ pub fn base64_decode(data: String) -> Result<Vec<u8>, Error> {
 
 pub fn to_currency_base_unit_from_optional_amount(
     amount: Option<i64>,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<String, error_stack::Report<errors::ConnectorError>> {
     match amount {
         Some(a) => to_currency_base_unit(a, currency),
@@ -1657,25 +1654,25 @@ pub fn to_currency_base_unit_from_optional_amount(
 }
 
 pub fn get_amount_as_string(
-    currency_unit: &types::api::CurrencyUnit,
+    currency_unit: &api::CurrencyUnit,
     amount: i64,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<String, error_stack::Report<errors::ConnectorError>> {
     let amount = match currency_unit {
-        types::api::CurrencyUnit::Minor => amount.to_string(),
-        types::api::CurrencyUnit::Base => to_currency_base_unit(amount, currency)?,
+        api::CurrencyUnit::Minor => amount.to_string(),
+        api::CurrencyUnit::Base => to_currency_base_unit(amount, currency)?,
     };
     Ok(amount)
 }
 
 pub fn get_amount_as_f64(
-    currency_unit: &types::api::CurrencyUnit,
+    currency_unit: &api::CurrencyUnit,
     amount: i64,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<f64, error_stack::Report<errors::ConnectorError>> {
     let amount = match currency_unit {
-        types::api::CurrencyUnit::Base => to_currency_base_unit_asf64(amount, currency)?,
-        types::api::CurrencyUnit::Minor => u32::try_from(amount)
+        api::CurrencyUnit::Base => to_currency_base_unit_asf64(amount, currency)?,
+        api::CurrencyUnit::Minor => u32::try_from(amount)
             .change_context(errors::ConnectorError::ParsingFailed)?
             .into(),
     };
@@ -1684,7 +1681,7 @@ pub fn get_amount_as_f64(
 
 pub fn to_currency_base_unit(
     amount: i64,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<String, error_stack::Report<errors::ConnectorError>> {
     currency
         .to_currency_base_unit(amount)
@@ -1693,7 +1690,7 @@ pub fn to_currency_base_unit(
 
 pub fn to_currency_lower_unit(
     amount: String,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<String, error_stack::Report<errors::ConnectorError>> {
     currency
         .to_currency_lower_unit(amount)
@@ -1721,7 +1718,7 @@ pub fn construct_not_supported_error_report(
 
 pub fn to_currency_base_unit_with_zero_decimal_check(
     amount: i64,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<String, error_stack::Report<errors::ConnectorError>> {
     currency
         .to_currency_base_unit_with_zero_decimal_check(amount)
@@ -1730,7 +1727,7 @@ pub fn to_currency_base_unit_with_zero_decimal_check(
 
 pub fn to_currency_base_unit_asf64(
     amount: i64,
-    currency: diesel_models::enums::Currency,
+    currency: enums::Currency,
 ) -> Result<f64, error_stack::Report<errors::ConnectorError>> {
     currency
         .to_currency_base_unit_asf64(amount)
diff --git a/crates/router/src/connector/volt/transformers.rs b/crates/router/src/connector/volt/transformers.rs
index d3913296c09..814eefaf5ff 100644
--- a/crates/router/src/connector/volt/transformers.rs
+++ b/crates/router/src/connector/volt/transformers.rs
@@ -18,18 +18,13 @@ pub struct VoltRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for VoltRouterData<T>
+impl<T> TryFrom<(&api::CurrencyUnit, types::storage::enums::Currency, i64, T)>
+    for VoltRouterData<T>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
+            &api::CurrencyUnit,
             types::storage::enums::Currency,
             i64,
             T,
diff --git a/crates/router/src/connector/worldline/transformers.rs b/crates/router/src/connector/worldline/transformers.rs
index 3dba5ea24e7..795133f602f 100644
--- a/crates/router/src/connector/worldline/transformers.rs
+++ b/crates/router/src/connector/worldline/transformers.rs
@@ -190,22 +190,10 @@ pub struct WorldlineRouterData<T> {
     amount: i64,
     router_data: T,
 }
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for WorldlineRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for WorldlineRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (_currency_unit, _currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
@@ -218,7 +206,7 @@ impl
     TryFrom<
         &WorldlineRouterData<
             &types::RouterData<
-                types::api::payments::Authorize,
+                api::payments::Authorize,
                 PaymentsAuthorizeData,
                 PaymentsResponseData,
             >,
@@ -230,7 +218,7 @@ impl
     fn try_from(
         item: &WorldlineRouterData<
             &types::RouterData<
-                types::api::payments::Authorize,
+                api::payments::Authorize,
                 PaymentsAuthorizeData,
                 PaymentsResponseData,
             >,
@@ -593,7 +581,7 @@ impl<F, T> TryFrom<types::ResponseRouterData<F, Payment, T, PaymentsResponseData
                 item.response.status,
                 item.response.capture_method,
             )),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
+            response: Ok(PaymentsResponseData::TransactionResponse {
                 resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
                 redirection_data: None,
                 mandate_reference: None,
@@ -645,7 +633,7 @@ impl<F, T> TryFrom<types::ResponseRouterData<F, PaymentResponse, T, PaymentsResp
                 item.response.payment.status,
                 item.response.payment.capture_method,
             )),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
+            response: Ok(PaymentsResponseData::TransactionResponse {
                 resource_id: types::ResponseId::ConnectorTransactionId(
                     item.response.payment.id.clone(),
                 ),
diff --git a/crates/router/src/connector/worldpay.rs b/crates/router/src/connector/worldpay.rs
index 1f2dac807d1..894cfc16331 100644
--- a/crates/router/src/connector/worldpay.rs
+++ b/crates/router/src/connector/worldpay.rs
@@ -750,9 +750,7 @@ impl api::IncomingWebhook for Worldpay {
             .parse_struct("WorldpayWebhookTransactionId")
             .change_context(errors::ConnectorError::WebhookReferenceIdNotFound)?;
         Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
-            types::api::PaymentIdType::ConnectorTransactionId(
-                body.event_details.transaction_reference,
-            ),
+            api::PaymentIdType::ConnectorTransactionId(body.event_details.transaction_reference),
         ))
     }
 
diff --git a/crates/router/src/connector/worldpay/transformers.rs b/crates/router/src/connector/worldpay/transformers.rs
index 35a2f8cee8a..9c908cf749d 100644
--- a/crates/router/src/connector/worldpay/transformers.rs
+++ b/crates/router/src/connector/worldpay/transformers.rs
@@ -244,7 +244,7 @@ impl TryFrom<types::PaymentsResponseRouterData<WorldpayPaymentsResponse>>
                 })?,
             },
             description: item.response.description,
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
+            response: Ok(PaymentsResponseData::TransactionResponse {
                 resource_id: types::ResponseId::try_from(item.response.links)?,
                 redirection_data: None,
                 mandate_reference: None,
diff --git a/crates/router/src/connector/zen/transformers.rs b/crates/router/src/connector/zen/transformers.rs
index ead716af721..67538b819d5 100644
--- a/crates/router/src/connector/zen/transformers.rs
+++ b/crates/router/src/connector/zen/transformers.rs
@@ -23,22 +23,10 @@ pub struct ZenRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for ZenRouterData<T>
-{
+impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for ZenRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        (currency_unit, currency, amount, item): (
-            &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
-            i64,
-            T,
-        ),
+        (currency_unit, currency, amount, item): (&api::CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         let amount = utils::get_amount_as_string(currency_unit, amount, currency)?;
         Ok(Self {
diff --git a/crates/router/src/connector/zsl/transformers.rs b/crates/router/src/connector/zsl/transformers.rs
index 3ffd5b2ccef..58ff6ab2fab 100644
--- a/crates/router/src/connector/zsl/transformers.rs
+++ b/crates/router/src/connector/zsl/transformers.rs
@@ -27,19 +27,12 @@ pub struct ZslRouterData<T> {
     pub router_data: T,
 }
 
-impl<T>
-    TryFrom<(
-        &types::api::CurrencyUnit,
-        types::storage::enums::Currency,
-        i64,
-        T,
-    )> for ZslRouterData<T>
-{
+impl<T> TryFrom<(&types::api::CurrencyUnit, enums::Currency, i64, T)> for ZslRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
         (currency_unit, currency, txn_amount, item): (
             &types::api::CurrencyUnit,
-            types::storage::enums::Currency,
+            enums::Currency,
             i64,
             T,
         ),
diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs
index 0b8d52332d9..ee06097a599 100644
--- a/crates/router/src/core/admin.rs
+++ b/crates/router/src/core/admin.rs
@@ -268,7 +268,7 @@ pub async fn create_merchant_account(
         .await
         .to_duplicate_response(errors::ApiErrorResponse::DuplicateMerchantAccount)?;
 
-    db.insert_config(diesel_models::configs::ConfigNew {
+    db.insert_config(configs::ConfigNew {
         key: format!("{}_requires_cvv", merchant_account.merchant_id),
         config: "true".to_string(),
     })
@@ -545,7 +545,7 @@ pub async fn merchant_account_update(
     let updated_merchant_account = storage::MerchantAccountUpdate::Update {
         merchant_name: req
             .merchant_name
-            .map(masking::Secret::new)
+            .map(Secret::new)
             .async_lift(|inner| domain_types::encrypt_optional(inner, key))
             .await
             .change_context(errors::ApiErrorResponse::InternalServerError)
@@ -554,11 +554,11 @@ pub async fn merchant_account_update(
         merchant_details: req
             .merchant_details
             .as_ref()
-            .map(utils::Encode::encode_to_value)
+            .map(Encode::encode_to_value)
             .transpose()
             .change_context(errors::ApiErrorResponse::InternalServerError)
             .attach_printable("Unable to convert merchant_details to a value")?
-            .map(masking::Secret::new)
+            .map(Secret::new)
             .async_lift(|inner| domain_types::encrypt_optional(inner, key))
             .await
             .change_context(errors::ApiErrorResponse::InternalServerError)
@@ -569,7 +569,7 @@ pub async fn merchant_account_update(
         webhook_details: req
             .webhook_details
             .as_ref()
-            .map(utils::Encode::encode_to_value)
+            .map(Encode::encode_to_value)
             .transpose()
             .change_context(errors::ApiErrorResponse::InternalServerError)?,
 
@@ -941,8 +941,8 @@ pub async fn create_payment_connector(
         business_country: req.business_country,
         business_label: req.business_label.clone(),
         business_sub_label: req.business_sub_label.clone(),
-        created_at: common_utils::date_time::now(),
-        modified_at: common_utils::date_time::now(),
+        created_at: date_time::now(),
+        modified_at: date_time::now(),
         id: None,
         connector_webhook_details: match req.connector_webhook_details {
             Some(connector_webhook_details) => {
@@ -951,7 +951,7 @@ pub async fn create_payment_connector(
                 .change_context(errors::ApiErrorResponse::InternalServerError)
                 .attach_printable(format!("Failed to serialize api_models::admin::MerchantConnectorWebhookDetails for Merchant: {}", merchant_id))
                 .map(Some)?
-                .map(masking::Secret::new)
+                .map(Secret::new)
             }
             None => None,
         },
@@ -1278,7 +1278,7 @@ pub async fn update_payment_connector(
                 .encode_to_value()
                 .change_context(errors::ApiErrorResponse::InternalServerError)
                 .map(Some)?
-                .map(masking::Secret::new),
+                .map(Secret::new),
             None => None,
         },
         applepay_verified_domains: None,
@@ -1458,7 +1458,7 @@ pub fn get_frm_config_as_secret(
                     config
                         .encode_to_value()
                         .change_context(errors::ApiErrorResponse::ConfigNotFound)
-                        .map(masking::Secret::new)
+                        .map(Secret::new)
                 })
                 .collect::<Result<Vec<_>, _>>()
                 .ok()?;
diff --git a/crates/router/src/core/api_keys.rs b/crates/router/src/core/api_keys.rs
index f75ed011688..7f2b343b968 100644
--- a/crates/router/src/core/api_keys.rs
+++ b/crates/router/src/core/api_keys.rs
@@ -184,7 +184,7 @@ pub async fn add_api_key_expiry_task(
     api_key: &ApiKey,
     expiry_reminder_days: Vec<u8>,
 ) -> Result<(), errors::ProcessTrackerError> {
-    let current_time = common_utils::date_time::now();
+    let current_time = date_time::now();
 
     let schedule_time = expiry_reminder_days
         .first()
@@ -341,7 +341,7 @@ pub async fn update_api_key_expiry_task(
     api_key: &ApiKey,
     expiry_reminder_days: Vec<u8>,
 ) -> Result<(), errors::ProcessTrackerError> {
-    let current_time = common_utils::date_time::now();
+    let current_time = date_time::now();
 
     let schedule_time = expiry_reminder_days
         .first()
diff --git a/crates/router/src/core/authentication.rs b/crates/router/src/core/authentication.rs
index 36ee3c20416..e2f605304a7 100644
--- a/crates/router/src/core/authentication.rs
+++ b/crates/router/src/core/authentication.rs
@@ -9,7 +9,7 @@ use common_utils::errors::CustomResult;
 use error_stack::ResultExt;
 use masking::ExposeInterface;
 
-use super::errors::{self, StorageErrorExt};
+use super::errors::StorageErrorExt;
 use crate::{
     core::{errors::ApiErrorResponse, payments as payments_core},
     routes::AppState,
@@ -23,10 +23,10 @@ pub async fn perform_authentication(
     authentication_connector: String,
     payment_method_data: payments::PaymentMethodData,
     payment_method: common_enums::PaymentMethod,
-    billing_address: api_models::payments::Address,
-    shipping_address: Option<api_models::payments::Address>,
+    billing_address: payments::Address,
+    shipping_address: Option<payments::Address>,
     browser_details: Option<core_types::BrowserInformation>,
-    business_profile: core_types::storage::BusinessProfile,
+    business_profile: storage::BusinessProfile,
     merchant_connector_account: payments_core::helpers::MerchantConnectorAccountType,
     amount: Option<i64>,
     currency: Option<Currency>,
@@ -35,10 +35,10 @@ pub async fn perform_authentication(
     authentication_data: storage::Authentication,
     return_url: Option<String>,
     sdk_information: Option<payments::SdkInformation>,
-    threeds_method_comp_ind: api_models::payments::ThreeDsCompletionIndicator,
+    threeds_method_comp_ind: payments::ThreeDsCompletionIndicator,
     email: Option<common_utils::pii::Email>,
     webhook_url: String,
-) -> CustomResult<core_types::api::authentication::AuthenticationResponse, ApiErrorResponse> {
+) -> CustomResult<api::authentication::AuthenticationResponse, ApiErrorResponse> {
     let router_data = transformers::construct_authentication_router_data(
         authentication_connector.clone(),
         payment_method_data,
@@ -72,13 +72,13 @@ pub async fn perform_authentication(
             status_code: err.status_code,
             reason: err.reason,
         })?;
-    core_types::api::authentication::AuthenticationResponse::try_from(authentication)
+    api::authentication::AuthenticationResponse::try_from(authentication)
 }
 
 pub async fn perform_post_authentication(
     state: &AppState,
     key_store: &domain::MerchantKeyStore,
-    business_profile: core_types::storage::BusinessProfile,
+    business_profile: storage::BusinessProfile,
     authentication_id: String,
 ) -> CustomResult<storage::Authentication, ApiErrorResponse> {
     let (authentication_connector, three_ds_connector_account) =
@@ -96,7 +96,7 @@ pub async fn perform_post_authentication(
             authentication_id.clone(),
         )
         .await
-        .to_not_found_response(errors::ApiErrorResponse::InternalServerError)
+        .to_not_found_response(ApiErrorResponse::InternalServerError)
         .attach_printable_lazy(|| format!("Error while fetching authentication record with authentication_id {authentication_id}"))?;
     if !authentication.authentication_status.is_terminal_status() && is_pull_mechanism_enabled {
         let router_data = transformers::construct_post_authentication_router_data(
@@ -119,7 +119,7 @@ pub async fn perform_pre_authentication(
     key_store: &domain::MerchantKeyStore,
     card_number: cards::CardNumber,
     token: String,
-    business_profile: &core_types::storage::BusinessProfile,
+    business_profile: &storage::BusinessProfile,
     acquirer_details: Option<types::AcquirerDetails>,
     payment_id: Option<String>,
 ) -> CustomResult<storage::Authentication, ApiErrorResponse> {
@@ -135,7 +135,7 @@ pub async fn perform_pre_authentication(
         payment_id,
         three_ds_connector_account
             .get_mca_id()
-            .ok_or(errors::ApiErrorResponse::InternalServerError)
+            .ok_or(ApiErrorResponse::InternalServerError)
             .attach_printable("Error while finding mca_id from merchant_connector_account")?,
     )
     .await?;
diff --git a/crates/router/src/core/authentication/transformers.rs b/crates/router/src/core/authentication/transformers.rs
index d4cad2fbedb..9e00dfe70c9 100644
--- a/crates/router/src/core/authentication/transformers.rs
+++ b/crates/router/src/core/authentication/transformers.rs
@@ -29,8 +29,8 @@ pub fn construct_authentication_router_data(
     authentication_connector: String,
     payment_method_data: payments::PaymentMethodData,
     payment_method: PaymentMethod,
-    billing_address: api_models::payments::Address,
-    shipping_address: Option<api_models::payments::Address>,
+    billing_address: payments::Address,
+    shipping_address: Option<payments::Address>,
     browser_details: Option<types::BrowserInformation>,
     amount: Option<i64>,
     currency: Option<common_enums::Currency>,
@@ -40,8 +40,8 @@ pub fn construct_authentication_router_data(
     merchant_connector_account: payments_helpers::MerchantConnectorAccountType,
     authentication_data: storage::Authentication,
     return_url: Option<String>,
-    sdk_information: Option<api_models::payments::SdkInformation>,
-    threeds_method_comp_ind: api_models::payments::ThreeDsCompletionIndicator,
+    sdk_information: Option<payments::SdkInformation>,
+    threeds_method_comp_ind: payments::ThreeDsCompletionIndicator,
     email: Option<common_utils::pii::Email>,
     webhook_url: String,
 ) -> RouterResult<types::authentication::ConnectorAuthenticationRouterData> {
diff --git a/crates/router/src/core/customers.rs b/crates/router/src/core/customers.rs
index af97c500f3e..3b10b408f9e 100644
--- a/crates/router/src/core/customers.rs
+++ b/crates/router/src/core/customers.rs
@@ -37,7 +37,7 @@ pub async fn create_customer(
     let db = state.store.as_ref();
     let customer_id = &customer_data.customer_id;
     let merchant_id = &merchant_account.merchant_id;
-    customer_data.merchant_id = merchant_id.to_owned();
+    merchant_id.clone_into(&mut customer_data.merchant_id);
 
     // We first need to validate whether the customer with the given customer id already exists
     // this may seem like a redundant db call, as the insert_customer will anyway return this error
diff --git a/crates/router/src/core/errors.rs b/crates/router/src/core/errors.rs
index d80d86460b2..a70a97e7bf0 100644
--- a/crates/router/src/core/errors.rs
+++ b/crates/router/src/core/errors.rs
@@ -105,7 +105,7 @@ impl From<ring::error::Unspecified> for EncryptionError {
 
 pub fn http_not_implemented() -> actix_web::HttpResponse<BoxBody> {
     ApiErrorResponse::NotImplemented {
-        message: api_error_response::NotImplementedMessage::Default,
+        message: NotImplementedMessage::Default,
     }
     .error_response()
 }
diff --git a/crates/router/src/core/files.rs b/crates/router/src/core/files.rs
index e2ce5b42c3f..5dedcb14863 100644
--- a/crates/router/src/core/files.rs
+++ b/crates/router/src/core/files.rs
@@ -7,7 +7,7 @@ use super::errors::{self, RouterResponse};
 use crate::{
     consts,
     routes::AppState,
-    services::{self, ApplicationResponse},
+    services::ApplicationResponse,
     types::{api, domain},
 };
 
@@ -72,9 +72,9 @@ pub async fn files_create_core(
         .attach_printable_lazy(|| {
             format!("Unable to update file_metadata with file_id: {}", file_id)
         })?;
-    Ok(services::api::ApplicationResponse::Json(
-        files::CreateFileResponse { file_id },
-    ))
+    Ok(ApplicationResponse::Json(files::CreateFileResponse {
+        file_id,
+    }))
 }
 
 pub async fn files_delete_core(
diff --git a/crates/router/src/core/fraud_check.rs b/crates/router/src/core/fraud_check.rs
index 5e03033977e..e26d5d0b461 100644
--- a/crates/router/src/core/fraud_check.rs
+++ b/crates/router/src/core/fraud_check.rs
@@ -81,10 +81,10 @@ where
     )
     .await?;
 
-    frm_data.payment_attempt.connector_transaction_id = payment_data
+    frm_data
         .payment_attempt
         .connector_transaction_id
-        .clone();
+        .clone_from(&payment_data.payment_attempt.connector_transaction_id);
 
     let mut router_data = frm_data
         .construct_router_data(
@@ -676,7 +676,7 @@ where
     if matches!(fraud_capture_method, Some(Some(CaptureMethod::Manual)))
         && matches!(
             payment_data.payment_attempt.status,
-            api_models::enums::AttemptStatus::Unresolved
+            AttemptStatus::Unresolved
         )
     {
         if let Some(info) = frm_info {
diff --git a/crates/router/src/core/mandate.rs b/crates/router/src/core/mandate.rs
index 939367bd4db..7a1e294f9dc 100644
--- a/crates/router/src/core/mandate.rs
+++ b/crates/router/src/core/mandate.rs
@@ -512,11 +512,11 @@ impl ForeignFrom<Result<types::PaymentsResponseData, types::ErrorResponse>>
 pub trait MandateBehaviour {
     fn get_amount(&self) -> i64;
     fn get_setup_future_usage(&self) -> Option<diesel_models::enums::FutureUsage>;
-    fn get_mandate_id(&self) -> Option<&api_models::payments::MandateIds>;
-    fn set_mandate_id(&mut self, new_mandate_id: Option<api_models::payments::MandateIds>);
+    fn get_mandate_id(&self) -> Option<&payments::MandateIds>;
+    fn set_mandate_id(&mut self, new_mandate_id: Option<payments::MandateIds>);
     fn get_payment_method_data(&self) -> domain::payments::PaymentMethodData;
     fn get_setup_mandate_details(
         &self,
     ) -> Option<&hyperswitch_domain_models::mandates::MandateData>;
-    fn get_customer_acceptance(&self) -> Option<api_models::payments::CustomerAcceptance>;
+    fn get_customer_acceptance(&self) -> Option<payments::CustomerAcceptance>;
 }
diff --git a/crates/router/src/core/payment_link.rs b/crates/router/src/core/payment_link.rs
index 3f9f5f017a7..11c53a77b1e 100644
--- a/crates/router/src/core/payment_link.rs
+++ b/crates/router/src/core/payment_link.rs
@@ -350,7 +350,9 @@ fn validate_order_details(
                     order_details_amount_string.product_img_link =
                         Some(DEFAULT_PRODUCT_IMG.to_string())
                 } else {
-                    order_details_amount_string.product_img_link = order.product_img_link.clone()
+                    order_details_amount_string
+                        .product_img_link
+                        .clone_from(&order.product_img_link)
                 };
                 order_details_amount_string.amount =
                     currency
diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs
index d3f6aeea24b..9ae327269cf 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -115,10 +115,10 @@ pub async fn create_payment_method(
                 payment_method_type: req.payment_method_type,
                 payment_method_issuer: req.payment_method_issuer.clone(),
                 scheme: req.card_network.clone(),
-                metadata: pm_metadata.map(masking::Secret::new),
+                metadata: pm_metadata.map(Secret::new),
                 payment_method_data,
                 connector_mandate_details,
-                customer_acceptance: customer_acceptance.map(masking::Secret::new),
+                customer_acceptance: customer_acceptance.map(Secret::new),
                 client_secret: Some(client_secret),
                 status: status.unwrap_or(enums::PaymentMethodStatus::Active),
                 network_transaction_id: network_transaction_id.to_owned(),
@@ -201,7 +201,7 @@ pub async fn get_or_insert_payment_method(
                     .await;
 
                 match &existing_pm_by_locker_id {
-                    Ok(pm) => payment_method_id = pm.payment_method_id.clone(),
+                    Ok(pm) => payment_method_id.clone_from(&pm.payment_method_id),
                     Err(_) => payment_method_id = generate_id(consts::ID_LENGTH, "pm"),
                 };
                 existing_pm_by_locker_id
@@ -212,7 +212,7 @@ pub async fn get_or_insert_payment_method(
             existing_pm_by_pmid
         }
     };
-    resp.payment_method_id = payment_method_id.to_owned();
+    payment_method_id.clone_into(&mut resp.payment_method_id);
 
     match payment_method {
         Ok(pm) => Ok(pm),
@@ -405,7 +405,7 @@ pub async fn add_payment_method_data(
                         return Ok(services::ApplicationResponse::Json(pm_resp));
                     } else {
                         let locker_id = pm_resp.payment_method_id.clone();
-                        pm_resp.payment_method_id = pm_id.clone();
+                        pm_resp.payment_method_id.clone_from(&pm_id);
                         pm_resp.client_secret = Some(client_secret.clone());
 
                         let card_isin = card.card_number.clone().get_card_isin();
@@ -898,7 +898,9 @@ pub async fn update_customer_payment_method(
                 payment_method_data: pm_data_encrypted,
             };
 
-            add_card_resp.payment_method_id = pm.payment_method_id.clone();
+            add_card_resp
+                .payment_method_id
+                .clone_from(&pm.payment_method_id);
 
             db.update_payment_method(pm, pm_update, merchant_account.storage_scheme)
                 .await
@@ -1191,7 +1193,7 @@ pub async fn add_card_hs(
             card_exp_year: card.card_exp_year.to_owned(),
             card_brand: card.card_network.as_ref().map(ToString::to_string),
             card_isin: None,
-            nick_name: card.nick_name.as_ref().map(masking::Secret::peek).cloned(),
+            nick_name: card.nick_name.as_ref().map(Secret::peek).cloned(),
         },
     });
 
@@ -2912,7 +2914,7 @@ fn filter_pm_based_on_supported_payments_for_mandate(
 }
 
 fn filter_pm_based_on_config<'a>(
-    config: &'a crate::configs::settings::ConnectorFilters,
+    config: &'a settings::ConnectorFilters,
     connector: &'a str,
     payment_method_type: &'a api_enums::PaymentMethodType,
     payment_attempt: Option<&storage::PaymentAttempt>,
@@ -3615,7 +3617,7 @@ pub async fn get_card_details_with_locker_fallback(
 
     Ok(if let Some(mut crd) = card_decrypted {
         if crd.saved_to_locker {
-            crd.scheme = pm.scheme.clone();
+            crd.scheme.clone_from(&pm.scheme);
             Some(crd)
         } else {
             None
@@ -3645,7 +3647,7 @@ pub async fn get_card_details_without_locker_fallback(
             });
 
     Ok(if let Some(mut crd) = card_decrypted {
-        crd.scheme = pm.scheme.clone();
+        crd.scheme.clone_from(&pm.scheme);
         crd
     } else {
         get_card_details_from_locker(state, pm).await?
@@ -4005,10 +4007,7 @@ impl TempLockerCardSupport {
         metrics::TASKS_ADDED_COUNT.add(
             &metrics::CONTEXT,
             1,
-            &[metrics::request::add_attributes(
-                "flow",
-                "DeleteTokenizeData",
-            )],
+            &[request::add_attributes("flow", "DeleteTokenizeData")],
         );
         Ok(card)
     }
@@ -4171,7 +4170,7 @@ pub async fn create_encrypted_payment_method_data(
 
     let pm_data_encrypted: Option<Encryption> = pm_data
         .as_ref()
-        .map(utils::Encode::encode_to_value)
+        .map(Encode::encode_to_value)
         .transpose()
         .change_context(errors::StorageError::SerializationFailed)
         .attach_printable("Unable to convert payment method data to a value")
@@ -4179,7 +4178,7 @@ pub async fn create_encrypted_payment_method_data(
             logger::error!(err=?err);
             None
         })
-        .map(masking::Secret::<_, masking::WithType>::new)
+        .map(Secret::<_, masking::WithType>::new)
         .async_lift(|inner| encrypt_optional(inner, key))
         .await
         .change_context(errors::StorageError::EncryptionError)
diff --git a/crates/router/src/core/payment_methods/transformers.rs b/crates/router/src/core/payment_methods/transformers.rs
index 9c53642f4d7..009e9e54467 100644
--- a/crates/router/src/core/payment_methods/transformers.rs
+++ b/crates/router/src/core/payment_methods/transformers.rs
@@ -563,7 +563,7 @@ pub fn get_card_detail(
         card_token: None,
         card_fingerprint: None,
         card_holder_name: response.name_on_card,
-        nick_name: response.nick_name.map(masking::Secret::new),
+        nick_name: response.nick_name.map(Secret::new),
         card_isin: None,
         card_issuer: None,
         card_network: None,
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index 815c604a0e3..694e283ce2f 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -12,8 +12,10 @@ pub mod transformers;
 pub mod types;
 
 #[cfg(feature = "olap")]
-use std::collections::{HashMap, HashSet};
-use std::{fmt::Debug, marker::PhantomData, ops::Deref, time::Instant, vec::IntoIter};
+use std::collections::HashMap;
+use std::{
+    collections::HashSet, fmt::Debug, marker::PhantomData, ops::Deref, time::Instant, vec::IntoIter,
+};
 
 #[cfg(feature = "olap")]
 use api_models::admin::MerchantConnectorInfo;
@@ -119,7 +121,7 @@ where
     router_types::RouterData<F, FData, router_types::PaymentsResponseData>: Feature<F, FData>,
 
     // To construct connector flow specific api
-    dyn router_types::api::Connector:
+    dyn api::Connector:
         services::api::ConnectorIntegration<F, FData, router_types::PaymentsResponseData>,
 
     // To perform router related operation for PaymentResponse
@@ -265,7 +267,7 @@ where
                 _ => (),
             };
             payment_data = match connector_details {
-                api::ConnectorCallType::PreDetermined(connector) => {
+                ConnectorCallType::PreDetermined(connector) => {
                     let schedule_time = if should_add_task_to_process_tracker {
                         payment_sync::get_sync_process_schedule_time(
                             &*state.store,
@@ -329,7 +331,7 @@ where
                         .await?
                 }
 
-                api::ConnectorCallType::Retryable(connectors) => {
+                ConnectorCallType::Retryable(connectors) => {
                     let mut connectors = connectors.into_iter();
 
                     let connector_data = get_connector_data(&mut connectors)?;
@@ -430,7 +432,7 @@ where
                         .await?
                 }
 
-                api::ConnectorCallType::SessionMultiple(connectors) => {
+                ConnectorCallType::SessionMultiple(connectors) => {
                     let session_surcharge_details =
                         call_surcharge_decision_management_for_session_flow(
                             state,
@@ -739,7 +741,7 @@ pub async fn payments_core<F, Res, Req, Op, FData, Ctx>(
     req: Req,
     auth_flow: services::AuthFlow,
     call_connector_action: CallConnectorAction,
-    eligible_connectors: Option<Vec<api_models::enums::Connector>>,
+    eligible_connectors: Option<Vec<enums::Connector>>,
     header_payload: HeaderPayload,
 ) -> RouterResponse<Res>
 where
@@ -754,7 +756,7 @@ where
     Ctx: PaymentMethodRetrieve,
 
     // To construct connector flow specific api
-    dyn router_types::api::Connector:
+    dyn api::Connector:
         services::api::ConnectorIntegration<F, FData, router_types::PaymentsResponseData>,
 
     // To perform router related operation for PaymentResponse
@@ -992,7 +994,7 @@ impl<Ctx: PaymentMethodRetrieve> PaymentRedirectFlow<Ctx> for PaymentRedirectCom
         // If the status is requires customer action, then send the startpay url again
         // The redirection data must have been provided and updated by the connector
         let redirection_response = match payments_response.status {
-            api_models::enums::IntentStatus::RequiresCustomerAction => {
+            enums::IntentStatus::RequiresCustomerAction => {
                 let startpay_url = payments_response
                     .next_action
                     .clone()
@@ -1019,9 +1021,9 @@ impl<Ctx: PaymentMethodRetrieve> PaymentRedirectFlow<Ctx> for PaymentRedirectCom
                 })
             }
             // If the status is terminal status, then redirect to merchant return url to provide status
-            api_models::enums::IntentStatus::Succeeded
-            | api_models::enums::IntentStatus::Failed
-            | api_models::enums::IntentStatus::Cancelled | api_models::enums::IntentStatus::RequiresCapture| api_models::enums::IntentStatus::Processing=> helpers::get_handle_response_url(
+            enums::IntentStatus::Succeeded
+            | enums::IntentStatus::Failed
+            | enums::IntentStatus::Cancelled | enums::IntentStatus::RequiresCapture| enums::IntentStatus::Processing=> helpers::get_handle_response_url(
                 payment_id,
                 &payment_flow_response.business_profile,
                 payments_response,
@@ -1291,9 +1293,8 @@ impl<Ctx: PaymentMethodRetrieve> PaymentRedirectFlow<Ctx> for PaymentAuthenticat
         }?;
         // When intent status is RequiresCustomerAction, Set poll_id in redis to allow the fetch status of poll through retrieve_poll_status api from client
         if payments_response.status == common_enums::IntentStatus::RequiresCustomerAction {
-            let req_poll_id =
-                super::utils::get_external_authentication_request_poll_id(&payment_id);
-            let poll_id = super::utils::get_poll_id(merchant_id.clone(), req_poll_id.clone());
+            let req_poll_id = utils::get_external_authentication_request_poll_id(&payment_id);
+            let poll_id = utils::get_poll_id(merchant_id.clone(), req_poll_id.clone());
             let redis_conn = state
                 .store
                 .get_redis_conn()
@@ -1795,7 +1796,7 @@ where
                 merchant_connector_account.get_mca_id(),
             )?;
 
-            let connector_label = super::utils::get_connector_label(
+            let connector_label = utils::get_connector_label(
                 payment_data.payment_intent.business_country,
                 payment_data.payment_intent.business_label.as_ref(),
                 payment_data.payment_attempt.business_sub_label.as_ref(),
@@ -2085,13 +2086,11 @@ fn is_apple_pay_pre_decrypt_type_connector_tokenization(
 }
 
 fn decide_apple_pay_flow(
-    payment_method_type: &Option<api_models::enums::PaymentMethodType>,
+    payment_method_type: &Option<enums::PaymentMethodType>,
     merchant_connector_account: Option<&helpers::MerchantConnectorAccountType>,
 ) -> Option<enums::ApplePayFlow> {
     payment_method_type.and_then(|pmt| match pmt {
-        api_models::enums::PaymentMethodType::ApplePay => {
-            check_apple_pay_metadata(merchant_connector_account)
-        }
+        enums::PaymentMethodType::ApplePay => check_apple_pay_metadata(merchant_connector_account),
         _ => None,
     })
 }
@@ -3030,7 +3029,7 @@ pub async fn get_connector_choice<F, Req, Ctx>(
     business_profile: &storage::business_profile::BusinessProfile,
     key_store: &domain::MerchantKeyStore,
     payment_data: &mut PaymentData<F>,
-    eligible_connectors: Option<Vec<api_models::enums::RoutableConnectors>>,
+    eligible_connectors: Option<Vec<enums::RoutableConnectors>>,
     mandate_type: Option<api::MandateTransactionType>,
 ) -> RouterResult<Option<ConnectorCallType>>
 where
@@ -3059,7 +3058,7 @@ where
                     connectors,
                 )
                 .await?;
-                api::ConnectorCallType::SessionMultiple(routing_output)
+                ConnectorCallType::SessionMultiple(routing_output)
             }
 
             api::ConnectorChoice::StraightThrough(straight_through) => {
@@ -3110,7 +3109,7 @@ pub async fn connector_selection<F>(
     key_store: &domain::MerchantKeyStore,
     payment_data: &mut PaymentData<F>,
     request_straight_through: Option<serde_json::Value>,
-    eligible_connectors: Option<Vec<api_models::enums::RoutableConnectors>>,
+    eligible_connectors: Option<Vec<enums::RoutableConnectors>>,
     mandate_type: Option<api::MandateTransactionType>,
 ) -> RouterResult<ConnectorCallType>
 where
@@ -3186,7 +3185,7 @@ pub async fn decide_connector<F>(
     payment_data: &mut PaymentData<F>,
     request_straight_through: Option<api::routing::StraightThroughAlgorithm>,
     routing_data: &mut storage::RoutingData,
-    eligible_connectors: Option<Vec<api_models::enums::RoutableConnectors>>,
+    eligible_connectors: Option<Vec<enums::RoutableConnectors>>,
     mandate_type: Option<api::MandateTransactionType>,
 ) -> RouterResult<ConnectorCallType>
 where
@@ -3207,7 +3206,7 @@ where
         .attach_printable("Invalid connector name received in 'routed_through'")?;
 
         routing_data.routed_through = Some(connector_name.clone());
-        return Ok(api::ConnectorCallType::PreDetermined(connector_data));
+        return Ok(ConnectorCallType::PreDetermined(connector_data));
     }
 
     if let Some(mandate_connector_details) = payment_data.mandate_connector.as_ref() {
@@ -3226,10 +3225,11 @@ where
         routing_data.routed_through = Some(mandate_connector_details.connector.clone());
         #[cfg(feature = "connector_choice_mca_id")]
         {
-            routing_data.merchant_connector_id =
-                mandate_connector_details.merchant_connector_id.clone();
+            routing_data
+                .merchant_connector_id
+                .clone_from(&mandate_connector_details.merchant_connector_id);
         }
-        return Ok(api::ConnectorCallType::PreDetermined(connector_data));
+        return Ok(ConnectorCallType::PreDetermined(connector_data));
     }
 
     if let Some((pre_routing_results, storage_pm_type)) = routing_data
@@ -3257,13 +3257,15 @@ where
             routing_data.routed_through = Some(choice.connector.to_string());
             #[cfg(feature = "connector_choice_mca_id")]
             {
-                routing_data.merchant_connector_id = choice.merchant_connector_id.clone();
+                routing_data
+                    .merchant_connector_id
+                    .clone_from(&choice.merchant_connector_id);
             }
             #[cfg(not(feature = "connector_choice_mca_id"))]
             {
                 routing_data.business_sub_label = choice.sub_label.clone();
             }
-            return Ok(api::ConnectorCallType::PreDetermined(connector_data));
+            return Ok(ConnectorCallType::PreDetermined(connector_data));
         }
     }
 
@@ -3551,14 +3553,16 @@ pub async fn decide_multiplex_connector_for_normal_or_recurring_payment<F: Clone
             routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());
             #[cfg(feature = "connector_choice_mca_id")]
             {
-                routing_data.merchant_connector_id =
-                    chosen_connector_data.merchant_connector_id.clone();
+                routing_data
+                    .merchant_connector_id
+                    .clone_from(&chosen_connector_data.merchant_connector_id);
             }
             routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());
             #[cfg(feature = "connector_choice_mca_id")]
             {
-                routing_data.merchant_connector_id =
-                    chosen_connector_data.merchant_connector_id.clone();
+                routing_data
+                    .merchant_connector_id
+                    .clone_from(&chosen_connector_data.merchant_connector_id);
             }
 
             payment_data.mandate_id = Some(payments_api::MandateIds {
@@ -3566,7 +3570,7 @@ pub async fn decide_multiplex_connector_for_normal_or_recurring_payment<F: Clone
                 mandate_reference_id,
             });
 
-            Ok(api::ConnectorCallType::PreDetermined(chosen_connector_data))
+            Ok(ConnectorCallType::PreDetermined(chosen_connector_data))
         }
         _ => {
             let first_choice = connectors
@@ -3581,7 +3585,7 @@ pub async fn decide_multiplex_connector_for_normal_or_recurring_payment<F: Clone
                 routing_data.merchant_connector_id = first_choice.merchant_connector_id;
             }
 
-            Ok(api::ConnectorCallType::Retryable(connectors))
+            Ok(ConnectorCallType::Retryable(connectors))
         }
     }
 }
@@ -3666,7 +3670,7 @@ where
         }
     }
 
-    let routing_enabled_pms = std::collections::HashSet::from([
+    let routing_enabled_pms = HashSet::from([
         enums::PaymentMethodType::GooglePay,
         enums::PaymentMethodType::ApplePay,
         enums::PaymentMethodType::Klarna,
@@ -3734,7 +3738,7 @@ pub async fn route_connector_v1<F>(
     key_store: &domain::MerchantKeyStore,
     transaction_data: TransactionData<'_, F>,
     routing_data: &mut storage::RoutingData,
-    eligible_connectors: Option<Vec<api_models::enums::RoutableConnectors>>,
+    eligible_connectors: Option<Vec<enums::RoutableConnectors>>,
     mandate_type: Option<api::MandateTransactionType>,
 ) -> RouterResult<ConnectorCallType>
 where
@@ -4025,7 +4029,7 @@ pub async fn payment_external_authentication(
         return_url,
         req.sdk_information,
         req.threeds_method_comp_ind,
-        optional_customer.and_then(|customer| customer.email.map(common_utils::pii::Email::from)),
+        optional_customer.and_then(|customer| customer.email.map(pii::Email::from)),
         webhook_url,
     ))
     .await?;
diff --git a/crates/router/src/core/payments/access_token.rs b/crates/router/src/core/payments/access_token.rs
index 1de9cb60ca0..f7fe5b7844f 100644
--- a/crates/router/src/core/payments/access_token.rs
+++ b/crates/router/src/core/payments/access_token.rs
@@ -35,7 +35,7 @@ pub fn update_router_data_with_access_token_result<F, Req, Res>(
     if should_update_router_data {
         match add_access_token_result.access_token_result.as_ref() {
             Ok(access_token) => {
-                router_data.access_token = access_token.clone();
+                router_data.access_token.clone_from(access_token);
                 true
             }
             Err(connector_error) => {
diff --git a/crates/router/src/core/payments/flows/authorize_flow.rs b/crates/router/src/core/payments/flows/authorize_flow.rs
index 6b64dc04044..09b96284544 100644
--- a/crates/router/src/core/payments/flows/authorize_flow.rs
+++ b/crates/router/src/core/payments/flows/authorize_flow.rs
@@ -266,7 +266,7 @@ pub async fn authorize_preprocessing_steps<F: Clone>(
             Err(types::ErrorResponse::default());
 
         let preprocessing_router_data =
-            payments::helpers::router_data_type_conversion::<_, api::PreProcessing, _, _, _, _>(
+            helpers::router_data_type_conversion::<_, api::PreProcessing, _, _, _, _>(
                 router_data.clone(),
                 preprocessing_request_data,
                 preprocessing_response_data,
@@ -303,12 +303,11 @@ pub async fn authorize_preprocessing_steps<F: Clone>(
             ],
         );
 
-        let authorize_router_data =
-            payments::helpers::router_data_type_conversion::<_, F, _, _, _, _>(
-                resp.clone(),
-                router_data.request.to_owned(),
-                resp.response,
-            );
+        let authorize_router_data = helpers::router_data_type_conversion::<_, F, _, _, _, _>(
+            resp.clone(),
+            router_data.request.to_owned(),
+            resp.response,
+        );
 
         Ok(authorize_router_data)
     } else {
diff --git a/crates/router/src/core/payments/flows/complete_authorize_flow.rs b/crates/router/src/core/payments/flows/complete_authorize_flow.rs
index baf4190395f..667fa3feed0 100644
--- a/crates/router/src/core/payments/flows/complete_authorize_flow.rs
+++ b/crates/router/src/core/payments/flows/complete_authorize_flow.rs
@@ -172,7 +172,7 @@ pub async fn complete_authorize_preprocessing_steps<F: Clone>(
             Err(types::ErrorResponse::default());
 
         let preprocessing_router_data =
-            payments::helpers::router_data_type_conversion::<_, api::PreProcessing, _, _, _, _>(
+            helpers::router_data_type_conversion::<_, api::PreProcessing, _, _, _, _>(
                 router_data.clone(),
                 preprocessing_request_data,
                 preprocessing_response_data,
@@ -206,15 +206,14 @@ pub async fn complete_authorize_preprocessing_steps<F: Clone>(
             connector_metadata, ..
         }) = &resp.response
         {
-            router_data_request.connector_meta = connector_metadata.to_owned();
+            connector_metadata.clone_into(&mut router_data_request.connector_meta);
         };
 
-        let authorize_router_data =
-            payments::helpers::router_data_type_conversion::<_, F, _, _, _, _>(
-                resp.clone(),
-                router_data_request,
-                resp.response,
-            );
+        let authorize_router_data = helpers::router_data_type_conversion::<_, F, _, _, _, _>(
+            resp.clone(),
+            router_data_request,
+            resp.response,
+        );
 
         Ok(authorize_router_data)
     } else {
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index f17a7075d43..e4c4540cacf 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -636,7 +636,7 @@ pub async fn get_token_for_recurring_mandate(
         merchant_connector_id: mandate.merchant_connector_id,
     };
 
-    if let Some(diesel_models::enums::PaymentMethod::Card) = payment_method.payment_method {
+    if let Some(enums::PaymentMethod::Card) = payment_method.payment_method {
         if state.conf.locker.locker_enabled {
             let _ = cards::get_lookup_key_from_locker(
                 state,
diff --git a/crates/router/src/core/payments/operations/payment_approve.rs b/crates/router/src/core/payments/operations/payment_approve.rs
index 87943b4cf2b..8dffd8eaec3 100644
--- a/crates/router/src/core/payments/operations/payment_approve.rs
+++ b/crates/router/src/core/payments/operations/payment_approve.rs
@@ -59,10 +59,7 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
 
         helpers::validate_payment_status_against_not_allowed_statuses(
             &payment_intent.status,
-            &[
-                storage_enums::IntentStatus::Failed,
-                storage_enums::IntentStatus::Succeeded,
-            ],
+            &[IntentStatus::Failed, IntentStatus::Succeeded],
             "approve",
         )?;
 
diff --git a/crates/router/src/core/payments/operations/payment_cancel.rs b/crates/router/src/core/payments/operations/payment_cancel.rs
index 3e531280831..32035391fb7 100644
--- a/crates/router/src/core/payments/operations/payment_cancel.rs
+++ b/crates/router/src/core/payments/operations/payment_cancel.rs
@@ -112,7 +112,9 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
         let currency = payment_attempt.currency.get_required_value("currency")?;
         let amount = payment_attempt.get_total_amount().into();
 
-        payment_attempt.cancellation_reason = request.cancellation_reason.clone();
+        payment_attempt
+            .cancellation_reason
+            .clone_from(&request.cancellation_reason);
 
         let creds_identifier = request
             .merchant_connector_details
diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rs
index e770da70747..0d241202208 100644
--- a/crates/router/src/core/payments/operations/payment_create.rs
+++ b/crates/router/src/core/payments/operations/payment_create.rs
@@ -31,7 +31,6 @@ use crate::{
     routes::{app::ReqState, AppState},
     services,
     types::{
-        self,
         api::{self, PaymentIdTypeExt},
         domain,
         storage::{
@@ -949,7 +948,7 @@ impl PaymentCreate {
     #[allow(clippy::too_many_arguments)]
     async fn make_payment_intent(
         payment_id: &str,
-        merchant_account: &types::domain::MerchantAccount,
+        merchant_account: &domain::MerchantAccount,
         money: (api::Amount, enums::Currency),
         request: &api::PaymentsRequest,
         shipping_address_id: Option<String>,
@@ -971,7 +970,7 @@ impl PaymentCreate {
             request.confirm,
         );
         let client_secret =
-            crate::utils::generate_id(consts::ID_LENGTH, format!("{payment_id}_secret").as_str());
+            utils::generate_id(consts::ID_LENGTH, format!("{payment_id}_secret").as_str());
         let (amount, currency) = (money.0, Some(money.1));
 
         let order_details = request
diff --git a/crates/router/src/core/payments/operations/payment_response.rs b/crates/router/src/core/payments/operations/payment_response.rs
index f4408749fd3..d6e36ca9bfa 100644
--- a/crates/router/src/core/payments/operations/payment_response.rs
+++ b/crates/router/src/core/payments/operations/payment_response.rs
@@ -19,7 +19,6 @@ use crate::{
         mandate,
         payment_methods::{self, PaymentMethodRetrieve},
         payments::{
-            self,
             helpers::{
                 self as payments_helpers,
                 update_additional_payment_data_with_connector_response_pm_data,
@@ -722,8 +721,8 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
                 Some(multiple_capture_data) => {
                     let capture_update = storage::CaptureUpdate::ErrorUpdate {
                         status: match err.status_code {
-                            500..=511 => storage::enums::CaptureStatus::Pending,
-                            _ => storage::enums::CaptureStatus::Failed,
+                            500..=511 => enums::CaptureStatus::Pending,
+                            _ => enums::CaptureStatus::Failed,
                         },
                         error_code: Some(err.code),
                         error_message: Some(err.message),
@@ -756,20 +755,20 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
                             if flow_name == "PSync" {
                                 match err.status_code {
                                     // marking failure for 2xx because this is genuine payment failure
-                                    200..=299 => storage::enums::AttemptStatus::Failure,
+                                    200..=299 => enums::AttemptStatus::Failure,
                                     _ => router_data.status,
                                 }
                             } else if flow_name == "Capture" {
                                 match err.status_code {
-                                    500..=511 => storage::enums::AttemptStatus::Pending,
+                                    500..=511 => enums::AttemptStatus::Pending,
                                     // don't update the status for 429 error status
                                     429 => router_data.status,
-                                    _ => storage::enums::AttemptStatus::Failure,
+                                    _ => enums::AttemptStatus::Failure,
                                 }
                             } else {
                                 match err.status_code {
-                                    500..=511 => storage::enums::AttemptStatus::Pending,
-                                    _ => storage::enums::AttemptStatus::Failure,
+                                    500..=511 => enums::AttemptStatus::Pending,
+                                    _ => enums::AttemptStatus::Failure,
                                 }
                             }
                         }
@@ -891,8 +890,10 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
                     };
 
                     if router_data.status == enums::AttemptStatus::Charged {
-                        payment_data.payment_intent.fingerprint_id =
-                            payment_data.payment_attempt.fingerprint_id.clone();
+                        payment_data
+                            .payment_intent
+                            .fingerprint_id
+                            .clone_from(&payment_data.payment_attempt.fingerprint_id);
                         metrics::SUCCESSFUL_PAYMENT.add(&metrics::CONTEXT, 1, &[]);
                     }
 
@@ -1070,8 +1071,7 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
     payment_data.authentication = match payment_data.authentication {
         Some(authentication) => {
             let authentication_update = storage::AuthenticationUpdate::PostAuthorizationUpdate {
-                authentication_lifecycle_status:
-                    storage::enums::AuthenticationLifecycleStatus::Used,
+                authentication_lifecycle_status: enums::AuthenticationLifecycleStatus::Used,
             };
             let updated_authentication = state
                 .store
@@ -1154,7 +1154,7 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
         };
         if let Some(payment_method) = payment_data.payment_method_info.clone() {
             let connector_mandate_details =
-                payments::tokenization::update_connector_mandate_details_in_payment_method(
+                tokenization::update_connector_mandate_details_in_payment_method(
                     payment_method.clone(),
                     payment_method.payment_method_type,
                     Some(payment_data.payment_attempt.amount),
diff --git a/crates/router/src/core/payments/operations/payment_status.rs b/crates/router/src/core/payments/operations/payment_status.rs
index 4c0359c28f0..06ad57346f5 100644
--- a/crates/router/src/core/payments/operations/payment_status.rs
+++ b/crates/router/src/core/payments/operations/payment_status.rs
@@ -289,7 +289,7 @@ async fn get_tracker_for_sync<
     )
     .await?;
 
-    payment_attempt.encoded_data = request.param.clone();
+    payment_attempt.encoded_data.clone_from(&request.param);
 
     let attempts = match request.expand_attempts {
         Some(true) => {
diff --git a/crates/router/src/core/payments/operations/payment_update.rs b/crates/router/src/core/payments/operations/payment_update.rs
index 0aaa6006052..de83b935ff0 100644
--- a/crates/router/src/core/payments/operations/payment_update.rs
+++ b/crates/router/src/core/payments/operations/payment_update.rs
@@ -727,8 +727,6 @@ impl<F: Clone, Ctx: PaymentMethodRetrieve>
             .await
             .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;
 
-        payment_data.mandate_id = payment_data.mandate_id.clone();
-
         Ok((
             payments::is_confirm(self, payment_data.confirm),
             payment_data,
@@ -832,7 +830,9 @@ impl PaymentUpdate {
 
         payment_intent.business_country = request.business_country;
 
-        payment_intent.business_label = request.business_label.clone();
+        payment_intent
+            .business_label
+            .clone_from(&request.business_label);
 
         request
             .description
diff --git a/crates/router/src/core/payments/tokenization.rs b/crates/router/src/core/payments/tokenization.rs
index 304e6edd62e..6238694b2cc 100644
--- a/crates/router/src/core/payments/tokenization.rs
+++ b/crates/router/src/core/payments/tokenization.rs
@@ -219,9 +219,7 @@ where
                 };
 
                 let pm_card_details = resp.card.as_ref().map(|card| {
-                    api::payment_methods::PaymentMethodsData::Card(CardDetailsPaymentMethod::from(
-                        card.clone(),
-                    ))
+                    PaymentMethodsData::Card(CardDetailsPaymentMethod::from(card.clone()))
                 });
 
                 let pm_data_encrypted =
@@ -257,7 +255,7 @@ where
 
                                         match &existing_pm_by_locker_id {
                                             Ok(pm) => {
-                                                payment_method_id = pm.payment_method_id.clone()
+                                                payment_method_id.clone_from(&pm.payment_method_id);
                                             }
                                             Err(_) => {
                                                 payment_method_id =
@@ -365,7 +363,8 @@ where
 
                                             match &existing_pm_by_locker_id {
                                                 Ok(pm) => {
-                                                    payment_method_id = pm.payment_method_id.clone()
+                                                    payment_method_id
+                                                        .clone_from(&pm.payment_method_id);
                                                 }
                                                 Err(_) => {
                                                     payment_method_id =
@@ -578,7 +577,7 @@ async fn skip_saving_card_in_locker(
         .customer_id
         .clone()
         .get_required_value("customer_id")?;
-    let payment_method_id = common_utils::generate_id(crate::consts::ID_LENGTH, "pm");
+    let payment_method_id = common_utils::generate_id(consts::ID_LENGTH, "pm");
 
     let last4_digits = payment_method_request
         .card
@@ -630,7 +629,7 @@ async fn skip_saving_card_in_locker(
             Ok((pm_resp, None))
         }
         None => {
-            let pm_id = common_utils::generate_id(crate::consts::ID_LENGTH, "pm");
+            let pm_id = common_utils::generate_id(consts::ID_LENGTH, "pm");
             let payment_method_response = api::PaymentMethodResponse {
                 merchant_id: merchant_id.to_string(),
                 customer_id: Some(customer_id),
@@ -680,7 +679,7 @@ pub async fn save_in_locker(
         .change_context(errors::ApiErrorResponse::InternalServerError)
         .attach_printable("Add Card Failed"),
         None => {
-            let pm_id = common_utils::generate_id(crate::consts::ID_LENGTH, "pm");
+            let pm_id = common_utils::generate_id(consts::ID_LENGTH, "pm");
             let payment_method_response = api::PaymentMethodResponse {
                 merchant_id: merchant_id.to_string(),
                 customer_id: Some(customer_id),
@@ -746,18 +745,12 @@ pub async fn add_payment_method_token<F: Clone, T: types::Tokenizable + Clone>(
             let pm_token_response_data: Result<types::PaymentsResponseData, types::ErrorResponse> =
                 Err(types::ErrorResponse::default());
 
-            let mut pm_token_router_data = payments::helpers::router_data_type_conversion::<
-                _,
-                api::PaymentMethodToken,
-                _,
-                _,
-                _,
-                _,
-            >(
-                router_data.clone(),
-                pm_token_request_data,
-                pm_token_response_data,
-            );
+            let mut pm_token_router_data =
+                helpers::router_data_type_conversion::<_, api::PaymentMethodToken, _, _, _, _>(
+                    router_data.clone(),
+                    pm_token_request_data,
+                    pm_token_response_data,
+                );
 
             connector_integration
                 .execute_pretasks(&mut pm_token_router_data, state)
diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs
index 56874e5a9fc..2b7ba070d2c 100644
--- a/crates/router/src/core/payments/transformers.rs
+++ b/crates/router/src/core/payments/transformers.rs
@@ -1547,8 +1547,8 @@ impl TryFrom<types::CaptureSyncResponse> for storage::CaptureUpdate {
                 ..
             } => Ok(Self::ErrorUpdate {
                 status: match status_code {
-                    500..=511 => storage::enums::CaptureStatus::Pending,
-                    _ => storage::enums::CaptureStatus::Failed,
+                    500..=511 => enums::CaptureStatus::Pending,
+                    _ => enums::CaptureStatus::Failed,
                 },
                 error_code: Some(code),
                 error_message: Some(message),
diff --git a/crates/router/src/core/payouts/helpers.rs b/crates/router/src/core/payouts/helpers.rs
index e521fac9a80..790cb25c479 100644
--- a/crates/router/src/core/payouts/helpers.rs
+++ b/crates/router/src/core/payouts/helpers.rs
@@ -403,7 +403,9 @@ pub async fn save_payout_data_to_locker(
                 .await
                 .flatten()
                 .map(|card_info| {
-                    payment_method.payment_method_issuer = card_info.card_issuer.clone();
+                    payment_method
+                        .payment_method_issuer
+                        .clone_from(&card_info.card_issuer);
                     payment_method.card_network =
                         card_info.card_network.clone().map(|cn| cn.to_string());
                     api::payment_methods::PaymentMethodsData::Card(
@@ -641,7 +643,7 @@ pub async fn decide_payout_connector(
     request_straight_through: Option<api::routing::StraightThroughAlgorithm>,
     routing_data: &mut storage::RoutingData,
     payout_data: &mut PayoutData,
-    eligible_connectors: Option<Vec<api_models::enums::RoutableConnectors>>,
+    eligible_connectors: Option<Vec<enums::RoutableConnectors>>,
 ) -> RouterResult<api::ConnectorCallType> {
     // 1. For existing attempts, use stored connector
     let payout_attempt = &payout_data.payout_attempt;
diff --git a/crates/router/src/core/payouts/retry.rs b/crates/router/src/core/payouts/retry.rs
index 6bbee9a4cec..a7dcfa864a0 100644
--- a/crates/router/src/core/payouts/retry.rs
+++ b/crates/router/src/core/payouts/retry.rs
@@ -114,7 +114,7 @@ pub async fn do_gsm_single_connector_actions(
         if let Ordering::Equal = gsm.cmp(&previous_gsm) {
             break;
         }
-        previous_gsm = gsm.clone();
+        previous_gsm.clone_from(&gsm);
 
         match get_gsm_decision(gsm) {
             api_models::gsm::GsmDecision::Retry => {
diff --git a/crates/router/src/core/pm_auth.rs b/crates/router/src/core/pm_auth.rs
index 09ea935ea76..88138d7909f 100644
--- a/crates/router/src/core/pm_auth.rs
+++ b/crates/router/src/core/pm_auth.rs
@@ -64,7 +64,7 @@ pub async fn create_link_token(
 
     let redis_conn = db
         .get_redis_conn()
-        .change_context(errors::ApiErrorResponse::InternalServerError)
+        .change_context(ApiErrorResponse::InternalServerError)
         .attach_printable("Failed to get redis connection")?;
 
     let pm_auth_key = format!("pm_auth_{}", payload.payment_id);
@@ -75,7 +75,7 @@ pub async fn create_link_token(
             "Vec<PaymentMethodAuthConnectorChoice>",
         )
         .await
-        .change_context(errors::ApiErrorResponse::InternalServerError)
+        .change_context(ApiErrorResponse::InternalServerError)
         .attach_printable("Failed to get payment method auth choices from redis")?;
 
     let selected_config = pm_auth_configs
@@ -132,7 +132,7 @@ pub async fn create_link_token(
             &key_store,
         )
         .await
-        .change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
+        .change_context(ApiErrorResponse::MerchantConnectorAccountNotFound {
             id: merchant_account.merchant_id.clone(),
         })?;
 
@@ -145,7 +145,7 @@ pub async fn create_link_token(
         request: pm_auth_types::LinkTokenRequest {
             client_name: "HyperSwitch".to_string(),
             country_codes: Some(vec![billing_country.ok_or(
-                errors::ApiErrorResponse::MissingRequiredField {
+                ApiErrorResponse::MissingRequiredField {
                     field_name: "billing_country",
                 },
             )?]),
@@ -216,8 +216,7 @@ pub async fn exchange_token_core(
 
     let connector_name = config.connector_name.as_str();
 
-    let connector =
-        pm_auth_types::api::PaymentAuthConnectorData::get_connector_by_name(connector_name)?;
+    let connector = PaymentAuthConnectorData::get_connector_by_name(connector_name)?;
 
     let merchant_connector_account = state
         .store
@@ -227,7 +226,7 @@ pub async fn exchange_token_core(
             &key_store,
         )
         .await
-        .change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
+        .change_context(ApiErrorResponse::MerchantConnectorAccountNotFound {
             id: merchant_account.merchant_id.clone(),
         })?;
 
@@ -405,9 +404,7 @@ async fn store_bank_details_in_payment_methods(
             connector_details: vec![payment_methods::BankAccountConnectorDetails {
                 connector: connector_name.to_string(),
                 mca_id: mca_id.clone(),
-                access_token: payment_methods::BankAccountAccessCreds::AccessToken(
-                    access_token.clone(),
-                ),
+                access_token: BankAccountAccessCreds::AccessToken(access_token.clone()),
                 account_id: creds.account_id,
             }],
         };
@@ -612,7 +609,7 @@ async fn get_selected_config_from_redis(
 ) -> RouterResult<api_models::pm_auth::PaymentMethodAuthConnectorChoice> {
     let redis_conn = db
         .get_redis_conn()
-        .change_context(errors::ApiErrorResponse::InternalServerError)
+        .change_context(ApiErrorResponse::InternalServerError)
         .attach_printable("Failed to get redis connection")?;
 
     let pm_auth_key = format!("pm_auth_{}", payload.payment_id);
@@ -623,7 +620,7 @@ async fn get_selected_config_from_redis(
             "Vec<PaymentMethodAuthConnectorChoice>",
         )
         .await
-        .change_context(errors::ApiErrorResponse::GenericNotFoundError {
+        .change_context(ApiErrorResponse::GenericNotFoundError {
             message: "payment method auth connector name not found".to_string(),
         })
         .attach_printable("Failed to get payment method auth choices from redis")?;
@@ -651,14 +648,14 @@ pub async fn retrieve_payment_method_from_auth_service(
 ) -> RouterResult<Option<(PaymentMethodData, enums::PaymentMethod)>> {
     let db = state.store.as_ref();
 
-    let connector = pm_auth_types::api::PaymentAuthConnectorData::get_connector_by_name(
+    let connector = PaymentAuthConnectorData::get_connector_by_name(
         auth_token.connector_details.connector.as_str(),
     )?;
 
     let merchant_account = db
         .find_merchant_account_by_merchant_id(&payment_intent.merchant_id, key_store)
         .await
-        .to_not_found_response(errors::ApiErrorResponse::MerchantAccountNotFound)?;
+        .to_not_found_response(ApiErrorResponse::MerchantAccountNotFound)?;
 
     let mca = db
         .find_by_merchant_connector_account_merchant_id_merchant_connector_id(
@@ -667,7 +664,7 @@ pub async fn retrieve_payment_method_from_auth_service(
             key_store,
         )
         .await
-        .to_not_found_response(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
+        .to_not_found_response(ApiErrorResponse::MerchantConnectorAccountNotFound {
             id: auth_token.connector_details.mca_id.clone(),
         })
         .attach_printable(
@@ -697,7 +694,7 @@ pub async fn retrieve_payment_method_from_auth_service(
             acc.payment_method_type == auth_token.payment_method_type
                 && acc.payment_method == auth_token.payment_method
         })
-        .ok_or(errors::ApiErrorResponse::InternalServerError)
+        .ok_or(ApiErrorResponse::InternalServerError)
         .attach_printable("Bank account details not found")?;
 
     let mut bank_type = None;
@@ -720,7 +717,7 @@ pub async fn retrieve_payment_method_from_auth_service(
     let name = address
         .as_ref()
         .and_then(|addr| addr.first_name.clone().map(|name| name.into_inner()))
-        .ok_or(errors::ApiErrorResponse::GenericNotFoundError {
+        .ok_or(ApiErrorResponse::GenericNotFoundError {
             message: "billing_first_name not found".to_string(),
         })
         .attach_printable("billing_first_name not found")?;
diff --git a/crates/router/src/core/user/dashboard_metadata.rs b/crates/router/src/core/user/dashboard_metadata.rs
index c3512c32f42..ee1693b0c9d 100644
--- a/crates/router/src/core/user/dashboard_metadata.rs
+++ b/crates/router/src/core/user/dashboard_metadata.rs
@@ -8,15 +8,15 @@ use masking::ExposeInterface;
 #[cfg(feature = "email")]
 use router_env::logger;
 
+#[cfg(feature = "email")]
+use crate::services::email::types as email_types;
 use crate::{
     core::errors::{UserErrors, UserResponse, UserResult},
     routes::{app::ReqState, AppState},
     services::{authentication::UserFromToken, ApplicationResponse},
-    types::domain::{user::dashboard_metadata as types, MerchantKeyStore},
+    types::domain::{self, user::dashboard_metadata as types, MerchantKeyStore},
     utils::user::dashboard_metadata as utils,
 };
-#[cfg(feature = "email")]
-use crate::{services::email::types as email_types, types::domain};
 
 pub async fn set_metadata(
     state: AppState,
@@ -709,7 +709,7 @@ pub async fn get_merchant_connector_account_by_name(
     merchant_id: &str,
     connector_name: &str,
     key_store: &MerchantKeyStore,
-) -> UserResult<Option<crate::types::domain::MerchantConnectorAccount>> {
+) -> UserResult<Option<domain::MerchantConnectorAccount>> {
     state
         .store
         .find_merchant_connector_account_by_merchant_id_connector_name(
diff --git a/crates/router/src/core/utils.rs b/crates/router/src/core/utils.rs
index 3923663f5d1..ac546ef5e49 100644
--- a/crates/router/src/core/utils.rs
+++ b/crates/router/src/core/utils.rs
@@ -564,7 +564,7 @@ pub async fn construct_accept_dispute_router_data<'a>(
             dispute_id: dispute.dispute_id.clone(),
             connector_dispute_id: dispute.connector_dispute_id.clone(),
         },
-        response: Err(types::ErrorResponse::default()),
+        response: Err(ErrorResponse::default()),
         access_token: None,
         session_token: None,
         reference_id: None,
@@ -654,7 +654,7 @@ pub async fn construct_submit_evidence_router_data<'a>(
         connector_meta_data: merchant_connector_account.get_metadata(),
         amount_captured: payment_intent.amount_captured,
         request: submit_evidence_request_data,
-        response: Err(types::ErrorResponse::default()),
+        response: Err(ErrorResponse::default()),
         access_token: None,
         session_token: None,
         reference_id: None,
@@ -752,7 +752,7 @@ pub async fn construct_upload_file_router_data<'a>(
             file_type: create_file_request.file_type.clone(),
             file_size: create_file_request.file_size,
         },
-        response: Err(types::ErrorResponse::default()),
+        response: Err(ErrorResponse::default()),
         access_token: None,
         session_token: None,
         reference_id: None,
@@ -936,7 +936,7 @@ pub async fn construct_retrieve_file_router_data<'a>(
                 .ok_or(errors::ApiErrorResponse::InternalServerError)
                 .attach_printable("Missing provider file id")?,
         },
-        response: Err(types::ErrorResponse::default()),
+        response: Err(ErrorResponse::default()),
         access_token: None,
         session_token: None,
         reference_id: None,
@@ -1225,9 +1225,7 @@ pub fn get_incremental_authorization_allowed_value(
     incremental_authorization_allowed: Option<bool>,
     request_incremental_authorization: Option<RequestIncrementalAuthorization>,
 ) -> Option<bool> {
-    if request_incremental_authorization
-        == Some(common_enums::RequestIncrementalAuthorization::False)
-    {
+    if request_incremental_authorization == Some(RequestIncrementalAuthorization::False) {
         Some(false)
     } else {
         incremental_authorization_allowed
diff --git a/crates/router/src/core/verification.rs b/crates/router/src/core/verification.rs
index 8782126b0b6..fe3d752497a 100644
--- a/crates/router/src/core/verification.rs
+++ b/crates/router/src/core/verification.rs
@@ -89,7 +89,7 @@ pub async fn get_verified_apple_domains_with_mid_mca_id(
     merchant_id: String,
     merchant_connector_id: String,
 ) -> CustomResult<
-    services::ApplicationResponse<api_models::verifications::ApplepayVerifiedDomainsResponse>,
+    services::ApplicationResponse<verifications::ApplepayVerifiedDomainsResponse>,
     api_error_response::ApiErrorResponse,
 > {
     let db = state.store.as_ref();
@@ -110,6 +110,6 @@ pub async fn get_verified_apple_domains_with_mid_mca_id(
         .unwrap_or_default();
 
     Ok(services::api::ApplicationResponse::Json(
-        api_models::verifications::ApplepayVerifiedDomainsResponse { verified_domains },
+        verifications::ApplepayVerifiedDomainsResponse { verified_domains },
     ))
 }
diff --git a/crates/router/src/core/webhooks.rs b/crates/router/src/core/webhooks.rs
index 6647549e399..3c04fdb7e49 100644
--- a/crates/router/src/core/webhooks.rs
+++ b/crates/router/src/core/webhooks.rs
@@ -74,7 +74,7 @@ pub async fn payments_incoming_webhook_flow<Ctx: PaymentMethodRetrieve>(
         payments::CallConnectorAction::Trigger
     };
     let payments_response = match webhook_details.object_reference_id {
-        api_models::webhooks::ObjectReferenceId::PaymentId(id) => {
+        webhooks::ObjectReferenceId::PaymentId(id) => {
             let payment_id = get_payment_id(
                 state.store.as_ref(),
                 &id,
@@ -84,7 +84,7 @@ pub async fn payments_incoming_webhook_flow<Ctx: PaymentMethodRetrieve>(
             .await?;
 
             let lock_action = api_locking::LockAction::Hold {
-                input: super::api_locking::LockingInput {
+                input: api_locking::LockingInput {
                     unique_locking_key: payment_id,
                     api_identifier: lock_utils::ApiIdentifier::Payments,
                     override_lock_retries: None,
@@ -213,13 +213,13 @@ pub async fn refunds_incoming_webhook_flow(
     webhook_details: api::IncomingWebhookDetails,
     connector_name: &str,
     source_verified: bool,
-    event_type: api_models::webhooks::IncomingWebhookEvent,
+    event_type: webhooks::IncomingWebhookEvent,
 ) -> CustomResult<WebhookResponseTracker, errors::ApiErrorResponse> {
     let db = &*state.store;
     //find refund by connector refund id
     let refund = match webhook_details.object_reference_id {
-        api_models::webhooks::ObjectReferenceId::RefundId(refund_id_type) => match refund_id_type {
-            api_models::webhooks::RefundIdType::RefundId(id) => db
+        webhooks::ObjectReferenceId::RefundId(refund_id_type) => match refund_id_type {
+            webhooks::RefundIdType::RefundId(id) => db
                 .find_refund_by_merchant_id_refund_id(
                     &merchant_account.merchant_id,
                     &id,
@@ -228,7 +228,7 @@ pub async fn refunds_incoming_webhook_flow(
                 .await
                 .change_context(errors::ApiErrorResponse::WebhookResourceNotFound)
                 .attach_printable("Failed to fetch the refund")?,
-            api_models::webhooks::RefundIdType::ConnectorRefundId(id) => db
+            webhooks::RefundIdType::ConnectorRefundId(id) => db
                 .find_refund_by_merchant_id_connector_refund_id_connector(
                     &merchant_account.merchant_id,
                     &id,
@@ -305,7 +305,7 @@ pub async fn refunds_incoming_webhook_flow(
 
 pub async fn get_payment_attempt_from_object_reference_id(
     state: &AppState,
-    object_reference_id: api_models::webhooks::ObjectReferenceId,
+    object_reference_id: webhooks::ObjectReferenceId,
     merchant_account: &domain::MerchantAccount,
 ) -> CustomResult<
     hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt,
@@ -349,7 +349,7 @@ pub async fn get_or_update_dispute_object(
     dispute_details: api::disputes::DisputePayload,
     merchant_id: &str,
     payment_attempt: &hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt,
-    event_type: api_models::webhooks::IncomingWebhookEvent,
+    event_type: webhooks::IncomingWebhookEvent,
     business_profile: &diesel_models::business_profile::BusinessProfile,
     connector_name: &str,
 ) -> CustomResult<diesel_models::dispute::Dispute, errors::ApiErrorResponse> {
@@ -425,7 +425,7 @@ pub async fn external_authentication_incoming_webhook_flow<Ctx: PaymentMethodRet
     merchant_account: domain::MerchantAccount,
     key_store: domain::MerchantKeyStore,
     source_verified: bool,
-    event_type: api_models::webhooks::IncomingWebhookEvent,
+    event_type: webhooks::IncomingWebhookEvent,
     request_details: &api::IncomingWebhookRequestDetails<'_>,
     connector: &(dyn api::Connector + Sync),
     object_ref_id: api::ObjectReferenceId,
@@ -601,7 +601,7 @@ pub async fn mandates_incoming_webhook_flow(
     key_store: domain::MerchantKeyStore,
     webhook_details: api::IncomingWebhookDetails,
     source_verified: bool,
-    event_type: api_models::webhooks::IncomingWebhookEvent,
+    event_type: webhooks::IncomingWebhookEvent,
 ) -> CustomResult<WebhookResponseTracker, errors::ApiErrorResponse> {
     if source_verified {
         let db = &*state.store;
@@ -691,7 +691,7 @@ pub async fn disputes_incoming_webhook_flow(
     source_verified: bool,
     connector: &(dyn api::Connector + Sync),
     request_details: &api::IncomingWebhookRequestDetails<'_>,
-    event_type: api_models::webhooks::IncomingWebhookEvent,
+    event_type: webhooks::IncomingWebhookEvent,
 ) -> CustomResult<WebhookResponseTracker, errors::ApiErrorResponse> {
     metrics::INCOMING_DISPUTE_WEBHOOK_METRIC.add(&metrics::CONTEXT, 1, &[]);
     if source_verified {
@@ -1612,7 +1612,7 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType, Ctx: PaymentMethodRetr
 
     let is_webhook_event_supported = !matches!(
         event_type,
-        api_models::webhooks::IncomingWebhookEvent::EventNotSupported
+        webhooks::IncomingWebhookEvent::EventNotSupported
     );
     let is_webhook_event_enabled = !utils::is_webhook_event_disabled(
         &*state.clone().store,
@@ -2102,7 +2102,7 @@ pub(crate) fn get_outgoing_webhook_request(
         >(
             outgoing_webhook, payment_response_hash_key
         ),
-        _ => get_outgoing_webhook_request_inner::<api_models::webhooks::OutgoingWebhook>(
+        _ => get_outgoing_webhook_request_inner::<webhooks::OutgoingWebhook>(
             outgoing_webhook,
             payment_response_hash_key,
         ),
diff --git a/crates/router/src/core/webhooks/utils.rs b/crates/router/src/core/webhooks/utils.rs
index 3bf8c7c7f21..ad1aafd3125 100644
--- a/crates/router/src/core/webhooks/utils.rs
+++ b/crates/router/src/core/webhooks/utils.rs
@@ -124,8 +124,8 @@ pub async fn construct_webhook_router_data<'a>(
 #[inline]
 pub(crate) fn get_idempotent_event_id(
     primary_object_id: &str,
-    event_type: crate::types::storage::enums::EventType,
-    delivery_attempt: crate::types::storage::enums::WebhookDeliveryAttempt,
+    event_type: types::storage::enums::EventType,
+    delivery_attempt: types::storage::enums::WebhookDeliveryAttempt,
 ) -> String {
     use crate::types::storage::enums::WebhookDeliveryAttempt;
 
diff --git a/crates/router/src/db.rs b/crates/router/src/db.rs
index 9b222486d18..ca9432fcba9 100644
--- a/crates/router/src/db.rs
+++ b/crates/router/src/db.rs
@@ -190,7 +190,7 @@ where
     let bytes = db.get_key(key).await?;
     bytes
         .parse_struct(type_name)
-        .change_context(redis_interface::errors::RedisError::JsonDeserializationFailed)
+        .change_context(RedisError::JsonDeserializationFailed)
 }
 
 dyn_clone::clone_trait_object!(StorageInterface);
diff --git a/crates/router/src/db/business_profile.rs b/crates/router/src/db/business_profile.rs
index 7b5ade8c965..5e7c9bd0b20 100644
--- a/crates/router/src/db/business_profile.rs
+++ b/crates/router/src/db/business_profile.rs
@@ -6,7 +6,7 @@ use crate::{
     connection,
     core::errors::{self, CustomResult},
     db::MockDb,
-    types::storage::{self, business_profile},
+    types::storage::business_profile,
 };
 
 #[async_trait::async_trait]
@@ -65,7 +65,7 @@ impl BusinessProfileInterface for Store {
         profile_id: &str,
     ) -> CustomResult<business_profile::BusinessProfile, errors::StorageError> {
         let conn = connection::pg_connection_read(self).await?;
-        storage::business_profile::BusinessProfile::find_by_profile_id(&conn, profile_id)
+        business_profile::BusinessProfile::find_by_profile_id(&conn, profile_id)
             .await
             .map_err(|error| report!(errors::StorageError::from(error)))
     }
@@ -77,7 +77,7 @@ impl BusinessProfileInterface for Store {
         merchant_id: &str,
     ) -> CustomResult<business_profile::BusinessProfile, errors::StorageError> {
         let conn = connection::pg_connection_read(self).await?;
-        storage::business_profile::BusinessProfile::find_by_profile_name_merchant_id(
+        business_profile::BusinessProfile::find_by_profile_name_merchant_id(
             &conn,
             profile_name,
             merchant_id,
@@ -93,7 +93,7 @@ impl BusinessProfileInterface for Store {
         business_profile_update: business_profile::BusinessProfileUpdate,
     ) -> CustomResult<business_profile::BusinessProfile, errors::StorageError> {
         let conn = connection::pg_connection_write(self).await?;
-        storage::business_profile::BusinessProfile::update_by_profile_id(
+        business_profile::BusinessProfile::update_by_profile_id(
             current_state,
             &conn,
             business_profile_update,
@@ -109,7 +109,7 @@ impl BusinessProfileInterface for Store {
         merchant_id: &str,
     ) -> CustomResult<bool, errors::StorageError> {
         let conn = connection::pg_connection_write(self).await?;
-        storage::business_profile::BusinessProfile::delete_by_profile_id_merchant_id(
+        business_profile::BusinessProfile::delete_by_profile_id_merchant_id(
             &conn,
             profile_id,
             merchant_id,
@@ -124,12 +124,9 @@ impl BusinessProfileInterface for Store {
         merchant_id: &str,
     ) -> CustomResult<Vec<business_profile::BusinessProfile>, errors::StorageError> {
         let conn = connection::pg_connection_read(self).await?;
-        storage::business_profile::BusinessProfile::list_business_profile_by_merchant_id(
-            &conn,
-            merchant_id,
-        )
-        .await
-        .map_err(|error| report!(errors::StorageError::from(error)))
+        business_profile::BusinessProfile::list_business_profile_by_merchant_id(&conn, merchant_id)
+            .await
+            .map_err(|error| report!(errors::StorageError::from(error)))
     }
 }
 
diff --git a/crates/router/src/db/cache.rs b/crates/router/src/db/cache.rs
index 7f2462b3fc8..d9db13dde80 100644
--- a/crates/router/src/db/cache.rs
+++ b/crates/router/src/db/cache.rs
@@ -43,7 +43,7 @@ where
     };
     match redis_val {
         Err(err) => match err.current_context() {
-            errors::RedisError::NotFound | errors::RedisError::JsonDeserializationFailed => {
+            RedisError::NotFound | RedisError::JsonDeserializationFailed => {
                 get_data_set_redis().await
             }
             _ => Err(err
diff --git a/crates/router/src/db/dispute.rs b/crates/router/src/db/dispute.rs
index 0fe5f3d7666..097ad9beab9 100644
--- a/crates/router/src/db/dispute.rs
+++ b/crates/router/src/db/dispute.rs
@@ -444,7 +444,7 @@ mod tests {
         #[tokio::test]
         async fn test_find_by_merchant_id_payment_id_connector_dispute_id() {
             #[allow(clippy::expect_used)]
-            let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
+            let mockdb = MockDb::new(&RedisSettings::default())
                 .await
                 .expect("Failed to create Mock store");
 
@@ -487,7 +487,7 @@ mod tests {
         #[tokio::test]
         async fn test_find_dispute_by_merchant_id_dispute_id() {
             #[allow(clippy::expect_used)]
-            let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
+            let mockdb = MockDb::new(&RedisSettings::default())
                 .await
                 .expect("Failed to create Mock store");
 
@@ -524,7 +524,7 @@ mod tests {
         #[tokio::test]
         async fn test_find_disputes_by_merchant_id() {
             #[allow(clippy::expect_used)]
-            let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
+            let mockdb = MockDb::new(&RedisSettings::default())
                 .await
                 .expect("Failed to create Mock store");
 
@@ -578,7 +578,7 @@ mod tests {
         #[tokio::test]
         async fn test_find_disputes_by_merchant_id_payment_id() {
             #[allow(clippy::expect_used)]
-            let mockdb = MockDb::new(&redis_interface::RedisSettings::default())
+            let mockdb = MockDb::new(&RedisSettings::default())
                 .await
                 .expect("Failed to create Mock store");
 
diff --git a/crates/router/src/db/user_role.rs b/crates/router/src/db/user_role.rs
index e31a2663354..fff82334be0 100644
--- a/crates/router/src/db/user_role.rs
+++ b/crates/router/src/db/user_role.rs
@@ -377,8 +377,8 @@ impl UserRoleInterface for MockDb {
                         status,
                         modified_by,
                     } => {
-                        user_role.status = status.to_owned();
-                        user_role.last_modified_by = modified_by.to_owned();
+                        status.clone_into(&mut user_role.status);
+                        modified_by.clone_into(&mut user_role.last_modified_by);
                     }
                 }
                 updated_user_roles.push(user_role.to_owned());
diff --git a/crates/router/src/lib.rs b/crates/router/src/lib.rs
index fdabd07fa01..d11e5cf997a 100644
--- a/crates/router/src/lib.rs
+++ b/crates/router/src/lib.rs
@@ -188,7 +188,7 @@ pub async fn start_server(conf: settings::Settings<SecuredSecret>) -> Applicatio
             errors::ApplicationError::ApiClientError(error.current_context().clone())
         })?,
     );
-    let state = Box::pin(routes::AppState::new(conf, tx, api_client)).await;
+    let state = Box::pin(AppState::new(conf, tx, api_client)).await;
     let request_body_limit = server.request_body_limit;
     let server = actix_web::HttpServer::new(move || mk_app(state.clone(), request_body_limit))
         .bind((server.host.as_str(), server.port))?
diff --git a/crates/router/src/routes/api_keys.rs b/crates/router/src/routes/api_keys.rs
index 55959589152..f1170f0f0bb 100644
--- a/crates/router/src/routes/api_keys.rs
+++ b/crates/router/src/routes/api_keys.rs
@@ -131,7 +131,7 @@ pub async fn api_key_update(
     let (merchant_id, key_id) = path.into_inner();
     let mut payload = json_payload.into_inner();
     payload.key_id = key_id;
-    payload.merchant_id = merchant_id.clone();
+    payload.merchant_id.clone_from(&merchant_id);
 
     api::server_wrap(
         flow,
diff --git a/crates/router/src/routes/metrics/request.rs b/crates/router/src/routes/metrics/request.rs
index 029c1c61f24..ef53ad83f2c 100644
--- a/crates/router/src/routes/metrics/request.rs
+++ b/crates/router/src/routes/metrics/request.rs
@@ -24,7 +24,7 @@ where
 #[inline]
 pub async fn record_operation_time<F, R>(
     future: F,
-    metric: &once_cell::sync::Lazy<router_env::opentelemetry::metrics::Histogram<f64>>,
+    metric: &once_cell::sync::Lazy<opentelemetry::metrics::Histogram<f64>>,
     key_value: &[opentelemetry::KeyValue],
 ) -> R
 where
@@ -35,11 +35,11 @@ where
     result
 }
 
-pub fn add_attributes<T: Into<router_env::opentelemetry::Value>>(
+pub fn add_attributes<T: Into<opentelemetry::Value>>(
     key: &'static str,
     value: T,
-) -> router_env::opentelemetry::KeyValue {
-    router_env::opentelemetry::KeyValue::new(key, value)
+) -> opentelemetry::KeyValue {
+    opentelemetry::KeyValue::new(key, value)
 }
 
 pub fn status_code_metrics(status_code: i64, flow: String, merchant_id: String) {
diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rs
index c9e1cf14ce3..70112e27037 100644
--- a/crates/router/src/routes/payments.rs
+++ b/crates/router/src/routes/payments.rs
@@ -131,7 +131,7 @@ pub async fn payments_create(
                 req_state,
                 auth.merchant_account,
                 auth.key_store,
-                payment_types::HeaderPayload::default(),
+                HeaderPayload::default(),
                 req,
                 api::AuthFlow::Merchant,
             )
@@ -420,7 +420,7 @@ pub async fn payments_update(
                 req_state,
                 auth.merchant_account,
                 auth.key_store,
-                payment_types::HeaderPayload::default(),
+                HeaderPayload::default(),
                 req,
                 auth_flow,
             )
@@ -471,7 +471,7 @@ pub async fn payments_confirm(
     tracing::Span::current().record("payment_id", &payment_id);
     payload.payment_id = Some(payment_types::PaymentIdType::PaymentIntentId(payment_id));
     payload.confirm = Some(true);
-    let header_payload = match payment_types::HeaderPayload::foreign_try_from(req.headers()) {
+    let header_payload = match HeaderPayload::foreign_try_from(req.headers()) {
         Ok(headers) => headers,
         Err(err) => {
             return api::log_and_return_error_response(err);
@@ -1019,7 +1019,7 @@ pub async fn payments_approve(
                 api::AuthFlow::Merchant,
                 payments::CallConnectorAction::Trigger,
                 None,
-                payment_types::HeaderPayload::default(),
+                HeaderPayload::default(),
             )
         },
         match env::which() {
@@ -1081,7 +1081,7 @@ pub async fn payments_reject(
                 api::AuthFlow::Merchant,
                 payments::CallConnectorAction::Trigger,
                 None,
-                payment_types::HeaderPayload::default(),
+                HeaderPayload::default(),
             )
         },
         match env::which() {
@@ -1107,7 +1107,7 @@ async fn authorize_verify_select<Op, Ctx>(
     header_payload: HeaderPayload,
     req: api_models::payments::PaymentsRequest,
     auth_flow: api::AuthFlow,
-) -> app::core::errors::RouterResponse<api_models::payments::PaymentsResponse>
+) -> errors::RouterResponse<api_models::payments::PaymentsResponse>
 where
     Ctx: PaymentMethodRetrieve,
     Op: Sync
@@ -1530,8 +1530,10 @@ impl GetLockingInput for payment_types::PaymentsCaptureRequest {
     }
 }
 
+#[cfg(feature = "oltp")]
 struct FPaymentsApproveRequest<'a>(&'a payment_types::PaymentsApproveRequest);
 
+#[cfg(feature = "oltp")]
 impl<'a> GetLockingInput for FPaymentsApproveRequest<'a> {
     fn get_locking_input<F>(&self, flow: F) -> api_locking::LockAction
     where
@@ -1548,8 +1550,10 @@ impl<'a> GetLockingInput for FPaymentsApproveRequest<'a> {
     }
 }
 
+#[cfg(feature = "oltp")]
 struct FPaymentsRejectRequest<'a>(&'a payment_types::PaymentsRejectRequest);
 
+#[cfg(feature = "oltp")]
 impl<'a> GetLockingInput for FPaymentsRejectRequest<'a> {
     fn get_locking_input<F>(&self, flow: F) -> api_locking::LockAction
     where
diff --git a/crates/router/src/routes/recon.rs b/crates/router/src/routes/recon.rs
index 7845f52c924..fc0794ff9e0 100644
--- a/crates/router/src/routes/recon.rs
+++ b/crates/router/src/routes/recon.rs
@@ -1,6 +1,5 @@
 use actix_web::{web, HttpRequest, HttpResponse};
 use api_models::recon as recon_api;
-use common_enums::ReconStatus;
 use error_stack::ResultExt;
 use masking::{ExposeInterface, PeekInterface, Secret};
 use router_env::Flow;
@@ -195,7 +194,7 @@ pub async fn recon_merchant_account_update(
         subject: "Approval of Recon Request - Access Granted to Recon Dashboard",
     };
 
-    if req.recon_status == ReconStatus::Active {
+    if req.recon_status == enums::ReconStatus::Active {
         let _is_email_sent = state
             .email_client
             .compose_and_send_email(
diff --git a/crates/router/src/routes/user.rs b/crates/router/src/routes/user.rs
index ede6edbceb8..641ee5648f8 100644
--- a/crates/router/src/routes/user.rs
+++ b/crates/router/src/routes/user.rs
@@ -159,9 +159,10 @@ pub async fn set_dashboard_metadata(
     let flow = Flow::SetDashboardMetadata;
     let mut payload = json_payload.into_inner();
 
-    if let Err(e) = common_utils::errors::ReportSwitchExt::<(), ApiErrorResponse>::switch(
-        set_ip_address_if_required(&mut payload, req.headers()),
-    ) {
+    if let Err(e) = ReportSwitchExt::<(), ApiErrorResponse>::switch(set_ip_address_if_required(
+        &mut payload,
+        req.headers(),
+    )) {
         return api::log_and_return_error_response(e);
     }
 
diff --git a/crates/router/src/routes/webhooks.rs b/crates/router/src/routes/webhooks.rs
index 073b1c57000..cdf680548a1 100644
--- a/crates/router/src/routes/webhooks.rs
+++ b/crates/router/src/routes/webhooks.rs
@@ -43,19 +43,3 @@ pub async fn receive_incoming_webhook<W: types::OutgoingWebhookType>(
     ))
     .await
 }
-
-#[derive(Debug)]
-struct WebhookBytes(web::Bytes);
-
-impl serde::Serialize for WebhookBytes {
-    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
-        let payload: serde_json::Value = serde_json::from_slice(&self.0).unwrap_or_default();
-        payload.serialize(serializer)
-    }
-}
-
-impl common_utils::events::ApiEventMetric for WebhookBytes {
-    fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
-        Some(common_utils::events::ApiEventsType::Miscellaneous)
-    }
-}
diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs
index 30c3ce164e2..cfe4fea11bb 100644
--- a/crates/router/src/services/api.rs
+++ b/crates/router/src/services/api.rs
@@ -273,7 +273,7 @@ pub enum CaptureSyncMethod {
 pub async fn execute_connector_processing_step<
     'b,
     'a,
-    T: 'static,
+    T,
     Req: Debug + Clone + 'static,
     Resp: Debug + Clone + 'static,
 >(
@@ -284,7 +284,7 @@ pub async fn execute_connector_processing_step<
     connector_request: Option<Request>,
 ) -> CustomResult<types::RouterData<T, Req, Resp>, errors::ConnectorError>
 where
-    T: Clone + Debug,
+    T: Clone + Debug + 'static,
     // BoxedConnectorIntegration<T, Req, Resp>: 'b,
 {
     // If needed add an error stack as follows
@@ -651,7 +651,7 @@ pub async fn send_request(
         }
         .add_headers(headers)
         .timeout(Duration::from_secs(
-            option_timeout_secs.unwrap_or(crate::consts::REQUEST_TIME_OUT),
+            option_timeout_secs.unwrap_or(consts::REQUEST_TIME_OUT),
         ))
     };
 
@@ -920,7 +920,7 @@ pub enum RedirectForm {
 
 impl From<(url::Url, Method)> for RedirectForm {
     fn from((mut redirect_url, method): (url::Url, Method)) -> Self {
-        let form_fields = std::collections::HashMap::from_iter(
+        let form_fields = HashMap::from_iter(
             redirect_url
                 .query_pairs()
                 .map(|(key, value)| (key.to_string(), value.to_string())),
@@ -1127,10 +1127,7 @@ where
                 if unmasked_incoming_header_keys.contains(&key.as_str().to_lowercase()) {
                     acc.insert(key.clone(), value.clone());
                 } else {
-                    acc.insert(
-                        key.clone(),
-                        http::header::HeaderValue::from_static("**MASKED**"),
-                    );
+                    acc.insert(key.clone(), HeaderValue::from_static("**MASKED**"));
                 }
                 acc
             });
diff --git a/crates/router/src/services/api/client.rs b/crates/router/src/services/api/client.rs
index 09b4d25d0b6..ae45a2a7fce 100644
--- a/crates/router/src/services/api/client.rs
+++ b/crates/router/src/services/api/client.rs
@@ -27,7 +27,7 @@ fn get_client_builder(
 ) -> CustomResult<reqwest::ClientBuilder, ApiClientError> {
     let mut client_builder = reqwest::Client::builder()
         .redirect(reqwest::redirect::Policy::none())
-        .pool_idle_timeout(std::time::Duration::from_secs(
+        .pool_idle_timeout(Duration::from_secs(
             proxy_config
                 .idle_pool_connection_timeout
                 .unwrap_or_default(),
diff --git a/crates/router/src/services/authentication.rs b/crates/router/src/services/authentication.rs
index 5f15474115d..9aac92acd2a 100644
--- a/crates/router/src/services/authentication.rs
+++ b/crates/router/src/services/authentication.rs
@@ -876,13 +876,13 @@ impl ClientSecretFetch for api_models::cards_info::CardsInfoRequest {
     }
 }
 
-impl ClientSecretFetch for api_models::payments::PaymentsRetrieveRequest {
+impl ClientSecretFetch for payments::PaymentsRetrieveRequest {
     fn get_client_secret(&self) -> Option<&String> {
         self.client_secret.as_ref()
     }
 }
 
-impl ClientSecretFetch for api_models::payments::RetrievePaymentLinkRequest {
+impl ClientSecretFetch for payments::RetrievePaymentLinkRequest {
     fn get_client_secret(&self) -> Option<&String> {
         self.client_secret.as_ref()
     }
diff --git a/crates/router/src/services/pm_auth.rs b/crates/router/src/services/pm_auth.rs
index 91b752aaf13..a54ba881995 100644
--- a/crates/router/src/services/pm_auth.rs
+++ b/crates/router/src/services/pm_auth.rs
@@ -11,22 +11,16 @@ use crate::{
     services::{self},
 };
 
-pub async fn execute_connector_processing_step<
-    'b,
-    'a,
-    T: 'static,
-    Req: Clone + 'static,
-    Resp: Clone + 'static,
->(
+pub async fn execute_connector_processing_step<'b, 'a, T, Req, Resp>(
     state: &'b AppState,
     connector_integration: BoxedConnectorIntegration<'a, T, Req, Resp>,
     req: &'b PaymentAuthRouterData<T, Req, Resp>,
     connector: &pm_auth_types::PaymentMethodAuthConnectors,
 ) -> errors::CustomResult<PaymentAuthRouterData<T, Req, Resp>, ConnectorError>
 where
-    T: Clone,
-    Req: Clone,
-    Resp: Clone,
+    T: Clone + 'static,
+    Req: Clone + 'static,
+    Resp: Clone + 'static,
 {
     let mut router_data = req.clone();
 
diff --git a/crates/router/src/types/api/customers.rs b/crates/router/src/types/api/customers.rs
index 6f08a7fd7e4..e0ef95bcb0d 100644
--- a/crates/router/src/types/api/customers.rs
+++ b/crates/router/src/types/api/customers.rs
@@ -3,7 +3,7 @@ pub use api_models::customers::{CustomerDeleteResponse, CustomerId, CustomerRequ
 use serde::Serialize;
 
 use super::payments;
-use crate::{core::errors::RouterResult, newtype, types::domain};
+use crate::{newtype, types::domain};
 
 newtype!(
     pub CustomerResponse = customers::CustomerResponse,
@@ -16,10 +16,6 @@ impl common_utils::events::ApiEventMetric for CustomerResponse {
     }
 }
 
-pub(crate) trait CustomerRequestExt: Sized {
-    fn validate(self) -> RouterResult<Self>;
-}
-
 impl From<(domain::Customer, Option<payments::AddressDetails>)> for CustomerResponse {
     fn from((cust, address): (domain::Customer, Option<payments::AddressDetails>)) -> Self {
         customers::CustomerResponse {
diff --git a/crates/router/src/types/api/payments.rs b/crates/router/src/types/api/payments.rs
index e36c68c27d5..9f68cac98c9 100644
--- a/crates/router/src/types/api/payments.rs
+++ b/crates/router/src/types/api/payments.rs
@@ -21,20 +21,6 @@ use crate::{
     types::{self, api as api_types},
 };
 
-pub(crate) trait PaymentsRequestExt {
-    fn is_mandate(&self) -> Option<MandateTransactionType>;
-}
-
-impl PaymentsRequestExt for PaymentsRequest {
-    fn is_mandate(&self) -> Option<MandateTransactionType> {
-        match (&self.mandate_data, &self.mandate_id) {
-            (None, None) => None,
-            (_, Some(_)) => Some(MandateTransactionType::RecurringMandateTransaction),
-            (Some(_), _) => Some(MandateTransactionType::NewMandateTransaction),
-        }
-    }
-}
-
 impl super::Router for PaymentsRequest {}
 
 // Core related api layer.
diff --git a/crates/router/src/types/api/verify_connector.rs b/crates/router/src/types/api/verify_connector.rs
index 39891a7075d..af7cb9160b2 100644
--- a/crates/router/src/types/api/verify_connector.rs
+++ b/crates/router/src/types/api/verify_connector.rs
@@ -14,7 +14,7 @@ use crate::{
 
 #[derive(Clone, Debug)]
 pub struct VerifyConnectorData {
-    pub connector: &'static (dyn types::api::Connector + Sync),
+    pub connector: &'static (dyn api::Connector + Sync),
     pub connector_auth: types::ConnectorAuthType,
     pub card_details: domain::Card,
 }
@@ -155,11 +155,11 @@ pub trait VerifyConnector {
     }
 
     async fn handle_payment_error_response<F, R1, R2>(
-        connector: &(dyn types::api::Connector + Sync),
+        connector: &(dyn api::Connector + Sync),
         error_response: types::Response,
     ) -> errors::RouterResponse<()>
     where
-        dyn types::api::Connector + Sync: ConnectorIntegration<F, R1, R2>,
+        dyn api::Connector + Sync: ConnectorIntegration<F, R1, R2>,
     {
         let error = connector
             .get_error_response(error_response, None)
@@ -171,11 +171,11 @@ pub trait VerifyConnector {
     }
 
     async fn handle_access_token_error_response<F, R1, R2>(
-        connector: &(dyn types::api::Connector + Sync),
+        connector: &(dyn api::Connector + Sync),
         error_response: types::Response,
     ) -> errors::RouterResult<Option<types::AccessToken>>
     where
-        dyn types::api::Connector + Sync: ConnectorIntegration<F, R1, R2>,
+        dyn api::Connector + Sync: ConnectorIntegration<F, R1, R2>,
     {
         let error = connector
             .get_error_response(error_response, None)
diff --git a/crates/router/src/types/domain/customer.rs b/crates/router/src/types/domain/customer.rs
index de95251d9d4..139cd105779 100644
--- a/crates/router/src/types/domain/customer.rs
+++ b/crates/router/src/types/domain/customer.rs
@@ -148,14 +148,14 @@ impl From<CustomerUpdate> for CustomerUpdateInternal {
             },
             CustomerUpdate::ConnectorCustomer { connector_customer } => Self {
                 connector_customer,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: Some(date_time::now()),
                 ..Default::default()
             },
             CustomerUpdate::UpdateDefaultPaymentMethod {
                 default_payment_method_id,
             } => Self {
                 default_payment_method_id,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: Some(date_time::now()),
                 ..Default::default()
             },
         }
diff --git a/crates/router/src/types/domain/merchant_connector_account.rs b/crates/router/src/types/domain/merchant_connector_account.rs
index c84abbefc38..0e7f5b081c3 100644
--- a/crates/router/src/types/domain/merchant_connector_account.rs
+++ b/crates/router/src/types/domain/merchant_connector_account.rs
@@ -195,7 +195,7 @@ impl From<MerchantConnectorAccountUpdate> for MerchantConnectorAccountUpdateInte
                 metadata,
                 frm_configs: None,
                 frm_config: frm_configs,
-                modified_at: Some(common_utils::date_time::now()),
+                modified_at: Some(date_time::now()),
                 connector_webhook_details,
                 applepay_verified_domains,
                 pm_auth_config,
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index ef12e32d57c..ce11251b83e 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -176,20 +176,18 @@ impl ForeignTryFrom<storage_enums::AttemptStatus> for storage_enums::CaptureStat
     }
 }
 
-impl ForeignFrom<api_models::payments::MandateType> for storage_enums::MandateDataType {
-    fn foreign_from(from: api_models::payments::MandateType) -> Self {
+impl ForeignFrom<payments::MandateType> for storage_enums::MandateDataType {
+    fn foreign_from(from: payments::MandateType) -> Self {
         match from {
-            api_models::payments::MandateType::SingleUse(inner) => {
-                Self::SingleUse(inner.foreign_into())
-            }
-            api_models::payments::MandateType::MultiUse(inner) => {
+            payments::MandateType::SingleUse(inner) => Self::SingleUse(inner.foreign_into()),
+            payments::MandateType::MultiUse(inner) => {
                 Self::MultiUse(inner.map(ForeignInto::foreign_into))
             }
         }
     }
 }
 
-impl ForeignFrom<storage_enums::MandateDataType> for api_models::payments::MandateType {
+impl ForeignFrom<storage_enums::MandateDataType> for payments::MandateType {
     fn foreign_from(from: storage_enums::MandateDataType) -> Self {
         match from {
             storage_enums::MandateDataType::SingleUse(inner) => {
@@ -302,7 +300,7 @@ impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors {
     }
 }
 
-impl ForeignFrom<storage_enums::MandateAmountData> for api_models::payments::MandateAmountData {
+impl ForeignFrom<storage_enums::MandateAmountData> for payments::MandateAmountData {
     fn foreign_from(from: storage_enums::MandateAmountData) -> Self {
         Self {
             amount: from.amount,
@@ -315,18 +313,16 @@ impl ForeignFrom<storage_enums::MandateAmountData> for api_models::payments::Man
 }
 
 // TODO: remove foreign from since this conversion won't be needed in the router crate once data models is treated as a single & primary source of truth for structure information
-impl ForeignFrom<api_models::payments::MandateData>
-    for hyperswitch_domain_models::mandates::MandateData
-{
-    fn foreign_from(d: api_models::payments::MandateData) -> Self {
+impl ForeignFrom<payments::MandateData> for hyperswitch_domain_models::mandates::MandateData {
+    fn foreign_from(d: payments::MandateData) -> Self {
         Self {
             customer_acceptance: d.customer_acceptance.map(|d| {
                 hyperswitch_domain_models::mandates::CustomerAcceptance {
                     acceptance_type: match d.acceptance_type {
-                        api_models::payments::AcceptanceType::Online => {
+                        payments::AcceptanceType::Online => {
                             hyperswitch_domain_models::mandates::AcceptanceType::Online
                         }
-                        api_models::payments::AcceptanceType::Offline => {
+                        payments::AcceptanceType::Offline => {
                             hyperswitch_domain_models::mandates::AcceptanceType::Offline
                         }
                     },
@@ -340,7 +336,7 @@ impl ForeignFrom<api_models::payments::MandateData>
                 }
             }),
             mandate_type: d.mandate_type.map(|d| match d {
-                api_models::payments::MandateType::MultiUse(Some(i)) => {
+                payments::MandateType::MultiUse(Some(i)) => {
                     hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(
                         hyperswitch_domain_models::mandates::MandateAmountData {
                             amount: i.amount,
@@ -351,7 +347,7 @@ impl ForeignFrom<api_models::payments::MandateData>
                         },
                     ))
                 }
-                api_models::payments::MandateType::SingleUse(i) => {
+                payments::MandateType::SingleUse(i) => {
                     hyperswitch_domain_models::mandates::MandateDataType::SingleUse(
                         hyperswitch_domain_models::mandates::MandateAmountData {
                             amount: i.amount,
@@ -362,7 +358,7 @@ impl ForeignFrom<api_models::payments::MandateData>
                         },
                     )
                 }
-                api_models::payments::MandateType::MultiUse(None) => {
+                payments::MandateType::MultiUse(None) => {
                     hyperswitch_domain_models::mandates::MandateDataType::MultiUse(None)
                 }
             }),
@@ -371,8 +367,8 @@ impl ForeignFrom<api_models::payments::MandateData>
     }
 }
 
-impl ForeignFrom<api_models::payments::MandateAmountData> for storage_enums::MandateAmountData {
-    fn foreign_from(from: api_models::payments::MandateAmountData) -> Self {
+impl ForeignFrom<payments::MandateAmountData> for storage_enums::MandateAmountData {
+    fn foreign_from(from: payments::MandateAmountData) -> Self {
         Self {
             amount: from.amount,
             currency: from.currency,
@@ -503,26 +499,27 @@ impl ForeignFrom<api_enums::PaymentMethodType> for api_enums::PaymentMethod {
     }
 }
 
-impl ForeignTryFrom<api_models::payments::PaymentMethodData> for api_enums::PaymentMethod {
+impl ForeignTryFrom<payments::PaymentMethodData> for api_enums::PaymentMethod {
     type Error = errors::ApiErrorResponse;
     fn foreign_try_from(
-        payment_method_data: api_models::payments::PaymentMethodData,
+        payment_method_data: payments::PaymentMethodData,
     ) -> Result<Self, Self::Error> {
         match payment_method_data {
-            api_models::payments::PaymentMethodData::Card(..)
-            | api_models::payments::PaymentMethodData::CardToken(..) => Ok(Self::Card),
-            api_models::payments::PaymentMethodData::Wallet(..) => Ok(Self::Wallet),
-            api_models::payments::PaymentMethodData::PayLater(..) => Ok(Self::PayLater),
-            api_models::payments::PaymentMethodData::BankRedirect(..) => Ok(Self::BankRedirect),
-            api_models::payments::PaymentMethodData::BankDebit(..) => Ok(Self::BankDebit),
-            api_models::payments::PaymentMethodData::BankTransfer(..) => Ok(Self::BankTransfer),
-            api_models::payments::PaymentMethodData::Crypto(..) => Ok(Self::Crypto),
-            api_models::payments::PaymentMethodData::Reward => Ok(Self::Reward),
-            api_models::payments::PaymentMethodData::Upi(..) => Ok(Self::Upi),
-            api_models::payments::PaymentMethodData::Voucher(..) => Ok(Self::Voucher),
-            api_models::payments::PaymentMethodData::GiftCard(..) => Ok(Self::GiftCard),
-            api_models::payments::PaymentMethodData::CardRedirect(..) => Ok(Self::CardRedirect),
-            api_models::payments::PaymentMethodData::MandatePayment => {
+            payments::PaymentMethodData::Card(..) | payments::PaymentMethodData::CardToken(..) => {
+                Ok(Self::Card)
+            }
+            payments::PaymentMethodData::Wallet(..) => Ok(Self::Wallet),
+            payments::PaymentMethodData::PayLater(..) => Ok(Self::PayLater),
+            payments::PaymentMethodData::BankRedirect(..) => Ok(Self::BankRedirect),
+            payments::PaymentMethodData::BankDebit(..) => Ok(Self::BankDebit),
+            payments::PaymentMethodData::BankTransfer(..) => Ok(Self::BankTransfer),
+            payments::PaymentMethodData::Crypto(..) => Ok(Self::Crypto),
+            payments::PaymentMethodData::Reward => Ok(Self::Reward),
+            payments::PaymentMethodData::Upi(..) => Ok(Self::Upi),
+            payments::PaymentMethodData::Voucher(..) => Ok(Self::Voucher),
+            payments::PaymentMethodData::GiftCard(..) => Ok(Self::GiftCard),
+            payments::PaymentMethodData::CardRedirect(..) => Ok(Self::CardRedirect),
+            payments::PaymentMethodData::MandatePayment => {
                 Err(errors::ApiErrorResponse::InvalidRequestData {
                     message: ("Mandate payments cannot have payment_method_data field".to_string()),
                 })
@@ -902,7 +899,7 @@ impl TryFrom<domain::MerchantConnectorAccount> for api_models::admin::MerchantCo
     }
 }
 
-impl ForeignFrom<storage::PaymentAttempt> for api_models::payments::PaymentAttemptResponse {
+impl ForeignFrom<storage::PaymentAttempt> for payments::PaymentAttemptResponse {
     fn foreign_from(payment_attempt: storage::PaymentAttempt) -> Self {
         Self {
             attempt_id: payment_attempt.attempt_id,
@@ -929,7 +926,7 @@ impl ForeignFrom<storage::PaymentAttempt> for api_models::payments::PaymentAttem
     }
 }
 
-impl ForeignFrom<storage::Capture> for api_models::payments::CaptureResponse {
+impl ForeignFrom<storage::Capture> for payments::CaptureResponse {
     fn foreign_from(capture: storage::Capture) -> Self {
         Self {
             capture_id: capture.capture_id,
@@ -1003,7 +1000,7 @@ impl ForeignFrom<api_models::enums::PayoutType> for api_enums::PaymentMethod {
     }
 }
 
-impl ForeignTryFrom<&HeaderMap> for api_models::payments::HeaderPayload {
+impl ForeignTryFrom<&HeaderMap> for payments::HeaderPayload {
     type Error = error_stack::Report<errors::ApiErrorResponse>;
     fn foreign_try_from(headers: &HeaderMap) -> Result<Self, Self::Error> {
         let payment_confirm_source: Option<api_enums::PaymentSource> =
@@ -1047,7 +1044,7 @@ impl
         Option<&domain::Address>,
         Option<&domain::Address>,
         Option<&domain::Customer>,
-    )> for api_models::payments::PaymentsRequest
+    )> for payments::PaymentsRequest
 {
     fn foreign_from(
         value: (
@@ -1072,17 +1069,11 @@ impl
     }
 }
 
-impl
-    ForeignFrom<(
-        storage::PaymentLink,
-        api_models::payments::PaymentLinkStatus,
-    )> for api_models::payments::RetrievePaymentLinkResponse
+impl ForeignFrom<(storage::PaymentLink, payments::PaymentLinkStatus)>
+    for payments::RetrievePaymentLinkResponse
 {
     fn foreign_from(
-        (payment_link_config, status): (
-            storage::PaymentLink,
-            api_models::payments::PaymentLinkStatus,
-        ),
+        (payment_link_config, status): (storage::PaymentLink, payments::PaymentLinkStatus),
     ) -> Self {
         Self {
             payment_link_id: payment_link_config.payment_link_id,
@@ -1171,7 +1162,7 @@ impl ForeignFrom<storage::GatewayStatusMap> for gsm_api_types::GsmResponse {
     }
 }
 
-impl ForeignFrom<&domain::Customer> for api_models::payments::CustomerDetails {
+impl ForeignFrom<&domain::Customer> for payments::CustomerDetails {
     fn foreign_from(customer: &domain::Customer) -> Self {
         Self {
             id: customer.customer_id.clone(),
diff --git a/crates/router/src/utils.rs b/crates/router/src/utils.rs
index 341c560e4d2..51854978b9e 100644
--- a/crates/router/src/utils.rs
+++ b/crates/router/src/utils.rs
@@ -99,7 +99,7 @@ pub mod error_parser {
     }
 
     pub fn custom_json_error_handler(err: JsonPayloadError, _req: &HttpRequest) -> Error {
-        actix_web::error::Error::from(CustomJsonError { err })
+        Error::from(CustomJsonError { err })
     }
 }
 
@@ -565,14 +565,14 @@ pub fn add_connector_http_status_code_metrics(option_status_code: Option<u16>) {
 pub trait CustomerAddress {
     async fn get_address_update(
         &self,
-        address_details: api_models::payments::AddressDetails,
+        address_details: payments::AddressDetails,
         key: &[u8],
         storage_scheme: storage::enums::MerchantStorageScheme,
     ) -> CustomResult<storage::AddressUpdate, common_utils::errors::CryptoError>;
 
     async fn get_domain_address(
         &self,
-        address_details: api_models::payments::AddressDetails,
+        address_details: payments::AddressDetails,
         merchant_id: &str,
         customer_id: &str,
         key: &[u8],
@@ -584,7 +584,7 @@ pub trait CustomerAddress {
 impl CustomerAddress for api_models::customers::CustomerRequest {
     async fn get_address_update(
         &self,
-        address_details: api_models::payments::AddressDetails,
+        address_details: payments::AddressDetails,
         key: &[u8],
         storage_scheme: storage::enums::MerchantStorageScheme,
     ) -> CustomResult<storage::AddressUpdate, common_utils::errors::CryptoError> {
@@ -640,7 +640,7 @@ impl CustomerAddress for api_models::customers::CustomerRequest {
 
     async fn get_domain_address(
         &self,
-        address_details: api_models::payments::AddressDetails,
+        address_details: payments::AddressDetails,
         merchant_id: &str,
         customer_id: &str,
         key: &[u8],
diff --git a/crates/router/src/utils/currency.rs b/crates/router/src/utils/currency.rs
index 912f8fce94c..5cf68635c4e 100644
--- a/crates/router/src/utils/currency.rs
+++ b/crates/router/src/utils/currency.rs
@@ -525,10 +525,10 @@ pub async fn convert_currency(
     .await
     .change_context(ForexCacheError::ApiError)?;
 
-    let to_currency = api_models::enums::Currency::from_str(to_currency.as_str())
+    let to_currency = enums::Currency::from_str(to_currency.as_str())
         .change_context(ForexCacheError::CurrencyNotAcceptable)?;
 
-    let from_currency = api_models::enums::Currency::from_str(from_currency.as_str())
+    let from_currency = enums::Currency::from_str(from_currency.as_str())
         .change_context(ForexCacheError::CurrencyNotAcceptable)?;
 
     let converted_amount =
diff --git a/crates/router/src/utils/user.rs b/crates/router/src/utils/user.rs
index bde0fb72bd3..33e9aa6769c 100644
--- a/crates/router/src/utils/user.rs
+++ b/crates/router/src/utils/user.rs
@@ -11,7 +11,7 @@ use crate::{
     routes::AppState,
     services::{
         authentication::{AuthToken, UserFromToken},
-        authorization::roles::{self, RoleInfo},
+        authorization::roles::RoleInfo,
     },
     types::domain::{self, MerchantAccount, UserFromStorage},
 };
@@ -64,7 +64,7 @@ impl UserFromToken {
     }
 
     pub async fn get_role_info_from_db(&self, state: &AppState) -> UserResult<RoleInfo> {
-        roles::RoleInfo::from_role_id(state, &self.role_id, &self.merchant_id, &self.org_id)
+        RoleInfo::from_role_id(state, &self.role_id, &self.merchant_id, &self.org_id)
             .await
             .change_context(UserErrors::InternalServerError)
     }
diff --git a/crates/router/tests/connectors/aci.rs b/crates/router/tests/connectors/aci.rs
index 710d90a4ea3..2e5e8748f48 100644
--- a/crates/router/tests/connectors/aci.rs
+++ b/crates/router/tests/connectors/aci.rs
@@ -46,7 +46,7 @@ fn construct_payment_router_data() -> types::PaymentsAuthorizeRouterData {
                 card_type: None,
                 card_issuing_country: None,
                 bank_code: None,
-                nick_name: Some(masking::Secret::new("nick_name".into())),
+                nick_name: Some(Secret::new("nick_name".into())),
             }),
             confirm: true,
             statement_descriptor_suffix: None,
@@ -263,7 +263,7 @@ async fn payments_create_failure() {
                 card_type: None,
                 card_issuing_country: None,
                 bank_code: None,
-                nick_name: Some(masking::Secret::new("nick_name".into())),
+                nick_name: Some(Secret::new("nick_name".into())),
             });
 
         let response = services::api::execute_connector_processing_step(
diff --git a/crates/router/tests/connectors/adyen.rs b/crates/router/tests/connectors/adyen.rs
index 468834ca495..d19fff29003 100644
--- a/crates/router/tests/connectors/adyen.rs
+++ b/crates/router/tests/connectors/adyen.rs
@@ -151,7 +151,7 @@ impl AdyenTest {
                 card_type: None,
                 card_issuing_country: None,
                 bank_code: None,
-                nick_name: Some(masking::Secret::new("nick_name".into())),
+                nick_name: Some(Secret::new("nick_name".into())),
             }),
             confirm: true,
             statement_descriptor_suffix: None,
diff --git a/crates/router/tests/connectors/airwallex.rs b/crates/router/tests/connectors/airwallex.rs
index 95b07162ac3..2ef61099ca7 100644
--- a/crates/router/tests/connectors/airwallex.rs
+++ b/crates/router/tests/connectors/airwallex.rs
@@ -70,7 +70,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
 }
 fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4035501000000008").unwrap(),
             card_exp_month: Secret::new("02".to_string()),
             card_exp_year: Secret::new("2035".to_string()),
@@ -80,7 +80,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
             card_type: None,
             card_issuing_country: None,
             bank_code: None,
-            nick_name: Some(masking::Secret::new("nick_name".into())),
+            nick_name: Some(Secret::new("nick_name".into())),
         }),
         capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
         router_return_url: Some("https://google.com".to_string()),
@@ -143,7 +143,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -272,7 +272,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -370,7 +370,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -393,7 +393,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -416,7 +416,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -439,7 +439,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/authorizedotnet.rs b/crates/router/tests/connectors/authorizedotnet.rs
index 2b9a79b0b7b..4c724f368d7 100644
--- a/crates/router/tests/connectors/authorizedotnet.rs
+++ b/crates/router/tests/connectors/authorizedotnet.rs
@@ -55,9 +55,7 @@ async fn should_only_authorize_payment() {
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 300,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -72,7 +70,7 @@ async fn should_only_authorize_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -92,9 +90,7 @@ async fn should_capture_authorized_payment() {
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 301,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -109,9 +105,7 @@ async fn should_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
-                    txn_id.clone(),
-                ),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id.clone()),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -137,7 +131,7 @@ async fn should_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::CaptureInitiated,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -156,9 +150,7 @@ async fn should_partially_capture_authorized_payment() {
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 302,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -173,9 +165,7 @@ async fn should_partially_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
-                    txn_id.clone(),
-                ),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id.clone()),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -201,7 +191,7 @@ async fn should_partially_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::CaptureInitiated,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -220,9 +210,7 @@ async fn should_sync_authorized_payment() {
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 303,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -237,7 +225,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -256,9 +244,7 @@ async fn should_void_authorized_payment() {
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 304,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -273,9 +259,7 @@ async fn should_void_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
-                    txn_id.clone(),
-                ),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id.clone()),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -307,9 +291,7 @@ async fn should_make_payment() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 310,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -323,9 +305,7 @@ async fn should_make_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::CaptureInitiated,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
-                    txn_id.clone(),
-                ),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id.clone()),
                 encoded_data: None,
                 capture_method: None,
                 ..Default::default()
@@ -347,9 +327,7 @@ async fn should_sync_auto_captured_payment() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 311,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -364,7 +342,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -402,7 +380,7 @@ async fn should_fail_payment_for_empty_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -425,7 +403,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -448,7 +426,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -470,7 +448,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -493,9 +471,7 @@ async fn should_fail_void_payment_for_auto_capture() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 amount: 307,
-                payment_method_data: types::domain::PaymentMethodData::Card(
-                    get_payment_method_data(),
-                ),
+                payment_method_data: domain::PaymentMethodData::Card(get_payment_method_data()),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
             }),
diff --git a/crates/router/tests/connectors/bambora.rs b/crates/router/tests/connectors/bambora.rs
index 5cd82d097aa..3115c1143d7 100644
--- a/crates/router/tests/connectors/bambora.rs
+++ b/crates/router/tests/connectors/bambora.rs
@@ -40,7 +40,7 @@ static CONNECTOR: BamboraTest = BamboraTest {};
 
 fn get_default_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4030000010001234").unwrap(),
             card_exp_year: Secret::new("25".to_string()),
             card_cvc: Secret::new("123".to_string()),
@@ -101,7 +101,7 @@ async fn should_sync_authorized_payment() {
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
                 mandate_id: None,
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -217,7 +217,7 @@ async fn should_sync_auto_captured_payment() {
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
                 mandate_id: None,
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -296,7 +296,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
                     card_exp_year: Secret::new("25".to_string()),
                     ..utils::CCardType::default().0
@@ -319,7 +319,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("25".to_string()),
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
@@ -342,7 +342,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     card_number: cards::CardNumber::from_str("4030000010001234").unwrap(),
                     card_exp_year: Secret::new("25".to_string()),
@@ -367,7 +367,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     card_number: cards::CardNumber::from_str("4030000010001234").unwrap(),
                     card_cvc: Secret::new("123".to_string()),
diff --git a/crates/router/tests/connectors/bankofamerica.rs b/crates/router/tests/connectors/bankofamerica.rs
index ca54e9c97b9..77085216dd5 100644
--- a/crates/router/tests/connectors/bankofamerica.rs
+++ b/crates/router/tests/connectors/bankofamerica.rs
@@ -93,7 +93,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -213,7 +213,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -303,7 +303,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -325,7 +325,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -347,7 +347,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/billwerk.rs b/crates/router/tests/connectors/billwerk.rs
index 6795aa40115..4c992ef3d92 100644
--- a/crates/router/tests/connectors/billwerk.rs
+++ b/crates/router/tests/connectors/billwerk.rs
@@ -93,7 +93,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -213,7 +213,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
diff --git a/crates/router/tests/connectors/bitpay.rs b/crates/router/tests/connectors/bitpay.rs
index df82775d6cf..85b388f2fdb 100644
--- a/crates/router/tests/connectors/bitpay.rs
+++ b/crates/router/tests/connectors/bitpay.rs
@@ -10,12 +10,12 @@ use crate::{
 struct BitpayTest;
 impl ConnectorActions for BitpayTest {}
 impl utils::Connector for BitpayTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Bitpay;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Bitpay),
             connector_name: types::Connector::Bitpay,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -67,7 +67,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
         amount: 1,
         currency: enums::Currency::USD,
-        payment_method_data: types::domain::PaymentMethodData::Crypto(domain::CryptoData {
+        payment_method_data: domain::PaymentMethodData::Crypto(domain::CryptoData {
             pay_currency: None,
         }),
         confirm: true,
@@ -126,7 +126,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "NPf27TDfyU5mhcTCw2oaq4".to_string(),
                 ),
                 ..Default::default()
@@ -145,7 +145,7 @@ async fn should_sync_expired_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "bUsFf4RjQEahjbjGcETRS".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/bluesnap.rs b/crates/router/tests/connectors/bluesnap.rs
index 2e02f259341..3a654eda839 100644
--- a/crates/router/tests/connectors/bluesnap.rs
+++ b/crates/router/tests/connectors/bluesnap.rs
@@ -121,7 +121,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -261,7 +261,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -401,7 +401,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -426,7 +426,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -451,7 +451,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
         .make_payment(
             Some(types::PaymentsAuthorizeData {
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/boku.rs b/crates/router/tests/connectors/boku.rs
index 2f496562e1d..f361a2365d5 100644
--- a/crates/router/tests/connectors/boku.rs
+++ b/crates/router/tests/connectors/boku.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/cashtocode.rs b/crates/router/tests/connectors/cashtocode.rs
index 616a080699b..025d9cdac64 100644
--- a/crates/router/tests/connectors/cashtocode.rs
+++ b/crates/router/tests/connectors/cashtocode.rs
@@ -39,7 +39,7 @@ static CONNECTOR: CashtocodeTest = CashtocodeTest {};
 impl CashtocodeTest {
     fn get_payment_authorize_data(
         payment_method_type: Option<enums::PaymentMethodType>,
-        payment_method_data: types::domain::PaymentMethodData,
+        payment_method_data: domain::PaymentMethodData,
     ) -> Option<types::PaymentsAuthorizeData> {
         Some(types::PaymentsAuthorizeData {
             amount: 1000,
diff --git a/crates/router/tests/connectors/checkout.rs b/crates/router/tests/connectors/checkout.rs
index 85b55afc8ea..886239878f2 100644
--- a/crates/router/tests/connectors/checkout.rs
+++ b/crates/router/tests/connectors/checkout.rs
@@ -97,7 +97,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -223,7 +223,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -320,7 +320,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -343,7 +343,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -366,7 +366,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/coinbase.rs b/crates/router/tests/connectors/coinbase.rs
index 0136284c826..0bcb3c705ab 100644
--- a/crates/router/tests/connectors/coinbase.rs
+++ b/crates/router/tests/connectors/coinbase.rs
@@ -11,12 +11,12 @@ use crate::{
 struct CoinbaseTest;
 impl ConnectorActions for CoinbaseTest {}
 impl utils::Connector for CoinbaseTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Coinbase;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Coinbase),
             connector_name: types::Connector::Coinbase,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -69,7 +69,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
         amount: 1,
         currency: enums::Currency::USD,
-        payment_method_data: types::domain::PaymentMethodData::Crypto(domain::CryptoData {
+        payment_method_data: domain::PaymentMethodData::Crypto(domain::CryptoData {
             pay_currency: None,
         }),
         confirm: true,
@@ -128,7 +128,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "ADFY3789".to_string(),
                 ),
                 ..Default::default()
@@ -147,7 +147,7 @@ async fn should_sync_unresolved_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "YJ6RFZXZ".to_string(),
                 ),
                 ..Default::default()
@@ -166,7 +166,7 @@ async fn should_sync_expired_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "FZ89KDDB".to_string(),
                 ),
                 ..Default::default()
@@ -185,7 +185,7 @@ async fn should_sync_cancelled_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "C35AAXKF".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/cryptopay.rs b/crates/router/tests/connectors/cryptopay.rs
index 56c0e29f621..626c05fe114 100644
--- a/crates/router/tests/connectors/cryptopay.rs
+++ b/crates/router/tests/connectors/cryptopay.rs
@@ -10,12 +10,12 @@ use crate::{
 struct CryptopayTest;
 impl ConnectorActions for CryptopayTest {}
 impl utils::Connector for CryptopayTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Cryptopay;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Cryptopay),
             connector_name: types::Connector::Cryptopay,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -68,7 +68,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
         amount: 1,
         currency: enums::Currency::USD,
-        payment_method_data: types::domain::PaymentMethodData::Crypto(domain::CryptoData {
+        payment_method_data: domain::PaymentMethodData::Crypto(domain::CryptoData {
             pay_currency: Some("XRP".to_string()),
         }),
         confirm: true,
@@ -126,7 +126,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "ea684036-2b54-44fa-bffe-8256650dce7c".to_string(),
                 ),
                 ..Default::default()
@@ -145,7 +145,7 @@ async fn should_sync_unresolved_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "7993d4c2-efbc-4360-b8ce-d1e957e6f827".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/cybersource.rs b/crates/router/tests/connectors/cybersource.rs
index 98ec44abd8a..700e9a2d946 100644
--- a/crates/router/tests/connectors/cybersource.rs
+++ b/crates/router/tests/connectors/cybersource.rs
@@ -2,10 +2,7 @@ use std::str::FromStr;
 
 use common_utils::pii::Email;
 use masking::Secret;
-use router::types::{
-    self, api, domain,
-    storage::{self, enums},
-};
+use router::types::{self, api, domain, storage::enums};
 
 use crate::{
     connector_auth,
@@ -14,12 +11,12 @@ use crate::{
 struct Cybersource;
 impl ConnectorActions for Cybersource {}
 impl utils::Connector for Cybersource {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Cybersource;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Cybersource),
             connector_name: types::Connector::Cybersource,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -64,7 +61,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
 }
 fn get_default_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        currency: storage::enums::Currency::USD,
+        currency: enums::Currency::USD,
         email: Some(Email::from_str("abc@gmail.com").unwrap()),
         ..PaymentAuthorizeType::default().0
     })
@@ -127,7 +124,7 @@ async fn should_sync_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "6699597903496176903954".to_string(),
                 ),
                 ..Default::default()
@@ -160,7 +157,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = Cybersource {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("13".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -185,7 +182,7 @@ async fn should_fail_payment_for_invalid_exp_year() {
     let response = Cybersource {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2022".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -203,7 +200,7 @@ async fn should_fail_payment_for_invalid_card_cvc() {
     let response = Cybersource {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("2131233213".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/dlocal.rs b/crates/router/tests/connectors/dlocal.rs
index edb24646bcb..b715e20fec4 100644
--- a/crates/router/tests/connectors/dlocal.rs
+++ b/crates/router/tests/connectors/dlocal.rs
@@ -13,12 +13,12 @@ use crate::{
 struct DlocalTest;
 impl ConnectorActions for DlocalTest {}
 impl utils::Connector for DlocalTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Dlocal;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Dlocal),
             connector_name: types::Connector::Dlocal,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -89,7 +89,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -200,7 +200,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -289,7 +289,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("1891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -310,7 +310,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("1ad2345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -331,7 +331,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("201".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -352,7 +352,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("20001".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/dummyconnector.rs b/crates/router/tests/connectors/dummyconnector.rs
index 76f72b64907..e357eda94c4 100644
--- a/crates/router/tests/connectors/dummyconnector.rs
+++ b/crates/router/tests/connectors/dummyconnector.rs
@@ -95,7 +95,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -215,7 +215,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -305,7 +305,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: CardNumber::from_str("1234567891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -327,7 +327,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -349,7 +349,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -371,7 +371,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/ebanx.rs b/crates/router/tests/connectors/ebanx.rs
index 8571ed1e3f8..6f02c80ebde 100644
--- a/crates/router/tests/connectors/ebanx.rs
+++ b/crates/router/tests/connectors/ebanx.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
diff --git a/crates/router/tests/connectors/fiserv.rs b/crates/router/tests/connectors/fiserv.rs
index 050d6a54067..f95c0d276ec 100644
--- a/crates/router/tests/connectors/fiserv.rs
+++ b/crates/router/tests/connectors/fiserv.rs
@@ -42,7 +42,7 @@ impl utils::Connector for FiservTest {
 
 fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4005550000000019").unwrap(),
             card_exp_month: Secret::new("02".to_string()),
             card_exp_year: Secret::new("2035".to_string()),
@@ -52,7 +52,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
             card_type: None,
             card_issuing_country: None,
             bank_code: None,
-            nick_name: Some(masking::Secret::new("nick_name".into())),
+            nick_name: Some(Secret::new("nick_name".into())),
         }),
         capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
         ..utils::PaymentAuthorizeType::default().0
@@ -123,7 +123,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -252,7 +252,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -347,7 +347,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -370,7 +370,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -393,7 +393,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -416,7 +416,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/forte.rs b/crates/router/tests/connectors/forte.rs
index c58cab38a22..1c99c2ff7b5 100644
--- a/crates/router/tests/connectors/forte.rs
+++ b/crates/router/tests/connectors/forte.rs
@@ -13,12 +13,12 @@ use crate::{
 struct ForteTest;
 impl ConnectorActions for ForteTest {}
 impl utils::Connector for ForteTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Forte;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Forte),
             connector_name: types::Connector::Forte,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -41,7 +41,7 @@ static CONNECTOR: ForteTest = ForteTest {};
 
 fn get_payment_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: CardNumber::from_str("4111111111111111").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -148,7 +148,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -319,7 +319,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -467,7 +467,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -489,7 +489,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -512,7 +512,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -630,7 +630,7 @@ async fn should_fail_for_refund_amount_higher_than_payment_amount() {
 #[actix_web::test]
 async fn should_throw_not_implemented_for_unsupported_issuer() {
     let authorize_data = Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: CardNumber::from_str("6759649826438453").unwrap(),
             ..utils::CCardType::default().0
         }),
diff --git a/crates/router/tests/connectors/globalpay.rs b/crates/router/tests/connectors/globalpay.rs
index e2ca19869f5..8ca4d6f1ae3 100644
--- a/crates/router/tests/connectors/globalpay.rs
+++ b/crates/router/tests/connectors/globalpay.rs
@@ -13,12 +13,12 @@ struct Globalpay;
 impl ConnectorActions for Globalpay {}
 static CONNECTOR: Globalpay = Globalpay {};
 impl Connector for Globalpay {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Globalpay;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Globalpay),
             connector_name: types::Connector::Globalpay,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -42,7 +42,7 @@ impl Connector for Globalpay {
 }
 
 fn get_access_token() -> Option<AccessToken> {
-    match utils::Connector::get_auth_token(&CONNECTOR) {
+    match Connector::get_auth_token(&CONNECTOR) {
         ConnectorAuthType::BodyKey { api_key, key1: _ } => Some(AccessToken {
             token: api_key,
             expires: 18600,
@@ -120,7 +120,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -137,7 +137,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4024007134364842").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -345,7 +345,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -367,7 +367,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -410,7 +410,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/globepay.rs b/crates/router/tests/connectors/globepay.rs
index 70167970210..34a2ecb4c88 100644
--- a/crates/router/tests/connectors/globepay.rs
+++ b/crates/router/tests/connectors/globepay.rs
@@ -94,7 +94,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -214,7 +214,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -304,7 +304,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -326,7 +326,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -348,7 +348,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/gocardless.rs b/crates/router/tests/connectors/gocardless.rs
index 0564ea7da6d..f7f2ed864bf 100644
--- a/crates/router/tests/connectors/gocardless.rs
+++ b/crates/router/tests/connectors/gocardless.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/helcim.rs b/crates/router/tests/connectors/helcim.rs
index dc3bb4d47e6..7bb4b9ab785 100644
--- a/crates/router/tests/connectors/helcim.rs
+++ b/crates/router/tests/connectors/helcim.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/iatapay.rs b/crates/router/tests/connectors/iatapay.rs
index d685756094e..dfb8e097be3 100644
--- a/crates/router/tests/connectors/iatapay.rs
+++ b/crates/router/tests/connectors/iatapay.rs
@@ -12,12 +12,12 @@ use crate::{
 struct IatapayTest;
 impl ConnectorActions for IatapayTest {}
 impl Connector for IatapayTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Iatapay;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Iatapay),
             connector_name: types::Connector::Iatapay,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -155,7 +155,7 @@ async fn should_sync_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "PE9OTYNP639XW".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/main.rs b/crates/router/tests/connectors/main.rs
index eb1c00a227b..78e67b7670a 100644
--- a/crates/router/tests/connectors/main.rs
+++ b/crates/router/tests/connectors/main.rs
@@ -62,6 +62,7 @@ mod trustpay;
 mod tsys;
 mod utils;
 mod volt;
+#[cfg(feature = "payouts")]
 mod wise;
 mod worldline;
 mod worldpay;
diff --git a/crates/router/tests/connectors/mollie.rs b/crates/router/tests/connectors/mollie.rs
index 14c77e2a9f0..be0b5d1c1d7 100644
--- a/crates/router/tests/connectors/mollie.rs
+++ b/crates/router/tests/connectors/mollie.rs
@@ -5,6 +5,7 @@ use crate::{
     utils::{self, ConnectorActions},
 };
 
+#[allow(dead_code)]
 #[derive(Clone, Copy)]
 struct MollieTest;
 impl ConnectorActions for MollieTest {}
diff --git a/crates/router/tests/connectors/multisafepay.rs b/crates/router/tests/connectors/multisafepay.rs
index f35fe05bf36..606b60b2490 100644
--- a/crates/router/tests/connectors/multisafepay.rs
+++ b/crates/router/tests/connectors/multisafepay.rs
@@ -59,7 +59,7 @@ fn get_default_payment_info() -> Option<PaymentInfo> {
     ));
     Some(PaymentInfo {
         address,
-        ..utils::PaymentInfo::default()
+        ..PaymentInfo::default()
     })
 }
 
@@ -121,7 +121,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -237,7 +237,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -331,7 +331,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("123498765".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -350,7 +350,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -369,7 +369,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/netcetera.rs b/crates/router/tests/connectors/netcetera.rs
index f06e2a0f5d7..d7fceca9c5d 100644
--- a/crates/router/tests/connectors/netcetera.rs
+++ b/crates/router/tests/connectors/netcetera.rs
@@ -91,7 +91,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -211,7 +211,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
diff --git a/crates/router/tests/connectors/nexinets.rs b/crates/router/tests/connectors/nexinets.rs
index 5948855ae8d..cdf94113c5a 100644
--- a/crates/router/tests/connectors/nexinets.rs
+++ b/crates/router/tests/connectors/nexinets.rs
@@ -41,7 +41,7 @@ impl utils::Connector for NexinetsTest {
 fn payment_method_details() -> Option<PaymentsAuthorizeData> {
     Some(PaymentsAuthorizeData {
         currency: diesel_models::enums::Currency::EUR,
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: CardNumber::from_str("374111111111111").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -118,7 +118,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 sync_type: types::SyncRequestType::SinglePaymentSync,
@@ -341,7 +341,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 capture_method: Some(enums::CaptureMethod::Automatic),
                 connector_meta,
                 ..Default::default()
@@ -506,7 +506,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -528,7 +528,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -550,7 +550,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/nmi.rs b/crates/router/tests/connectors/nmi.rs
index 5b569fa497f..1d719e052a0 100644
--- a/crates/router/tests/connectors/nmi.rs
+++ b/crates/router/tests/connectors/nmi.rs
@@ -38,7 +38,7 @@ static CONNECTOR: NmiTest = NmiTest {};
 
 fn get_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -60,10 +60,10 @@ async fn should_only_authorize_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -87,10 +87,10 @@ async fn should_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -110,10 +110,10 @@ async fn should_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -136,10 +136,10 @@ async fn should_partially_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -167,10 +167,10 @@ async fn should_partially_capture_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -194,10 +194,10 @@ async fn should_void_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -223,10 +223,10 @@ async fn should_void_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Voided,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -250,10 +250,10 @@ async fn should_refund_manually_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -273,10 +273,10 @@ async fn should_refund_manually_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -319,10 +319,10 @@ async fn should_partially_refund_manually_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -349,10 +349,10 @@ async fn should_partially_refund_manually_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -402,10 +402,10 @@ async fn should_make_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
@@ -429,10 +429,10 @@ async fn should_refund_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
@@ -475,10 +475,10 @@ async fn should_partially_refund_succeeded_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
@@ -528,10 +528,10 @@ async fn should_refund_succeeded_payment_multiple_times() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
@@ -600,10 +600,10 @@ async fn should_fail_void_payment_for_auto_capture() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
@@ -633,10 +633,10 @@ async fn should_fail_capture_for_invalid_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Manual),
+                capture_method: Some(enums::CaptureMethod::Manual),
                 ..Default::default()
             }),
             None,
@@ -665,10 +665,10 @@ async fn should_fail_for_refund_amount_higher_than_payment_amount() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Pending,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     transaction_id.clone(),
                 ),
-                capture_method: Some(types::storage::enums::CaptureMethod::Automatic),
+                capture_method: Some(enums::CaptureMethod::Automatic),
                 ..Default::default()
             }),
             None,
diff --git a/crates/router/tests/connectors/noon.rs b/crates/router/tests/connectors/noon.rs
index 7e0bb954c6c..47e76d5ec76 100644
--- a/crates/router/tests/connectors/noon.rs
+++ b/crates/router/tests/connectors/noon.rs
@@ -1,10 +1,7 @@
 use std::str::FromStr;
 
 use masking::Secret;
-use router::types::{
-    self,
-    storage::{self, enums},
-};
+use router::types::{self, storage::enums};
 
 use crate::{
     connector_auth,
@@ -47,7 +44,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
 
 fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        currency: storage::enums::Currency::AED,
+        currency: enums::Currency::AED,
         ..utils::PaymentAuthorizeType::default().0
     })
 }
@@ -102,7 +99,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -222,7 +219,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
diff --git a/crates/router/tests/connectors/nuvei.rs b/crates/router/tests/connectors/nuvei.rs
index 04a83b3a606..55a8f234219 100644
--- a/crates/router/tests/connectors/nuvei.rs
+++ b/crates/router/tests/connectors/nuvei.rs
@@ -1,10 +1,7 @@
 use std::str::FromStr;
 
 use masking::Secret;
-use router::types::{
-    self,
-    storage::{self, enums},
-};
+use router::types::{self, storage::enums};
 use serde_json::json;
 
 use crate::{
@@ -102,7 +99,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 connector_meta: Some(json!({
@@ -126,7 +123,7 @@ async fn should_void_authorized_payment() {
             Some(types::PaymentsCancelData {
                 cancellation_reason: Some("requested_by_customer".to_string()),
                 amount: Some(100),
-                currency: Some(storage::enums::Currency::USD),
+                currency: Some(enums::Currency::USD),
                 ..Default::default()
             }),
             None,
@@ -194,7 +191,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 connector_meta: Some(json!({
@@ -345,7 +342,7 @@ async fn should_fail_void_payment_for_auto_capture() {
             Some(types::PaymentsCancelData {
                 cancellation_reason: Some("requested_by_customer".to_string()),
                 amount: Some(100),
-                currency: Some(storage::enums::Currency::USD),
+                currency: Some(enums::Currency::USD),
                 ..Default::default()
             }),
             None,
diff --git a/crates/router/tests/connectors/opayo.rs b/crates/router/tests/connectors/opayo.rs
index f4badf9b116..b383a2e1b0e 100644
--- a/crates/router/tests/connectors/opayo.rs
+++ b/crates/router/tests/connectors/opayo.rs
@@ -97,7 +97,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -217,7 +217,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -307,7 +307,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -329,7 +329,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -351,7 +351,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -373,7 +373,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/opennode.rs b/crates/router/tests/connectors/opennode.rs
index e4d347c26d1..c91126953de 100644
--- a/crates/router/tests/connectors/opennode.rs
+++ b/crates/router/tests/connectors/opennode.rs
@@ -10,12 +10,12 @@ use crate::{
 struct OpennodeTest;
 impl ConnectorActions for OpennodeTest {}
 impl utils::Connector for OpennodeTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Opennode;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Opennode),
             connector_name: types::Connector::Opennode,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -68,7 +68,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
         amount: 1,
         currency: enums::Currency::USD,
-        payment_method_data: types::domain::PaymentMethodData::Crypto(domain::CryptoData {
+        payment_method_data: domain::PaymentMethodData::Crypto(domain::CryptoData {
             pay_currency: None,
         }),
         confirm: true,
@@ -127,7 +127,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "5adebfb1-802e-432b-8b42-5db4b754b2eb".to_string(),
                 ),
                 ..Default::default()
@@ -146,7 +146,7 @@ async fn should_sync_unresolved_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "4cf63e6b-5135-49cb-997f-6e0b30fecebc".to_string(),
                 ),
                 ..Default::default()
@@ -165,7 +165,7 @@ async fn should_sync_expired_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "c36a097a-5091-4317-8749-80343a71c1c4".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/payme.rs b/crates/router/tests/connectors/payme.rs
index a1682001488..234f3a0eeb8 100644
--- a/crates/router/tests/connectors/payme.rs
+++ b/crates/router/tests/connectors/payme.rs
@@ -91,7 +91,7 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
         router_return_url: Some("https://hyperswitch.io".to_string()),
         webhook_url: Some("https://hyperswitch.io".to_string()),
         email: Some(Email::from_str("test@gmail.com").unwrap()),
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
             card_cvc: Secret::new("123".to_string()),
             card_exp_month: Secret::new("10".to_string()),
@@ -155,7 +155,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -280,7 +280,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -372,7 +372,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
             Some(types::PaymentsAuthorizeData {
                 amount: 100,
                 currency: enums::Currency::ILS,
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -391,7 +391,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
                 router_return_url: Some("https://hyperswitch.io".to_string()),
                 webhook_url: Some("https://hyperswitch.io".to_string()),
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                ..utils::PaymentAuthorizeType::default().0
+                ..PaymentAuthorizeType::default().0
             }),
             get_default_payment_info(),
         )
@@ -411,7 +411,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
             Some(types::PaymentsAuthorizeData {
                 amount: 100,
                 currency: enums::Currency::ILS,
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -430,7 +430,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
                 router_return_url: Some("https://hyperswitch.io".to_string()),
                 webhook_url: Some("https://hyperswitch.io".to_string()),
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                ..utils::PaymentAuthorizeType::default().0
+                ..PaymentAuthorizeType::default().0
             }),
             get_default_payment_info(),
         )
@@ -450,7 +450,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
             Some(types::PaymentsAuthorizeData {
                 amount: 100,
                 currency: enums::Currency::ILS,
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2012".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -469,7 +469,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
                 router_return_url: Some("https://hyperswitch.io".to_string()),
                 webhook_url: Some("https://hyperswitch.io".to_string()),
                 email: Some(Email::from_str("test@gmail.com").unwrap()),
-                ..utils::PaymentAuthorizeType::default().0
+                ..PaymentAuthorizeType::default().0
             }),
             get_default_payment_info(),
         )
diff --git a/crates/router/tests/connectors/paypal.rs b/crates/router/tests/connectors/paypal.rs
index bded135f45d..704aeca5936 100644
--- a/crates/router/tests/connectors/paypal.rs
+++ b/crates/router/tests/connectors/paypal.rs
@@ -56,7 +56,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
 
 fn get_payment_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4000020000000000").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -136,7 +136,7 @@ async fn should_sync_authorized_payment() {
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
                 mandate_id: None,
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(txn_id),
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(txn_id),
                 encoded_data: None,
                 capture_method: None,
                 sync_type: types::SyncRequestType::SinglePaymentSync,
@@ -332,7 +332,7 @@ async fn should_sync_auto_captured_payment() {
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
                 mandate_id: None,
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -450,7 +450,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -476,7 +476,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -502,7 +502,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/payu.rs b/crates/router/tests/connectors/payu.rs
index fc916e33677..2f6ebcefe6a 100644
--- a/crates/router/tests/connectors/payu.rs
+++ b/crates/router/tests/connectors/payu.rs
@@ -70,7 +70,7 @@ async fn should_authorize_card_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Authorized,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id.clone(),
                     ),
                     ..Default::default()
@@ -115,7 +115,7 @@ async fn should_authorize_gpay_payment() {
         let sync_response = Payu {}
             .sync_payment(
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id.clone(),
                     ),
                     ..Default::default()
@@ -148,7 +148,7 @@ async fn should_capture_already_authorized_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Authorized,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id.clone(),
                     ),
                     ..Default::default()
@@ -167,7 +167,7 @@ async fn should_capture_already_authorized_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Charged,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id,
                     ),
                     ..Default::default()
@@ -203,7 +203,7 @@ async fn should_sync_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Authorized,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id,
                     ),
                     ..Default::default()
@@ -246,7 +246,7 @@ async fn should_void_already_authorized_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Voided,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id,
                     ),
                     ..Default::default()
@@ -280,7 +280,7 @@ async fn should_refund_succeeded_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Authorized,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id.clone(),
                     ),
                     ..Default::default()
@@ -301,7 +301,7 @@ async fn should_refund_succeeded_payment() {
             .psync_retry_till_status_matches(
                 enums::AttemptStatus::Charged,
                 Some(types::PaymentsSyncData {
-                    connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                    connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                         transaction_id.clone(),
                     ),
                     ..Default::default()
diff --git a/crates/router/tests/connectors/placetopay.rs b/crates/router/tests/connectors/placetopay.rs
index 41675b9751b..d9b75cbe0e8 100644
--- a/crates/router/tests/connectors/placetopay.rs
+++ b/crates/router/tests/connectors/placetopay.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/powertranz.rs b/crates/router/tests/connectors/powertranz.rs
index 0701ec006d9..7f1e1937e05 100644
--- a/crates/router/tests/connectors/powertranz.rs
+++ b/crates/router/tests/connectors/powertranz.rs
@@ -96,7 +96,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -218,7 +218,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -310,7 +310,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -332,7 +332,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -354,7 +354,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/prophetpay.rs b/crates/router/tests/connectors/prophetpay.rs
index 9a0e2dbfa0e..5e326c0bcd3 100644
--- a/crates/router/tests/connectors/prophetpay.rs
+++ b/crates/router/tests/connectors/prophetpay.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/rapyd.rs b/crates/router/tests/connectors/rapyd.rs
index 61bc7ccdf15..4b5357c51ec 100644
--- a/crates/router/tests/connectors/rapyd.rs
+++ b/crates/router/tests/connectors/rapyd.rs
@@ -42,7 +42,7 @@ async fn should_only_authorize_payment() {
     let response = Rapyd {}
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
                     card_exp_month: Secret::new("02".to_string()),
                     card_exp_year: Secret::new("2024".to_string()),
@@ -52,7 +52,7 @@ async fn should_only_authorize_payment() {
                     card_type: None,
                     card_issuing_country: None,
                     bank_code: None,
-                    nick_name: Some(masking::Secret::new("nick_name".into())),
+                    nick_name: Some(Secret::new("nick_name".into())),
                 }),
                 capture_method: Some(diesel_models::enums::CaptureMethod::Manual),
                 ..utils::PaymentAuthorizeType::default().0
@@ -69,7 +69,7 @@ async fn should_authorize_and_capture_payment() {
     let response = Rapyd {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
                     card_exp_month: Secret::new("02".to_string()),
                     card_exp_year: Secret::new("2024".to_string()),
@@ -79,7 +79,7 @@ async fn should_authorize_and_capture_payment() {
                     card_type: None,
                     card_issuing_country: None,
                     bank_code: None,
-                    nick_name: Some(masking::Secret::new("nick_name".into())),
+                    nick_name: Some(Secret::new("nick_name".into())),
                 }),
                 ..utils::PaymentAuthorizeType::default().0
             }),
@@ -157,7 +157,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = Rapyd {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("0000000000000000").unwrap(),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/shift4.rs b/crates/router/tests/connectors/shift4.rs
index 8f11fbfa1d8..632e5389351 100644
--- a/crates/router/tests/connectors/shift4.rs
+++ b/crates/router/tests/connectors/shift4.rs
@@ -90,7 +90,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -114,7 +114,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -151,7 +151,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4024007134364842").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -173,7 +173,7 @@ async fn should_succeed_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("asdasd".to_string()), //shift4 accept invalid CVV as it doesn't accept CVV
                     ..utils::CCardType::default().0
                 }),
@@ -192,7 +192,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -214,7 +214,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/square.rs b/crates/router/tests/connectors/square.rs
index 01d90c73c42..2dcd93cc105 100644
--- a/crates/router/tests/connectors/square.rs
+++ b/crates/router/tests/connectors/square.rs
@@ -1,11 +1,7 @@
 use std::{str::FromStr, time::Duration};
 
 use masking::Secret;
-use router::types::{
-    self,
-    storage::{self, enums},
-    PaymentsResponseData,
-};
+use router::types::{self, storage::enums, PaymentsResponseData};
 use test_utils::connector_auth::ConnectorAuthentication;
 
 use crate::utils::{self, get_connector_transaction_id, Connector, ConnectorActions};
@@ -71,7 +67,7 @@ fn token_details() -> Option<types::PaymentMethodTokenizationData> {
         }),
         browser_info: None,
         amount: None,
-        currency: storage::enums::Currency::USD,
+        currency: enums::Currency::USD,
     })
 }
 
@@ -147,7 +143,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -291,7 +287,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -444,7 +440,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
                 }),
                 browser_info: None,
                 amount: None,
-                currency: storage::enums::Currency::USD,
+                currency: enums::Currency::USD,
             }),
             get_default_payment_info(None),
         )
@@ -475,7 +471,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
                 }),
                 browser_info: None,
                 amount: None,
-                currency: storage::enums::Currency::USD,
+                currency: enums::Currency::USD,
             }),
             get_default_payment_info(None),
         )
@@ -506,7 +502,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
                 }),
                 browser_info: None,
                 amount: None,
-                currency: storage::enums::Currency::USD,
+                currency: enums::Currency::USD,
             }),
             get_default_payment_info(None),
         )
diff --git a/crates/router/tests/connectors/stax.rs b/crates/router/tests/connectors/stax.rs
index d16f209a49a..421ad9524c3 100644
--- a/crates/router/tests/connectors/stax.rs
+++ b/crates/router/tests/connectors/stax.rs
@@ -63,7 +63,7 @@ fn customer_details() -> Option<types::ConnectorCustomerData> {
 
 fn token_details() -> Option<types::PaymentMethodTokenizationData> {
     Some(types::PaymentMethodTokenizationData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
             card_exp_month: Secret::new("04".to_string()),
             card_exp_year: Secret::new("2027".to_string()),
@@ -167,7 +167,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -344,7 +344,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -473,7 +473,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let token_response = CONNECTOR
         .create_connector_pm_token(
             Some(types::PaymentMethodTokenizationData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
                     card_exp_month: Secret::new("11".to_string()),
                     card_exp_year: Secret::new("2027".to_string()),
@@ -511,7 +511,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let token_response = CONNECTOR
         .create_connector_pm_token(
             Some(types::PaymentMethodTokenizationData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
                     card_exp_month: Secret::new("20".to_string()),
                     card_exp_year: Secret::new("2027".to_string()),
@@ -549,7 +549,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let token_response = CONNECTOR
         .create_connector_pm_token(
             Some(types::PaymentMethodTokenizationData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4111111111111111").unwrap(),
                     card_exp_month: Secret::new("04".to_string()),
                     card_exp_year: Secret::new("2000".to_string()),
diff --git a/crates/router/tests/connectors/stripe.rs b/crates/router/tests/connectors/stripe.rs
index 3dcaeba45b0..2d6b3e0cfd3 100644
--- a/crates/router/tests/connectors/stripe.rs
+++ b/crates/router/tests/connectors/stripe.rs
@@ -37,7 +37,7 @@ impl utils::Connector for Stripe {
 
 fn get_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4242424242424242").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -100,7 +100,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -124,7 +124,7 @@ async fn should_sync_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -158,7 +158,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = Stripe {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: cards::CardNumber::from_str("4024007134364842").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -180,7 +180,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = Stripe {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("13".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -202,7 +202,7 @@ async fn should_fail_payment_for_invalid_exp_year() {
     let response = Stripe {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2022".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -221,7 +221,7 @@ async fn should_fail_payment_for_invalid_card_cvc() {
     let response = Stripe {}
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/trustpay.rs b/crates/router/tests/connectors/trustpay.rs
index 48cd165767c..fba612863b4 100644
--- a/crates/router/tests/connectors/trustpay.rs
+++ b/crates/router/tests/connectors/trustpay.rs
@@ -12,12 +12,12 @@ use crate::{
 struct TrustpayTest;
 impl ConnectorActions for TrustpayTest {}
 impl utils::Connector for TrustpayTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Trustpay;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Trustpay),
             connector_name: types::Connector::Trustpay,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
@@ -53,7 +53,7 @@ fn get_default_browser_info() -> BrowserInformation {
 
 fn get_default_payment_authorize_data() -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4200000000000000").unwrap(),
             card_exp_year: Secret::new("25".to_string()),
             card_cvc: Secret::new("123".to_string()),
@@ -122,7 +122,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -182,7 +182,7 @@ async fn should_sync_refund() {
 #[actix_web::test]
 async fn should_fail_payment_for_incorrect_card_number() {
     let payment_authorize_data = types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
             card_exp_year: Secret::new("25".to_string()),
             card_cvc: Secret::new("123".to_string()),
@@ -205,7 +205,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
 #[actix_web::test]
 async fn should_fail_payment_for_incorrect_expiry_year() {
     let payment_authorize_data = Some(types::PaymentsAuthorizeData {
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: cards::CardNumber::from_str("4200000000000000").unwrap(),
             card_exp_year: Secret::new("22".to_string()),
             card_cvc: Secret::new("123".to_string()),
diff --git a/crates/router/tests/connectors/tsys.rs b/crates/router/tests/connectors/tsys.rs
index d7a688bd128..ef4f576ad9e 100644
--- a/crates/router/tests/connectors/tsys.rs
+++ b/crates/router/tests/connectors/tsys.rs
@@ -46,7 +46,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
 fn payment_method_details(amount: i64) -> Option<types::PaymentsAuthorizeData> {
     Some(types::PaymentsAuthorizeData {
         amount,
-        payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+        payment_method_data: domain::PaymentMethodData::Card(domain::Card {
             card_number: CardNumber::from_str("4111111111111111").unwrap(),
             ..utils::CCardType::default().0
         }),
@@ -108,7 +108,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -244,7 +244,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -368,7 +368,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -390,7 +390,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("abcd".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs
index 9678eca73f3..3196c4c763b 100644
--- a/crates/router/tests/connectors/utils.rs
+++ b/crates/router/tests/connectors/utils.rs
@@ -8,7 +8,7 @@ use masking::Secret;
 use router::core::utils as core_utils;
 use router::{
     configs::settings::Settings,
-    core::{errors, errors::ConnectorError, payments},
+    core::{errors::ConnectorError, payments},
     db::StorageImpl,
     routes, services,
     types::{self, storage::enums, AccessToken, PaymentAddress, RouterData},
@@ -57,7 +57,7 @@ pub struct PaymentInfo {
 impl PaymentInfo {
     pub fn with_default_billing_name() -> Self {
         Self {
-            address: Some(types::PaymentAddress::new(
+            address: Some(PaymentAddress::new(
                 None,
                 None,
                 Some(types::api::Address {
@@ -215,7 +215,7 @@ pub trait ConnectorActions: Connector {
             }
             tokio::time::sleep(Duration::from_secs(self.get_request_interval())).await;
         }
-        Err(errors::ConnectorError::ProcessingStepFailed(None).into())
+        Err(ConnectorError::ProcessingStepFailed(None).into())
     }
 
     async fn capture_payment(
@@ -453,7 +453,7 @@ pub trait ConnectorActions: Connector {
             }
             tokio::time::sleep(Duration::from_secs(self.get_request_interval())).await;
         }
-        Err(errors::ConnectorError::ProcessingStepFailed(None).into())
+        Err(ConnectorError::ProcessingStepFailed(None).into())
     }
 
     #[cfg(feature = "payouts")]
@@ -523,7 +523,7 @@ pub trait ConnectorActions: Connector {
                 .unwrap(),
             connector_meta_data: info
                 .clone()
-                .and_then(|a| a.connector_meta_data.map(masking::Secret::new)),
+                .and_then(|a| a.connector_meta_data.map(Secret::new)),
             amount_captured: None,
             access_token: info.clone().and_then(|a| a.access_token),
             session_token: None,
@@ -902,7 +902,7 @@ impl Default for CCardType {
             card_type: None,
             card_issuing_country: None,
             bank_code: None,
-            nick_name: Some(masking::Secret::new("nick_name".into())),
+            nick_name: Some(Secret::new("nick_name".into())),
         })
     }
 }
diff --git a/crates/router/tests/connectors/volt.rs b/crates/router/tests/connectors/volt.rs
index 7bcdf63d918..efe6d603e70 100644
--- a/crates/router/tests/connectors/volt.rs
+++ b/crates/router/tests/connectors/volt.rs
@@ -92,7 +92,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 ..Default::default()
@@ -212,7 +212,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
@@ -302,7 +302,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -324,7 +324,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -346,7 +346,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/connectors/wise.rs b/crates/router/tests/connectors/wise.rs
index b85fb4f1c96..fd5bbc109d9 100644
--- a/crates/router/tests/connectors/wise.rs
+++ b/crates/router/tests/connectors/wise.rs
@@ -1,38 +1,36 @@
-#[cfg(feature = "payouts")]
 use api_models::payments::{Address, AddressDetails};
-#[cfg(feature = "payouts")]
 use masking::Secret;
-use router::types;
-#[cfg(feature = "payouts")]
-use router::types::{api, storage::enums, PaymentAddress};
+use router::{
+    types,
+    types::{api, storage::enums, PaymentAddress},
+};
 
-#[cfg(feature = "payouts")]
-use crate::utils::PaymentInfo;
 use crate::{
     connector_auth,
-    utils::{self, ConnectorActions},
+    utils::{self, ConnectorActions, PaymentInfo},
 };
 
 struct WiseTest;
+
 impl ConnectorActions for WiseTest {}
+
 impl utils::Connector for WiseTest {
-    fn get_data(&self) -> types::api::ConnectorData {
+    fn get_data(&self) -> api::ConnectorData {
         use router::connector::Adyen;
-        types::api::ConnectorData {
+        api::ConnectorData {
             connector: Box::new(&Adyen),
             connector_name: types::Connector::Adyen,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         }
     }
 
-    #[cfg(feature = "payouts")]
-    fn get_payout_data(&self) -> Option<types::api::ConnectorData> {
+    fn get_payout_data(&self) -> Option<api::ConnectorData> {
         use router::connector::Wise;
-        Some(types::api::ConnectorData {
+        Some(api::ConnectorData {
             connector: Box::new(&Wise),
             connector_name: types::Connector::Wise,
-            get_token: types::api::GetToken::Connector,
+            get_token: api::GetToken::Connector,
             merchant_connector_id: None,
         })
     }
@@ -52,7 +50,6 @@ impl utils::Connector for WiseTest {
 }
 
 impl WiseTest {
-    #[cfg(feature = "payouts")]
     fn get_payout_info() -> Option<PaymentInfo> {
         Some(PaymentInfo {
             country: Some(api_models::enums::CountryAlpha2::NL),
@@ -86,12 +83,11 @@ impl WiseTest {
     }
 }
 
-#[cfg(feature = "payouts")]
 static CONNECTOR: WiseTest = WiseTest {};
 
 /******************** Payouts test cases ********************/
 // Creates a recipient at connector's end
-#[cfg(feature = "payouts")]
+
 #[actix_web::test]
 async fn should_create_payout_recipient() {
     let payout_type = enums::PayoutType::Bank;
@@ -107,7 +103,7 @@ async fn should_create_payout_recipient() {
 }
 
 // Create BACS payout
-#[cfg(feature = "payouts")]
+
 #[actix_web::test]
 async fn should_create_bacs_payout() {
     let payout_type = enums::PayoutType::Bank;
@@ -138,7 +134,7 @@ async fn should_create_bacs_payout() {
 }
 
 // Create and fulfill BACS payout
-#[cfg(feature = "payouts")]
+
 #[actix_web::test]
 async fn should_create_and_fulfill_bacs_payout() {
     let payout_type = enums::PayoutType::Bank;
diff --git a/crates/router/tests/connectors/worldline.rs b/crates/router/tests/connectors/worldline.rs
index 21a5a574122..4f8119bfc52 100644
--- a/crates/router/tests/connectors/worldline.rs
+++ b/crates/router/tests/connectors/worldline.rs
@@ -81,7 +81,7 @@ impl WorldlineTest {
                 card_type: None,
                 card_issuing_country: None,
                 bank_code: None,
-                nick_name: Some(masking::Secret::new("nick_name".into())),
+                nick_name: Some(Secret::new("nick_name".into())),
             }),
             confirm: true,
             statement_descriptor_suffix: None,
@@ -231,7 +231,7 @@ async fn should_sync_manual_auth_payment() {
     let sync_response = connector
         .sync_payment(
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     connector_payment_id,
                 ),
                 capture_method: Some(enums::CaptureMethod::Manual),
@@ -264,7 +264,7 @@ async fn should_sync_auto_auth_payment() {
     let sync_response = connector
         .sync_payment(
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     connector_payment_id,
                 ),
                 capture_method: Some(enums::CaptureMethod::Automatic),
diff --git a/crates/router/tests/connectors/worldpay.rs b/crates/router/tests/connectors/worldpay.rs
index 649b1bebbb1..571de7d959d 100644
--- a/crates/router/tests/connectors/worldpay.rs
+++ b/crates/router/tests/connectors/worldpay.rs
@@ -62,7 +62,7 @@ async fn should_authorize_gpay_payment() {
     let response = conn
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Wallet(
+                payment_method_data: domain::PaymentMethodData::Wallet(
                     domain::WalletData::GooglePay(domain::GooglePayWalletData {
                         pm_type: "CARD".to_string(),
                         description: "Visa1234567890".to_string(),
@@ -97,7 +97,7 @@ async fn should_authorize_applepay_payment() {
     let response = conn
         .authorize_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Wallet(
+                payment_method_data: domain::PaymentMethodData::Wallet(
                     domain::WalletData::ApplePay(domain::ApplePayWalletData {
                         payment_data: "someData".to_string(),
                         transaction_identifier: "someId".to_string(),
@@ -149,7 +149,7 @@ async fn should_sync_payment() {
     let response = connector
         .sync_payment(
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     "112233".to_string(),
                 ),
                 ..Default::default()
diff --git a/crates/router/tests/connectors/zen.rs b/crates/router/tests/connectors/zen.rs
index e076aee42c4..b11b78025d0 100644
--- a/crates/router/tests/connectors/zen.rs
+++ b/crates/router/tests/connectors/zen.rs
@@ -95,7 +95,7 @@ async fn should_sync_authorized_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Authorized,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -211,7 +211,7 @@ async fn should_sync_auto_captured_payment() {
         .psync_retry_till_status_matches(
             enums::AttemptStatus::Charged,
             Some(types::PaymentsSyncData {
-                connector_transaction_id: router::types::ResponseId::ConnectorTransactionId(
+                connector_transaction_id: types::ResponseId::ConnectorTransactionId(
                     txn_id.unwrap(),
                 ),
                 encoded_data: None,
@@ -310,7 +310,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_number: CardNumber::from_str("1234567891011").unwrap(),
                     ..utils::CCardType::default().0
                 }),
@@ -352,7 +352,7 @@ async fn should_fail_payment_for_incorrect_cvc() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_cvc: Secret::new("12345".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -394,7 +394,7 @@ async fn should_fail_payment_for_invalid_exp_month() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_month: Secret::new("20".to_string()),
                     ..utils::CCardType::default().0
                 }),
@@ -436,7 +436,7 @@ async fn should_fail_payment_for_incorrect_expiry_year() {
     let response = CONNECTOR
         .make_payment(
             Some(types::PaymentsAuthorizeData {
-                payment_method_data: types::domain::PaymentMethodData::Card(domain::Card {
+                payment_method_data: domain::PaymentMethodData::Card(domain::Card {
                     card_exp_year: Secret::new("2000".to_string()),
                     ..utils::CCardType::default().0
                 }),
diff --git a/crates/router/tests/payments.rs b/crates/router/tests/payments.rs
index 646a11d4cdd..f4325d01b90 100644
--- a/crates/router/tests/payments.rs
+++ b/crates/router/tests/payments.rs
@@ -26,7 +26,7 @@ use uuid::Uuid;
 async fn payments_create_stripe() {
     Box::pin(utils::setup()).await;
 
-    let payment_id = format!("test_{}", uuid::Uuid::new_v4());
+    let payment_id = format!("test_{}", Uuid::new_v4());
     let api_key = ("API-KEY", "MySecretApiKey");
 
     let request = serde_json::json!({
@@ -95,7 +95,7 @@ async fn payments_create_stripe() {
 async fn payments_create_adyen() {
     Box::pin(utils::setup()).await;
 
-    let payment_id = format!("test_{}", uuid::Uuid::new_v4());
+    let payment_id = format!("test_{}", Uuid::new_v4());
     let api_key = ("API-KEY", "321");
 
     let request = serde_json::json!({
@@ -164,7 +164,7 @@ async fn payments_create_adyen() {
 async fn payments_create_fail() {
     Box::pin(utils::setup()).await;
 
-    let payment_id = format!("test_{}", uuid::Uuid::new_v4());
+    let payment_id = format!("test_{}", Uuid::new_v4());
     let api_key = ("API-KEY", "MySecretApiKey");
 
     let invalid_request = serde_json::json!({
diff --git a/crates/router/tests/payments2.rs b/crates/router/tests/payments2.rs
index 9b622d11fd1..56ab453a0f5 100644
--- a/crates/router/tests/payments2.rs
+++ b/crates/router/tests/payments2.rs
@@ -14,7 +14,7 @@ use uuid::Uuid;
 
 #[test]
 fn connector_list() {
-    let connector_list = router::types::ConnectorsList {
+    let connector_list = types::ConnectorsList {
         connectors: vec![String::from("stripe"), "adyen".to_string()],
     };
 
@@ -22,7 +22,7 @@ fn connector_list() {
 
     println!("{}", &json);
 
-    let newlist: router::types::ConnectorsList = serde_json::from_str(&json).unwrap();
+    let newlist: types::ConnectorsList = serde_json::from_str(&json).unwrap();
 
     println!("{newlist:#?}");
     assert_eq!(true, true);
@@ -125,7 +125,7 @@ async fn payments_create_core() {
     };
     let expected_response =
         services::ApplicationResponse::JsonWithHeaders((expected_response, vec![]));
-    let actual_response = Box::pin(router::core::payments::payments_core::<
+    let actual_response = Box::pin(payments::payments_core::<
         api::Authorize,
         api::PaymentsResponse,
         _,
@@ -316,7 +316,7 @@ async fn payments_create_core_adyen_no_redirect() {
         },
         vec![],
     ));
-    let actual_response = Box::pin(router::core::payments::payments_core::<
+    let actual_response = Box::pin(payments::payments_core::<
         api::Authorize,
         api::PaymentsResponse,
         _,
diff --git a/crates/router_derive/src/macros/api_error/helpers.rs b/crates/router_derive/src/macros/api_error/helpers.rs
index 5781d786ee5..deb1b349cb1 100644
--- a/crates/router_derive/src/macros/api_error/helpers.rs
+++ b/crates/router_derive/src/macros/api_error/helpers.rs
@@ -260,9 +260,9 @@ pub(super) fn get_unused_fields(
     ignore: &std::collections::HashSet<String>,
 ) -> Vec<Field> {
     let fields = match fields {
-        syn::Fields::Unit => Vec::new(),
-        syn::Fields::Unnamed(_) => Vec::new(),
-        syn::Fields::Named(fields) => fields.named.iter().cloned().collect(),
+        Fields::Unit => Vec::new(),
+        Fields::Unnamed(_) => Vec::new(),
+        Fields::Named(fields) => fields.named.iter().cloned().collect(),
     };
     fields
         .iter()
diff --git a/crates/router_derive/src/macros/helpers.rs b/crates/router_derive/src/macros/helpers.rs
index b6490c4d629..1cb7e21bb9d 100644
--- a/crates/router_derive/src/macros/helpers.rs
+++ b/crates/router_derive/src/macros/helpers.rs
@@ -58,7 +58,7 @@ pub(super) fn get_struct_fields(
         Ok(named.to_owned())
     } else {
         Err(syn::Error::new(
-            proc_macro2::Span::call_site(),
+            Span::call_site(),
             "This macro cannot be used on structs with no fields",
         ))
     }
diff --git a/crates/router_derive/src/macros/try_get_enum.rs b/crates/router_derive/src/macros/try_get_enum.rs
index f607b7f06c9..bdfbdb66938 100644
--- a/crates/router_derive/src/macros/try_get_enum.rs
+++ b/crates/router_derive/src/macros/try_get_enum.rs
@@ -68,7 +68,7 @@ pub fn try_get_enum_variant(
 
         let try_into_fn = syn::Ident::new(
             &format!("try_into_{}", variant_name.to_string().to_lowercase()),
-            proc_macro2::Span::call_site(),
+            Span::call_site(),
         );
 
         Ok(quote::quote! {
diff --git a/crates/router_env/src/logger/setup.rs b/crates/router_env/src/logger/setup.rs
index af77991e804..3a9e719db18 100644
--- a/crates/router_env/src/logger/setup.rs
+++ b/crates/router_env/src/logger/setup.rs
@@ -265,7 +265,7 @@ fn setup_tracing_pipeline(
         .with_exporter(get_opentelemetry_exporter(config))
         .with_batch_config(batch_config)
         .with_trace_config(trace_config)
-        .install_batch(opentelemetry::runtime::TokioCurrentThread)
+        .install_batch(runtime::TokioCurrentThread)
         .map(|tracer| tracing_opentelemetry::layer().with_tracer(tracer));
 
     if config.ignore_errors {
diff --git a/crates/scheduler/src/producer.rs b/crates/scheduler/src/producer.rs
index fd2b9b654a4..397aab84e91 100644
--- a/crates/scheduler/src/producer.rs
+++ b/crates/scheduler/src/producer.rs
@@ -43,11 +43,10 @@ where
 
     tokio::time::sleep(Duration::from_millis(timeout.sample(&mut rng))).await;
 
-    let mut interval = tokio::time::interval(std::time::Duration::from_millis(
-        scheduler_settings.loop_interval,
-    ));
+    let mut interval =
+        tokio::time::interval(Duration::from_millis(scheduler_settings.loop_interval));
 
-    let mut shutdown_interval = tokio::time::interval(std::time::Duration::from_millis(
+    let mut shutdown_interval = tokio::time::interval(Duration::from_millis(
         scheduler_settings.graceful_shutdown_interval,
     ));
 
diff --git a/crates/scheduler/src/utils.rs b/crates/scheduler/src/utils.rs
index 11924dd1be2..8b80b7c72c1 100644
--- a/crates/scheduler/src/utils.rs
+++ b/crates/scheduler/src/utils.rs
@@ -254,7 +254,7 @@ pub fn get_time_from_delta(delta: Option<i32>) -> Option<time::PrimitiveDateTime
 }
 
 #[instrument(skip_all)]
-pub async fn consumer_operation_handler<E, T: Send + Sync + 'static>(
+pub async fn consumer_operation_handler<E, T>(
     state: T,
     settings: sync::Arc<SchedulerSettings>,
     error_handler_fun: E,
@@ -263,7 +263,7 @@ pub async fn consumer_operation_handler<E, T: Send + Sync + 'static>(
 ) where
     // Error handler function
     E: FnOnce(error_stack::Report<errors::ProcessTrackerError>),
-    T: SchedulerAppState,
+    T: SchedulerAppState + Send + Sync + 'static,
 {
     consumer_operation_counter.fetch_add(1, atomic::Ordering::SeqCst);
     let start_time = std_time::Instant::now();
diff --git a/crates/storage_impl/src/errors.rs b/crates/storage_impl/src/errors.rs
index 41099bea75f..4356b6b7997 100644
--- a/crates/storage_impl/src/errors.rs
+++ b/crates/storage_impl/src/errors.rs
@@ -8,7 +8,7 @@ use hyperswitch_domain_models::errors::StorageError as DataStorageError;
 pub use redis_interface::errors::RedisError;
 use router_env::opentelemetry::metrics::MetricsError;
 
-use crate::{errors as storage_errors, store::errors::DatabaseError};
+use crate::store::errors::DatabaseError;
 
 pub type ApplicationResult<T> = Result<T, ApplicationError>;
 
@@ -56,20 +56,16 @@ impl Into<DataStorageError> for &StorageError {
     fn into(self) -> DataStorageError {
         match self {
             StorageError::DatabaseError(i) => match i.current_context() {
-                storage_errors::DatabaseError::DatabaseConnectionError => {
-                    DataStorageError::DatabaseConnectionError
-                }
+                DatabaseError::DatabaseConnectionError => DataStorageError::DatabaseConnectionError,
                 // TODO: Update this error type to encompass & propagate the missing type (instead of generic `db value not found`)
-                storage_errors::DatabaseError::NotFound => {
+                DatabaseError::NotFound => {
                     DataStorageError::ValueNotFound(String::from("db value not found"))
                 }
                 // TODO: Update this error type to encompass & propagate the duplicate type (instead of generic `db value not found`)
-                storage_errors::DatabaseError::UniqueViolation => {
-                    DataStorageError::DuplicateValue {
-                        entity: "db entity",
-                        key: None,
-                    }
-                }
+                DatabaseError::UniqueViolation => DataStorageError::DuplicateValue {
+                    entity: "db entity",
+                    key: None,
+                },
                 err => DataStorageError::DatabaseError(error_stack::report!(*err)),
             },
             StorageError::ValueNotFound(i) => DataStorageError::ValueNotFound(i.clone()),
diff --git a/crates/storage_impl/src/lib.rs b/crates/storage_impl/src/lib.rs
index e35d1f41511..7a3ef30bef3 100644
--- a/crates/storage_impl/src/lib.rs
+++ b/crates/storage_impl/src/lib.rs
@@ -217,7 +217,7 @@ impl<T: DatabaseStore> KVRouterStore<T> {
         partition_key: redis::kv_store::PartitionKey<'_>,
     ) -> error_stack::Result<(), RedisError>
     where
-        R: crate::redis::kv_store::KvStorePartition,
+        R: redis::kv_store::KvStorePartition,
     {
         let global_id = format!("{}", partition_key);
         let request_id = self.request_id.clone().unwrap_or_default();
diff --git a/crates/storage_impl/src/mock_db.rs b/crates/storage_impl/src/mock_db.rs
index 5cf0123eb7b..3657201f878 100644
--- a/crates/storage_impl/src/mock_db.rs
+++ b/crates/storage_impl/src/mock_db.rs
@@ -41,9 +41,9 @@ pub struct MockDb {
     pub disputes: Arc<Mutex<Vec<store::Dispute>>>,
     pub lockers: Arc<Mutex<Vec<store::LockerMockUp>>>,
     pub mandates: Arc<Mutex<Vec<store::Mandate>>>,
-    pub captures: Arc<Mutex<Vec<crate::store::capture::Capture>>>,
-    pub merchant_key_store: Arc<Mutex<Vec<crate::store::merchant_key_store::MerchantKeyStore>>>,
-    pub business_profiles: Arc<Mutex<Vec<crate::store::business_profile::BusinessProfile>>>,
+    pub captures: Arc<Mutex<Vec<store::capture::Capture>>>,
+    pub merchant_key_store: Arc<Mutex<Vec<store::merchant_key_store::MerchantKeyStore>>>,
+    pub business_profiles: Arc<Mutex<Vec<store::business_profile::BusinessProfile>>>,
     pub reverse_lookups: Arc<Mutex<Vec<store::ReverseLookup>>>,
     pub payment_link: Arc<Mutex<Vec<store::payment_link::PaymentLink>>>,
     pub organizations: Arc<Mutex<Vec<store::organization::Organization>>>,
diff --git a/crates/storage_impl/src/payments/payment_intent.rs b/crates/storage_impl/src/payments/payment_intent.rs
index fcc4ec63ff2..2cbcbaaf01e 100644
--- a/crates/storage_impl/src/payments/payment_intent.rs
+++ b/crates/storage_impl/src/payments/payment_intent.rs
@@ -257,7 +257,7 @@ impl<T: DatabaseStore> PaymentIntentInterface for KVRouterStore<T> {
         _storage_scheme: MerchantStorageScheme,
     ) -> error_stack::Result<PaymentAttempt, StorageError> {
         match payment.active_attempt.clone() {
-            hyperswitch_domain_models::RemoteStorageObject::ForeignID(attempt_id) => {
+            RemoteStorageObject::ForeignID(attempt_id) => {
                 let conn = pg_connection_read(self).await?;
 
                 let pa = DieselPaymentAttempt::find_by_merchant_id_attempt_id(
@@ -271,11 +271,10 @@ impl<T: DatabaseStore> PaymentIntentInterface for KVRouterStore<T> {
                     er.change_context(new_err)
                 })
                 .map(PaymentAttempt::from_storage_model)?;
-                payment.active_attempt =
-                    hyperswitch_domain_models::RemoteStorageObject::Object(pa.clone());
+                payment.active_attempt = RemoteStorageObject::Object(pa.clone());
                 Ok(pa)
             }
-            hyperswitch_domain_models::RemoteStorageObject::Object(pa) => Ok(pa.clone()),
+            RemoteStorageObject::Object(pa) => Ok(pa.clone()),
         }
     }
 
@@ -397,7 +396,7 @@ impl<T: DatabaseStore> PaymentIntentInterface for crate::RouterStore<T> {
         _storage_scheme: MerchantStorageScheme,
     ) -> error_stack::Result<PaymentAttempt, StorageError> {
         match &payment.active_attempt {
-            hyperswitch_domain_models::RemoteStorageObject::ForeignID(attempt_id) => {
+            RemoteStorageObject::ForeignID(attempt_id) => {
                 let conn = pg_connection_read(self).await?;
 
                 let pa = DieselPaymentAttempt::find_by_merchant_id_attempt_id(
@@ -411,11 +410,10 @@ impl<T: DatabaseStore> PaymentIntentInterface for crate::RouterStore<T> {
                     er.change_context(new_err)
                 })
                 .map(PaymentAttempt::from_storage_model)?;
-                payment.active_attempt =
-                    hyperswitch_domain_models::RemoteStorageObject::Object(pa.clone());
+                payment.active_attempt = RemoteStorageObject::Object(pa.clone());
                 Ok(pa)
             }
-            hyperswitch_domain_models::RemoteStorageObject::Object(pa) => Ok(pa.clone()),
+            RemoteStorageObject::Object(pa) => Ok(pa.clone()),
         }
     }
 
diff --git a/crates/test_utils/src/newman_runner.rs b/crates/test_utils/src/newman_runner.rs
index e70c630cffe..c90292683ff 100644
--- a/crates/test_utils/src/newman_runner.rs
+++ b/crates/test_utils/src/newman_runner.rs
@@ -63,7 +63,7 @@ fn get_dir_path(name: impl AsRef<str>) -> String {
 
 // This function currently allows you to add only custom headers.
 // In future, as we scale, this can be modified based on the need
-fn insert_content<T, U>(dir: T, content_to_insert: U) -> std::io::Result<()>
+fn insert_content<T, U>(dir: T, content_to_insert: U) -> io::Result<()>
 where
     T: AsRef<Path>,
     U: AsRef<str>,
@@ -72,7 +72,7 @@ where
     let file_path = dir.as_ref().join(file_name);
 
     // Open the file in write mode or create it if it doesn't exist
-    let mut file = std::fs::OpenOptions::new()
+    let mut file = OpenOptions::new()
         .append(true)
         .create(true)
         .open(file_path)?;

## 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 -->
This PR addresses the clippy lints occurring due to new rust version 1.78

### 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
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

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


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


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

- [ ] 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
