Bug: [FEATURE] [DLOCAL, SQUARE] Move connector code to crate hyperswitch_connectors



### Feature Description

Connector code for `dlocal` and `square` needs to be moved from crate `router` to new crate `hyperswitch_connectors`

### Possible Implementation

Connector code for `dlocal` and `square` needs to be moved from crate `router` to new crate `hyperswitch_connectors`

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

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

### Have you read the Contributing Guidelines?

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

### Are you willing to submit a PR?

Yes, I am willing to submit a PR!
diff --git a/crates/hyperswitch_connectors/src/connectors.rs b/crates/hyperswitch_connectors/src/connectors.rs
index f057b7d4a33..9406353a1ee 100644
--- a/crates/hyperswitch_connectors/src/connectors.rs
+++ b/crates/hyperswitch_connectors/src/connectors.rs
@@ -4,6 +4,7 @@ pub mod cashtocode;
 pub mod coinbase;
 pub mod cryptopay;
 pub mod deutschebank;
+pub mod dlocal;
 pub mod fiserv;
 pub mod fiservemea;
 pub mod fiuu;
@@ -13,6 +14,7 @@ pub mod mollie;
 pub mod nexixpay;
 pub mod novalnet;
 pub mod powertranz;
+pub mod square;
 pub mod stax;
 pub mod taxjar;
 pub mod thunes;
@@ -22,8 +24,8 @@ pub mod worldline;
 
 pub use self::{
     bambora::Bambora, bitpay::Bitpay, cashtocode::Cashtocode, coinbase::Coinbase,
-    cryptopay::Cryptopay, deutschebank::Deutschebank, fiserv::Fiserv, fiservemea::Fiservemea,
-    fiuu::Fiuu, globepay::Globepay, helcim::Helcim, mollie::Mollie, nexixpay::Nexixpay,
-    novalnet::Novalnet, powertranz::Powertranz, stax::Stax, taxjar::Taxjar, thunes::Thunes,
-    tsys::Tsys, volt::Volt, worldline::Worldline,
+    cryptopay::Cryptopay, deutschebank::Deutschebank, dlocal::Dlocal, fiserv::Fiserv,
+    fiservemea::Fiservemea, fiuu::Fiuu, globepay::Globepay, helcim::Helcim, mollie::Mollie,
+    nexixpay::Nexixpay, novalnet::Novalnet, powertranz::Powertranz, square::Square, stax::Stax,
+    taxjar::Taxjar, thunes::Thunes, tsys::Tsys, volt::Volt, worldline::Worldline,
 };
diff --git a/crates/router/src/connector/dlocal.rs b/crates/hyperswitch_connectors/src/connectors/dlocal.rs
similarity index 68%
rename from crates/router/src/connector/dlocal.rs
rename to crates/hyperswitch_connectors/src/connectors/dlocal.rs
index dc99619e9da..78d3ad4f63e 100644
--- a/crates/router/src/connector/dlocal.rs
+++ b/crates/hyperswitch_connectors/src/connectors/dlocal.rs
@@ -2,36 +2,51 @@ pub mod transformers;
 
 use std::fmt::Debug;
 
+use api_models::webhooks::IncomingWebhookEvent;
+use common_enums::enums;
 use common_utils::{
     crypto::{self, SignMessage},
     date_time,
-    request::RequestContent,
+    errors::CustomResult,
+    ext_traits::ByteSliceExt,
+    request::{Method, Request, RequestBuilder, RequestContent},
 };
-use diesel_models::enums;
 use error_stack::{report, ResultExt};
 use hex::encode;
-use masking::PeekInterface;
-use transformers as dlocal;
-
-use crate::{
-    configs::settings,
-    connector::utils as connector_utils,
-    core::errors::{self, CustomResult},
-    events::connector_api_logs::ConnectorEvent,
-    headers, logger,
-    services::{
-        self,
-        request::{self, Mask},
-        ConnectorIntegration, ConnectorValidation,
+use hyperswitch_domain_models::{
+    router_data::{AccessToken, ErrorResponse, RouterData},
+    router_flow_types::{
+        access_token_auth::AccessTokenAuth,
+        payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
+        refunds::{Execute, RSync},
     },
+    router_request_types::{
+        AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+        PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData,
+        RefundsData, SetupMandateRequestData,
+    },
+    router_response_types::{PaymentsResponseData, RefundsResponseData},
     types::{
-        self,
-        api::{self, ConnectorCommon, ConnectorCommonExt},
-        ErrorResponse, Response,
+        PaymentsAuthorizeRouterData, PaymentsCancelRouterData, PaymentsCaptureRouterData,
+        PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData,
     },
-    utils::BytesExt,
 };
+use hyperswitch_interfaces::{
+    api::{self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorValidation},
+    configs::Connectors,
+    errors,
+    events::connector_api_logs::ConnectorEvent,
+    types::{self, Response},
+    webhooks,
+};
+use masking::{Mask, Maskable, PeekInterface};
+use transformers as dlocal;
 
+use crate::{
+    constants::headers,
+    types::ResponseRouterData,
+    utils::{self},
+};
 #[derive(Debug, Clone)]
 pub struct Dlocal;
 
@@ -54,9 +69,9 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RouterData<Flow, Request, Response>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         let dlocal_req = self.get_request_body(req, connectors)?;
 
         let date = date_time::date_as_yyyymmddthhmmssmmmz()
@@ -110,7 +125,7 @@ impl ConnectorCommon for Dlocal {
         "application/json"
     }
 
-    fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
+    fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
         connectors.dlocal.base_url.as_ref()
     }
 
@@ -148,49 +163,30 @@ impl ConnectorValidation for Dlocal {
         match capture_method {
             enums::CaptureMethod::Automatic | enums::CaptureMethod::Manual => Ok(()),
             enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
-                connector_utils::construct_not_supported_error_report(capture_method, self.id()),
+                utils::construct_not_supported_error_report(capture_method, self.id()),
             ),
         }
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::PaymentMethodToken,
-        types::PaymentMethodTokenizationData,
-        types::PaymentsResponseData,
-    > for Dlocal
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+    for Dlocal
 {
     // Not Implemented (R)
 }
 
-impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
-    for Dlocal
-{
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Dlocal {
     //TODO: implement sessions flow
 }
 
-impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
-    for Dlocal
-{
-}
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Dlocal {}
 
-impl
-    ConnectorIntegration<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    > for Dlocal
-{
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Dlocal {
     fn build_request(
         &self,
-        _req: &types::RouterData<
-            api::SetupMandate,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
-        >,
-        _connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        _req: &RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>,
+        _connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Err(
             errors::ConnectorError::NotImplemented("Setup Mandate flow for Dlocal".to_string())
                 .into(),
@@ -198,14 +194,12 @@ impl
     }
 }
 
-impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
-    for Dlocal
-{
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -215,16 +209,16 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_url(
         &self,
-        _req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}secure_payments", self.base_url(connectors)))
     }
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = dlocal::DlocalRouterData::try_from((
             &self.get_currency_unit(),
@@ -238,12 +232,12 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::PaymentsAuthorizeType::get_url(
                     self, req, connectors,
                 )?)
@@ -260,11 +254,11 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeRouterData,
+        data: &PaymentsAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
-        logger::debug!(dlocal_payments_authorize_response=?res);
+    ) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_payments_authorize_response=?res);
         let response: dlocal::DlocalPaymentsResponse = res
             .response
             .parse_struct("Dlocal PaymentsAuthorizeResponse")
@@ -273,7 +267,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -290,14 +284,12 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     }
 }
 
-impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
-    for Dlocal
-{
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -307,8 +299,8 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn get_url(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let sync_data = dlocal::DlocalPaymentsSyncRequest::try_from(req)?;
         Ok(format!(
@@ -320,12 +312,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn build_request(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
+            RequestBuilder::new()
+                .method(Method::Get)
                 .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
@@ -343,18 +335,18 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn handle_response(
         &self,
-        data: &types::PaymentsSyncRouterData,
+        data: &PaymentsSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
-        logger::debug!(dlocal_payment_sync_response=?res);
+    ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_payment_sync_response=?res);
         let response: dlocal::DlocalPaymentsResponse = res
             .response
             .parse_struct("Dlocal PaymentsSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -363,14 +355,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     }
 }
 
-impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
-    for Dlocal
-{
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -380,16 +370,16 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_url(
         &self,
-        _req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}payments", self.base_url(connectors)))
     }
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_req = dlocal::DlocalPaymentsCaptureRequest::try_from(req)?;
         Ok(RequestContent::Json(Box::new(connector_req)))
@@ -397,12 +387,12 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn build_request(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsCaptureType::get_headers(
@@ -417,18 +407,18 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCaptureRouterData,
+        data: &PaymentsCaptureRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCaptureRouterData, errors::ConnectorError> {
-        logger::debug!(dlocal_payments_capture_response=?res);
+    ) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_payments_capture_response=?res);
         let response: dlocal::DlocalPaymentsResponse = res
             .response
             .parse_struct("Dlocal PaymentsCaptureResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -445,14 +435,12 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Dlocal
-{
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -462,8 +450,8 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_url(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let cancel_data = dlocal::DlocalPaymentsCancelRequest::try_from(req)?;
         Ok(format!(
@@ -475,12 +463,12 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn build_request(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
@@ -490,11 +478,11 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCancelRouterData,
+        data: &PaymentsCancelRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCancelRouterData, errors::ConnectorError> {
-        logger::debug!(dlocal_payments_cancel_response=?res);
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_payments_cancel_response=?res);
         let response: dlocal::DlocalPaymentsResponse = res
             .response
             .parse_struct("Dlocal PaymentsCancelResponse")
@@ -502,7 +490,7 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -519,12 +507,12 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
     }
 }
 
-impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Dlocal {
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -534,16 +522,16 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_url(
         &self,
-        _req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
+        _req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}refunds", self.base_url(connectors)))
     }
 
     fn get_request_body(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        _connectors: &settings::Connectors,
+        req: &RefundsRouterData<Execute>,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_router_data = dlocal::DlocalRouterData::try_from((
             &self.get_currency_unit(),
@@ -557,11 +545,11 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn build_request(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
             .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
             .attach_default_headers()
             .headers(types::RefundExecuteType::get_headers(
@@ -576,18 +564,18 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn handle_response(
         &self,
-        data: &types::RefundsRouterData<api::Execute>,
+        data: &RefundsRouterData<Execute>,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundsRouterData<api::Execute>, errors::ConnectorError> {
-        logger::debug!(dlocal_refund_response=?res);
+    ) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_refund_response=?res);
         let response: dlocal::RefundResponse =
             res.response
                 .parse_struct("Dlocal RefundResponse")
                 .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(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -604,12 +592,12 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
 }
 
-impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Dlocal {
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Dlocal {
     fn get_headers(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -619,8 +607,8 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn get_url(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let sync_data = dlocal::DlocalRefundsSyncRequest::try_from(req)?;
         Ok(format!(
@@ -632,12 +620,12 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn build_request(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
+            RequestBuilder::new()
+                .method(Method::Get)
                 .url(&types::RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
@@ -647,18 +635,18 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn handle_response(
         &self,
-        data: &types::RefundSyncRouterData,
+        data: &RefundSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
-        logger::debug!(dlocal_refund_sync_response=?res);
+    ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
+        router_env::logger::debug!(dlocal_refund_sync_response=?res);
         let response: dlocal::RefundResponse = res
             .response
             .parse_struct("Dlocal RefundSyncResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -676,24 +664,24 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 }
 
 #[async_trait::async_trait]
-impl api::IncomingWebhook for Dlocal {
+impl webhooks::IncomingWebhook for Dlocal {
     fn get_webhook_object_reference_id(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
 
     fn get_webhook_event_type(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::IncomingWebhookEvent, errors::ConnectorError> {
-        Ok(api::IncomingWebhookEvent::EventNotSupported)
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<IncomingWebhookEvent, errors::ConnectorError> {
+        Ok(IncomingWebhookEvent::EventNotSupported)
     }
 
     fn get_webhook_resource_object(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &webhooks::IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
         Err(report!(errors::ConnectorError::WebhooksNotImplemented))
     }
diff --git a/crates/router/src/connector/dlocal/transformers.rs b/crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs
similarity index 77%
rename from crates/router/src/connector/dlocal/transformers.rs
rename to crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs
index a613cdb2054..385601294b3 100644
--- a/crates/router/src/connector/dlocal/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs
@@ -1,15 +1,23 @@
 use api_models::payments::AddressDetails;
-use common_utils::pii::Email;
+use common_enums::enums;
+use common_utils::{pii::Email, request::Method};
 use error_stack::ResultExt;
+use hyperswitch_domain_models::{
+    payment_method_data::PaymentMethodData,
+    router_data::{ConnectorAuthType, RouterData},
+    router_flow_types::{refunds::Execute, RSync},
+    router_request_types::ResponseId,
+    router_response_types::{PaymentsResponseData, RedirectForm, RefundsResponseData},
+    types,
+};
+use hyperswitch_interfaces::{api::CurrencyUnit, errors};
 use masking::{PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
 use url::Url;
 
 use crate::{
-    connector::utils::{AddressDetailsData, PaymentsAuthorizeRequestData, RouterData},
-    core::errors,
-    services,
-    types::{self, api, domain, storage::enums},
+    types::{RefundsResponseRouterData, ResponseRouterData},
+    utils::{AddressDetailsData, PaymentsAuthorizeRequestData, RouterData as _},
 };
 
 #[derive(Debug, Default, Eq, PartialEq, Serialize)]
@@ -57,16 +65,11 @@ pub struct DlocalRouterData<T> {
     pub router_data: T,
 }
 
-impl<T> TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for DlocalRouterData<T> {
+impl<T> TryFrom<(&CurrencyUnit, enums::Currency, i64, T)> for DlocalRouterData<T> {
     type Error = error_stack::Report<errors::ConnectorError>;
 
     fn try_from(
-        (_currency_unit, _currency, amount, router_data): (
-            &api::CurrencyUnit,
-            enums::Currency,
-            i64,
-            T,
-        ),
+        (_currency_unit, _currency, amount, router_data): (&CurrencyUnit, enums::Currency, i64, T),
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             amount,
@@ -100,7 +103,7 @@ impl TryFrom<&DlocalRouterData<&types::PaymentsAuthorizeRouterData>> for DlocalP
         let country = address.get_country()?;
         let name = get_payer_name(address);
         match item.router_data.request.payment_method_data {
-            domain::PaymentMethodData::Card(ref ccard) => {
+            PaymentMethodData::Card(ref ccard) => {
                 let should_capture = matches!(
                     item.router_data.request.capture_method,
                     Some(enums::CaptureMethod::Automatic)
@@ -143,38 +146,34 @@ impl TryFrom<&DlocalRouterData<&types::PaymentsAuthorizeRouterData>> for DlocalP
                     }),
                     order_id: item.router_data.connector_request_reference_id.clone(),
                     three_dsecure: match item.router_data.auth_type {
-                        diesel_models::enums::AuthenticationType::ThreeDs => {
+                        enums::AuthenticationType::ThreeDs => {
                             Some(ThreeDSecureReqData { force: true })
                         }
-                        diesel_models::enums::AuthenticationType::NoThreeDs => None,
+                        enums::AuthenticationType::NoThreeDs => None,
                     },
                     callback_url: Some(item.router_data.request.get_router_return_url()?),
                     description: item.router_data.description.clone(),
                 };
                 Ok(payment_request)
             }
-            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::RealTimePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_) => {
-                Err(errors::ConnectorError::NotImplemented(
-                    crate::connector::utils::get_unimplemented_payment_method_error_message(
-                        "Dlocal",
-                    ),
-                ))?
-            }
+            PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::Wallet(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_) => Err(errors::ConnectorError::NotImplemented(
+                crate::utils::get_unimplemented_payment_method_error_message("Dlocal"),
+            ))?,
         }
     }
 }
@@ -252,10 +251,10 @@ pub struct DlocalAuthType {
     pub(super) secret: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for DlocalAuthType {
+impl TryFrom<&ConnectorAuthType> for DlocalAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
-        if let types::ConnectorAuthType::SignatureKey {
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
+        if let ConnectorAuthType::SignatureKey {
             api_key,
             key1,
             api_secret,
@@ -309,24 +308,21 @@ pub struct DlocalPaymentsResponse {
     order_id: Option<String>,
 }
 
-impl<F, T>
-    TryFrom<types::ResponseRouterData<F, DlocalPaymentsResponse, T, types::PaymentsResponseData>>
-    for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, DlocalPaymentsResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<F, DlocalPaymentsResponse, T, types::PaymentsResponseData>,
+        item: ResponseRouterData<F, DlocalPaymentsResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         let redirection_data = item
             .response
             .three_dsecure
             .and_then(|three_secure_data| three_secure_data.redirect_url)
-            .map(|redirect_url| {
-                services::RedirectForm::from((redirect_url, services::Method::Get))
-            });
+            .map(|redirect_url| RedirectForm::from((redirect_url, Method::Get)));
 
-        let response = types::PaymentsResponseData::TransactionResponse {
-            resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
+        let response = PaymentsResponseData::TransactionResponse {
+            resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
             redirection_data,
             mandate_reference: None,
             connector_metadata: None,
@@ -350,24 +346,17 @@ pub struct DlocalPaymentsSyncResponse {
     order_id: Option<String>,
 }
 
-impl<F, T>
-    TryFrom<
-        types::ResponseRouterData<F, DlocalPaymentsSyncResponse, T, types::PaymentsResponseData>,
-    > for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, DlocalPaymentsSyncResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            F,
-            DlocalPaymentsSyncResponse,
-            T,
-            types::PaymentsResponseData,
-        >,
+        item: ResponseRouterData<F, DlocalPaymentsSyncResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             status: enums::AttemptStatus::from(item.response.status),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
+            response: Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
@@ -388,24 +377,17 @@ pub struct DlocalPaymentsCaptureResponse {
     order_id: Option<String>,
 }
 
-impl<F, T>
-    TryFrom<
-        types::ResponseRouterData<F, DlocalPaymentsCaptureResponse, T, types::PaymentsResponseData>,
-    > for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, DlocalPaymentsCaptureResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            F,
-            DlocalPaymentsCaptureResponse,
-            T,
-            types::PaymentsResponseData,
-        >,
+        item: ResponseRouterData<F, DlocalPaymentsCaptureResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             status: enums::AttemptStatus::from(item.response.status),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
+            response: Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(item.response.id.clone()),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
@@ -424,26 +406,17 @@ pub struct DlocalPaymentsCancelResponse {
     order_id: String,
 }
 
-impl<F, T>
-    TryFrom<
-        types::ResponseRouterData<F, DlocalPaymentsCancelResponse, T, types::PaymentsResponseData>,
-    > for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, DlocalPaymentsCancelResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<
-            F,
-            DlocalPaymentsCancelResponse,
-            T,
-            types::PaymentsResponseData,
-        >,
+        item: ResponseRouterData<F, DlocalPaymentsCancelResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             status: enums::AttemptStatus::from(item.response.status),
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(
-                    item.response.order_id.clone(),
-                ),
+            response: Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(item.response.order_id.clone()),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
@@ -509,16 +482,16 @@ pub struct RefundResponse {
     pub status: RefundStatus,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>>
+    for types::RefundsRouterData<Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, RefundResponse>,
+        item: RefundsResponseRouterData<Execute, RefundResponse>,
     ) -> Result<Self, Self::Error> {
         let refund_status = enums::RefundStatus::from(item.response.status);
         Ok(Self {
-            response: Ok(types::RefundsResponseData {
+            response: Ok(RefundsResponseData {
                 connector_refund_id: item.response.id,
                 refund_status,
             }),
@@ -545,16 +518,14 @@ impl TryFrom<&types::RefundSyncRouterData> for DlocalRefundsSyncRequest {
     }
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>>
-    for types::RefundsRouterData<api::RSync>
-{
+impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for types::RefundsRouterData<RSync> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, RefundResponse>,
+        item: RefundsResponseRouterData<RSync, RefundResponse>,
     ) -> Result<Self, Self::Error> {
         let refund_status = enums::RefundStatus::from(item.response.status);
         Ok(Self {
-            response: Ok(types::RefundsResponseData {
+            response: Ok(RefundsResponseData {
                 connector_refund_id: item.response.id,
                 refund_status,
             }),
diff --git a/crates/router/src/connector/square.rs b/crates/hyperswitch_connectors/src/connectors/square.rs
similarity index 65%
rename from crates/router/src/connector/square.rs
rename to crates/hyperswitch_connectors/src/connectors/square.rs
index 9b9c68a5f2b..bf2cd4e1ace 100644
--- a/crates/router/src/connector/square.rs
+++ b/crates/hyperswitch_connectors/src/connectors/square.rs
@@ -2,31 +2,54 @@ pub mod transformers;
 
 use std::fmt::Debug;
 
-use api_models::enums;
+use api_models::{
+    enums,
+    webhooks::{IncomingWebhookEvent, ObjectReferenceId},
+};
 use base64::Engine;
-use common_utils::{ext_traits::ByteSliceExt, request::RequestContent};
+use common_utils::{
+    errors::CustomResult,
+    ext_traits::ByteSliceExt,
+    request::{Method, Request, RequestBuilder, RequestContent},
+};
 use error_stack::ResultExt;
-use masking::PeekInterface;
-use transformers as square;
-
-use super::utils::{self as super_utils, RefundsRequestData};
-use crate::{
-    configs::settings,
-    consts,
-    core::errors::{self, CustomResult},
-    events::connector_api_logs::ConnectorEvent,
-    headers,
-    services::{
-        self,
-        request::{self, Mask},
-        ConnectorIntegration, ConnectorValidation,
+use hyperswitch_domain_models::{
+    router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData},
+    router_flow_types::{
+        access_token_auth::AccessTokenAuth,
+        payments::{Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void},
+        refunds::{Execute, RSync},
+        AuthorizeSessionToken,
     },
+    router_request_types::{
+        AccessTokenRequestData, AuthorizeSessionTokenData, PaymentMethodTokenizationData,
+        PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData,
+        PaymentsSyncData, RefundsData, SetupMandateRequestData,
+    },
+    router_response_types::{PaymentsResponseData, RefundsResponseData},
     types::{
-        self,
-        api::{self, ConnectorCommon, ConnectorCommonExt},
-        ErrorResponse, Response,
+        PaymentsAuthorizeRouterData, PaymentsAuthorizeSessionTokenRouterData,
+        PaymentsCancelRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData,
+        RefundSyncRouterData, RefundsRouterData, TokenizationRouterData,
     },
-    utils::BytesExt,
+};
+use hyperswitch_interfaces::{
+    api::{self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorValidation},
+    configs::Connectors,
+    consts, errors,
+    events::connector_api_logs::ConnectorEvent,
+    types::{self, PaymentsAuthorizeType, Response},
+    webhooks::{IncomingWebhook, IncomingWebhookRequestDetails},
+};
+use masking::{Mask, Maskable, PeekInterface};
+use transformers::{
+    self as square, SquareAuthType, SquarePaymentsRequest, SquareRefundRequest, SquareTokenRequest,
+};
+
+use crate::{
+    constants::headers,
+    types::ResponseRouterData,
+    utils::{self, get_header_key_value, RefundsRequestData},
 };
 
 #[derive(Debug, Clone)]
@@ -52,12 +75,12 @@ where
 {
     fn build_headers(
         &self,
-        req: &types::RouterData<Flow, Request, Response>,
-        _connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RouterData<Flow, Request, Response>,
+        _connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         let mut header = vec![(
             headers::CONTENT_TYPE.to_string(),
-            types::PaymentsAuthorizeType::get_content_type(self)
+            PaymentsAuthorizeType::get_content_type(self)
                 .to_string()
                 .into(),
         )];
@@ -76,15 +99,15 @@ impl ConnectorCommon for Square {
         "application/json"
     }
 
-    fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
+    fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
         connectors.square.base_url.as_ref()
     }
 
     fn get_auth_header(
         &self,
-        auth_type: &types::ConnectorAuthType,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
-        let auth = square::SquareAuthType::try_from(auth_type)
+        auth_type: &ConnectorAuthType,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
+        let auth = SquareAuthType::try_from(auth_type)
             .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
         Ok(vec![(
             headers::AUTHORIZATION.to_string(),
@@ -142,39 +165,24 @@ impl ConnectorValidation for Square {
         match capture_method {
             enums::CaptureMethod::Automatic | enums::CaptureMethod::Manual => Ok(()),
             enums::CaptureMethod::ManualMultiple | enums::CaptureMethod::Scheduled => Err(
-                super::utils::construct_not_implemented_error_report(capture_method, self.id()),
+                utils::construct_not_implemented_error_report(capture_method, self.id()),
             ),
         }
     }
 }
 
-impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData>
-    for Square
-{
+impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Square {
     //TODO: implement sessions flow
 }
 
-impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken>
-    for Square
-{
-}
+impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Square {}
 
-impl
-    ConnectorIntegration<
-        api::SetupMandate,
-        types::SetupMandateRequestData,
-        types::PaymentsResponseData,
-    > for Square
-{
+impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Square {
     fn build_request(
         &self,
-        _req: &types::RouterData<
-            api::SetupMandate,
-            types::SetupMandateRequestData,
-            types::PaymentsResponseData,
-        >,
-        _connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        _req: &RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData>,
+        _connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Err(
             errors::ConnectorError::NotImplemented("Setup Mandate flow for Square".to_string())
                 .into(),
@@ -183,18 +191,14 @@ impl
 }
 
 #[async_trait::async_trait]
-impl
-    ConnectorIntegration<
-        api::PaymentMethodToken,
-        types::PaymentMethodTokenizationData,
-        types::PaymentsResponseData,
-    > for Square
+impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData>
+    for Square
 {
     fn get_headers(
         &self,
-        _req: &types::TokenizationRouterData,
-        _connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        _req: &TokenizationRouterData,
+        _connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         Ok(vec![(
             headers::CONTENT_TYPE.to_string(),
             types::TokenizationType::get_content_type(self)
@@ -209,8 +213,8 @@ impl
 
     fn get_url(
         &self,
-        _req: &types::TokenizationRouterData,
-        connectors: &settings::Connectors,
+        _req: &TokenizationRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}v2/card-nonce",
@@ -224,22 +228,22 @@ impl
 
     fn get_request_body(
         &self,
-        req: &types::TokenizationRouterData,
-        _connectors: &settings::Connectors,
+        req: &TokenizationRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
-        let connector_req = square::SquareTokenRequest::try_from(req)?;
+        let connector_req = SquareTokenRequest::try_from(req)?;
 
         Ok(RequestContent::Json(Box::new(connector_req)))
     }
 
     fn build_request(
         &self,
-        req: &types::TokenizationRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &TokenizationRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::TokenizationType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::TokenizationType::get_headers(self, req, connectors)?)
@@ -252,12 +256,12 @@ impl
 
     fn handle_response(
         &self,
-        data: &types::TokenizationRouterData,
+        data: &TokenizationRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::TokenizationRouterData, errors::ConnectorError>
+    ) -> CustomResult<TokenizationRouterData, errors::ConnectorError>
     where
-        types::PaymentsResponseData: Clone,
+        PaymentsResponseData: Clone,
     {
         let response: square::SquareTokenResponse = res
             .response
@@ -267,7 +271,7 @@ impl
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -282,21 +286,17 @@ impl
     }
 }
 
-impl
-    ConnectorIntegration<
-        api::AuthorizeSessionToken,
-        types::AuthorizeSessionTokenData,
-        types::PaymentsResponseData,
-    > for Square
+impl ConnectorIntegration<AuthorizeSessionToken, AuthorizeSessionTokenData, PaymentsResponseData>
+    for Square
 {
     fn get_headers(
         &self,
-        _req: &types::PaymentsAuthorizeSessionTokenRouterData,
-        _connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        _req: &PaymentsAuthorizeSessionTokenRouterData,
+        _connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         Ok(vec![(
             headers::CONTENT_TYPE.to_string(),
-            types::PaymentsAuthorizeType::get_content_type(self)
+            PaymentsAuthorizeType::get_content_type(self)
                 .to_string()
                 .into(),
         )])
@@ -308,10 +308,10 @@ impl
 
     fn get_url(
         &self,
-        req: &types::PaymentsAuthorizeSessionTokenRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeSessionTokenRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
-        let auth = square::SquareAuthType::try_from(&req.connector_auth_type)
+        let auth = SquareAuthType::try_from(&req.connector_auth_type)
             .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
 
         Ok(format!(
@@ -327,12 +327,12 @@ impl
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeSessionTokenRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeSessionTokenRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
+            RequestBuilder::new()
+                .method(Method::Get)
                 .url(&types::PaymentsPreAuthorizeType::get_url(
                     self, req, connectors,
                 )?)
@@ -346,10 +346,10 @@ impl
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeSessionTokenRouterData,
+        data: &PaymentsAuthorizeSessionTokenRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsAuthorizeSessionTokenRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsAuthorizeSessionTokenRouterData, errors::ConnectorError> {
         let response: square::SquareSessionResponse = res
             .response
             .parse_struct("SquareSessionResponse")
@@ -358,7 +358,7 @@ impl
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -374,14 +374,12 @@ impl
     }
 }
 
-impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData>
-    for Square
-{
+impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -391,38 +389,34 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn get_url(
         &self,
-        _req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
+        _req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}v2/payments", self.base_url(connectors)))
     }
 
     fn get_request_body(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        _connectors: &settings::Connectors,
+        req: &PaymentsAuthorizeRouterData,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
-        let connector_req = square::SquarePaymentsRequest::try_from(req)?;
+        let connector_req = SquarePaymentsRequest::try_from(req)?;
 
         Ok(RequestContent::Json(Box::new(connector_req)))
     }
 
     fn build_request(
         &self,
-        req: &types::PaymentsAuthorizeRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsAuthorizeRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
-                .url(&types::PaymentsAuthorizeType::get_url(
-                    self, req, connectors,
-                )?)
+            RequestBuilder::new()
+                .method(Method::Post)
+                .url(&PaymentsAuthorizeType::get_url(self, req, connectors)?)
                 .attach_default_headers()
-                .headers(types::PaymentsAuthorizeType::get_headers(
-                    self, req, connectors,
-                )?)
-                .set_body(types::PaymentsAuthorizeType::get_request_body(
+                .headers(PaymentsAuthorizeType::get_headers(self, req, connectors)?)
+                .set_body(PaymentsAuthorizeType::get_request_body(
                     self, req, connectors,
                 )?)
                 .build(),
@@ -431,10 +425,10 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
 
     fn handle_response(
         &self,
-        data: &types::PaymentsAuthorizeRouterData,
+        data: &PaymentsAuthorizeRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
         let response: square::SquarePaymentsResponse = res
             .response
             .parse_struct("SquarePaymentsAuthorizeResponse")
@@ -443,7 +437,7 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -459,14 +453,12 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     }
 }
 
-impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData>
-    for Square
-{
+impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -476,8 +468,8 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn get_url(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         let connector_payment_id = req
             .request
@@ -493,12 +485,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn build_request(
         &self,
-        req: &types::PaymentsSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
+            RequestBuilder::new()
+                .method(Method::Get)
                 .url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
@@ -508,10 +500,10 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
 
     fn handle_response(
         &self,
-        data: &types::PaymentsSyncRouterData,
+        data: &PaymentsSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsSyncRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
         let response: square::SquarePaymentsResponse = res
             .response
             .parse_struct("SquarePaymentsSyncResponse")
@@ -520,7 +512,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(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -536,14 +528,12 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
     }
 }
 
-impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData>
-    for Square
-{
+impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -553,8 +543,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn get_url(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}v2/payments/{}/complete",
@@ -565,9 +555,9 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn build_request(
         &self,
-        req: &types::PaymentsCaptureRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCaptureRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         if req.request.amount_to_capture != req.request.payment_amount {
             Err(errors::ConnectorError::NotSupported {
                 message: "Partial Capture".to_string(),
@@ -575,8 +565,8 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
             })?
         }
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsCaptureType::get_headers(
@@ -588,10 +578,10 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCaptureRouterData,
+        data: &PaymentsCaptureRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCaptureRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> {
         let response: square::SquarePaymentsResponse = res
             .response
             .parse_struct("SquarePaymentsCaptureResponse")
@@ -600,7 +590,7 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -616,14 +606,12 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
     }
 }
 
-impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData>
-    for Square
-{
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -633,8 +621,8 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn get_url(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}v2/payments/{}/cancel",
@@ -645,12 +633,12 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn build_request(
         &self,
-        req: &types::PaymentsCancelRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &PaymentsCancelRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Post)
+            RequestBuilder::new()
+                .method(Method::Post)
                 .url(&types::PaymentsVoidType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?)
@@ -660,10 +648,10 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
 
     fn handle_response(
         &self,
-        data: &types::PaymentsCancelRouterData,
+        data: &PaymentsCancelRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::PaymentsCancelRouterData, errors::ConnectorError> {
+    ) -> CustomResult<PaymentsCancelRouterData, errors::ConnectorError> {
         let response: square::SquarePaymentsResponse = res
             .response
             .parse_struct("SquarePaymentsVoidResponse")
@@ -672,7 +660,7 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -688,12 +676,12 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
     }
 }
 
-impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Square {
+impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -703,28 +691,28 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn get_url(
         &self,
-        _req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
+        _req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!("{}v2/refunds", self.base_url(connectors),))
     }
 
     fn get_request_body(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        _connectors: &settings::Connectors,
+        req: &RefundsRouterData<Execute>,
+        _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
-        let connector_req = square::SquareRefundRequest::try_from(req)?;
+        let connector_req = SquareRefundRequest::try_from(req)?;
         Ok(RequestContent::Json(Box::new(connector_req)))
     }
 
     fn build_request(
         &self,
-        req: &types::RefundsRouterData<api::Execute>,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
-        let request = services::RequestBuilder::new()
-            .method(services::Method::Post)
+        req: &RefundsRouterData<Execute>,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        let request = RequestBuilder::new()
+            .method(Method::Post)
             .url(&types::RefundExecuteType::get_url(self, req, connectors)?)
             .attach_default_headers()
             .headers(types::RefundExecuteType::get_headers(
@@ -739,10 +727,10 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
 
     fn handle_response(
         &self,
-        data: &types::RefundsRouterData<api::Execute>,
+        data: &RefundsRouterData<Execute>,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundsRouterData<api::Execute>, errors::ConnectorError> {
+    ) -> CustomResult<RefundsRouterData<Execute>, errors::ConnectorError> {
         let response: square::RefundResponse = res
             .response
             .parse_struct("SquareRefundResponse")
@@ -751,7 +739,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -767,12 +755,12 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
     }
 }
 
-impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Square {
+impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Square {
     fn get_headers(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Vec<(String, Maskable<String>)>, errors::ConnectorError> {
         self.build_headers(req, connectors)
     }
 
@@ -782,8 +770,8 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn get_url(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
     ) -> CustomResult<String, errors::ConnectorError> {
         Ok(format!(
             "{}v2/refunds/{}",
@@ -794,12 +782,12 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn build_request(
         &self,
-        req: &types::RefundSyncRouterData,
-        connectors: &settings::Connectors,
-    ) -> CustomResult<Option<services::Request>, errors::ConnectorError> {
+        req: &RefundSyncRouterData,
+        connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
         Ok(Some(
-            services::RequestBuilder::new()
-                .method(services::Method::Get)
+            RequestBuilder::new()
+                .method(Method::Get)
                 .url(&types::RefundSyncType::get_url(self, req, connectors)?)
                 .attach_default_headers()
                 .headers(types::RefundSyncType::get_headers(self, req, connectors)?)
@@ -809,10 +797,10 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 
     fn handle_response(
         &self,
-        data: &types::RefundSyncRouterData,
+        data: &RefundSyncRouterData,
         event_builder: Option<&mut ConnectorEvent>,
         res: Response,
-    ) -> CustomResult<types::RefundSyncRouterData, errors::ConnectorError> {
+    ) -> CustomResult<RefundSyncRouterData, errors::ConnectorError> {
         let response: square::RefundResponse = res
             .response
             .parse_struct("SquareRefundSyncResponse")
@@ -821,7 +809,7 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
 
-        types::RouterData::try_from(types::ResponseRouterData {
+        RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
             http_code: res.status_code,
@@ -838,10 +826,10 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
 }
 
 #[async_trait::async_trait]
-impl api::IncomingWebhook for Square {
+impl IncomingWebhook for Square {
     fn get_webhook_source_verification_algorithm(
         &self,
-        _request: &api::IncomingWebhookRequestDetails<'_>,
+        _request: &IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn common_utils::crypto::VerifySignature + Send>, errors::ConnectorError>
     {
         Ok(Box::new(common_utils::crypto::HmacSha256))
@@ -849,12 +837,12 @@ impl api::IncomingWebhook for Square {
 
     fn get_webhook_source_verification_signature(
         &self,
-        request: &api::IncomingWebhookRequestDetails<'_>,
+        request: &IncomingWebhookRequestDetails<'_>,
         _connector_webhook_secrets: &api_models::webhooks::ConnectorWebhookSecrets,
     ) -> CustomResult<Vec<u8>, errors::ConnectorError> {
         let encoded_signature =
-            super_utils::get_header_key_value("x-square-hmacsha256-signature", request.headers)?;
-        let signature = consts::BASE64_ENGINE
+            get_header_key_value("x-square-hmacsha256-signature", request.headers)?;
+        let signature = common_utils::consts::BASE64_ENGINE
             .decode(encoded_signature)
             .change_context(errors::ConnectorError::WebhookSignatureNotFound)?;
         Ok(signature)
@@ -862,7 +850,7 @@ impl api::IncomingWebhook for Square {
 
     fn get_webhook_source_verification_message(
         &self,
-        request: &api::IncomingWebhookRequestDetails<'_>,
+        request: &IncomingWebhookRequestDetails<'_>,
         _merchant_id: &common_utils::id_type::MerchantId,
         _connector_webhook_secrets: &api_models::webhooks::ConnectorWebhookSecrets,
     ) -> CustomResult<Vec<u8>, errors::ConnectorError> {
@@ -885,43 +873,37 @@ impl api::IncomingWebhook for Square {
 
     fn get_webhook_object_reference_id(
         &self,
-        request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::webhooks::ObjectReferenceId, errors::ConnectorError> {
+        request: &IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<ObjectReferenceId, errors::ConnectorError> {
         let webhook_body: square::SquareWebhookBody = request
             .body
             .parse_struct("SquareWebhookBody")
             .change_context(errors::ConnectorError::WebhookReferenceIdNotFound)?;
 
         match webhook_body.data.object {
-            square::SquareWebhookObject::Payment(_) => {
-                Ok(api_models::webhooks::ObjectReferenceId::PaymentId(
-                    api_models::payments::PaymentIdType::ConnectorTransactionId(
-                        webhook_body.data.id,
-                    ),
-                ))
-            }
-            square::SquareWebhookObject::Refund(_) => {
-                Ok(api_models::webhooks::ObjectReferenceId::RefundId(
-                    api_models::webhooks::RefundIdType::ConnectorRefundId(webhook_body.data.id),
-                ))
-            }
+            square::SquareWebhookObject::Payment(_) => Ok(ObjectReferenceId::PaymentId(
+                api_models::payments::PaymentIdType::ConnectorTransactionId(webhook_body.data.id),
+            )),
+            square::SquareWebhookObject::Refund(_) => Ok(ObjectReferenceId::RefundId(
+                api_models::webhooks::RefundIdType::ConnectorRefundId(webhook_body.data.id),
+            )),
         }
     }
 
     fn get_webhook_event_type(
         &self,
-        request: &api::IncomingWebhookRequestDetails<'_>,
-    ) -> CustomResult<api::IncomingWebhookEvent, errors::ConnectorError> {
+        request: &IncomingWebhookRequestDetails<'_>,
+    ) -> CustomResult<IncomingWebhookEvent, errors::ConnectorError> {
         let details: square::SquareWebhookBody = request
             .body
             .parse_struct("SquareWebhookEventType")
             .change_context(errors::ConnectorError::WebhookEventTypeNotFound)?;
-        Ok(api::IncomingWebhookEvent::from(details.data.object))
+        Ok(IncomingWebhookEvent::from(details.data.object))
     }
 
     fn get_webhook_resource_object(
         &self,
-        request: &api::IncomingWebhookRequestDetails<'_>,
+        request: &IncomingWebhookRequestDetails<'_>,
     ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> {
         let details: square::SquareWebhookBody =
             request
diff --git a/crates/router/src/connector/square/transformers.rs b/crates/hyperswitch_connectors/src/connectors/square/transformers.rs
similarity index 59%
rename from crates/router/src/connector/square/transformers.rs
rename to crates/hyperswitch_connectors/src/connectors/square/transformers.rs
index db7058f3384..4e2b30a574b 100644
--- a/crates/router/src/connector/square/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/square/transformers.rs
@@ -1,38 +1,44 @@
+use api_models::webhooks::IncomingWebhookEvent;
+use common_enums::enums;
 use error_stack::ResultExt;
+use hyperswitch_domain_models::{
+    payment_method_data::{BankDebitData, Card, PayLaterData, PaymentMethodData, WalletData},
+    router_data::{ConnectorAuthType, PaymentMethodToken, RouterData},
+    router_flow_types::{refunds::Execute, RSync},
+    router_request_types::ResponseId,
+    router_response_types::{PaymentsResponseData, RefundsResponseData},
+    types,
+};
+use hyperswitch_interfaces::errors;
 use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
 
 use crate::{
-    connector::utils::{self, CardData, PaymentsAuthorizeRequestData, RouterData},
-    core::errors,
-    types::{self, api, domain, storage::enums},
+    types::{RefundsResponseRouterData, ResponseRouterData},
     unimplemented_payment_method,
+    utils::{self, CardData, PaymentsAuthorizeRequestData, RouterData as _},
 };
 
-impl TryFrom<(&types::TokenizationRouterData, domain::BankDebitData)> for SquareTokenRequest {
+impl TryFrom<(&types::TokenizationRouterData, BankDebitData)> for SquareTokenRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: (&types::TokenizationRouterData, domain::BankDebitData),
+        value: (&types::TokenizationRouterData, BankDebitData),
     ) -> Result<Self, Self::Error> {
         let (_item, bank_debit_data) = value;
         match bank_debit_data {
-            domain::BankDebitData::AchBankDebit { .. }
-            | domain::BankDebitData::SepaBankDebit { .. }
-            | domain::BankDebitData::BecsBankDebit { .. }
-            | domain::BankDebitData::BacsBankDebit { .. } => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("Square"),
-                ))?
-            }
+            BankDebitData::AchBankDebit { .. }
+            | BankDebitData::SepaBankDebit { .. }
+            | BankDebitData::BecsBankDebit { .. }
+            | BankDebitData::BacsBankDebit { .. } => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("Square"),
+            ))?,
         }
     }
 }
 
-impl TryFrom<(&types::TokenizationRouterData, domain::Card)> for SquareTokenRequest {
+impl TryFrom<(&types::TokenizationRouterData, Card)> for SquareTokenRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(
-        value: (&types::TokenizationRouterData, domain::Card),
-    ) -> Result<Self, Self::Error> {
+    fn try_from(value: (&types::TokenizationRouterData, Card)) -> Result<Self, Self::Error> {
         let (item, card_data) = value;
         let auth = SquareAuthType::try_from(&item.connector_auth_type)
             .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
@@ -69,63 +75,59 @@ impl TryFrom<(&types::TokenizationRouterData, domain::Card)> for SquareTokenRequ
     }
 }
 
-impl TryFrom<(&types::TokenizationRouterData, domain::PayLaterData)> for SquareTokenRequest {
+impl TryFrom<(&types::TokenizationRouterData, PayLaterData)> for SquareTokenRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        value: (&types::TokenizationRouterData, domain::PayLaterData),
+        value: (&types::TokenizationRouterData, PayLaterData),
     ) -> Result<Self, Self::Error> {
         let (_item, pay_later_data) = value;
         match pay_later_data {
-            domain::PayLaterData::AfterpayClearpayRedirect { .. }
-            | domain::PayLaterData::KlarnaRedirect { .. }
-            | domain::PayLaterData::KlarnaSdk { .. }
-            | domain::PayLaterData::AffirmRedirect { .. }
-            | domain::PayLaterData::PayBrightRedirect { .. }
-            | domain::PayLaterData::WalleyRedirect { .. }
-            | domain::PayLaterData::AlmaRedirect { .. }
-            | domain::PayLaterData::AtomeRedirect { .. } => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("Square"),
-                ))?
-            }
+            PayLaterData::AfterpayClearpayRedirect { .. }
+            | PayLaterData::KlarnaRedirect { .. }
+            | PayLaterData::KlarnaSdk { .. }
+            | PayLaterData::AffirmRedirect { .. }
+            | PayLaterData::PayBrightRedirect { .. }
+            | PayLaterData::WalleyRedirect { .. }
+            | PayLaterData::AlmaRedirect { .. }
+            | PayLaterData::AtomeRedirect { .. } => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("Square"),
+            ))?,
         }
     }
 }
 
-impl TryFrom<(&types::TokenizationRouterData, domain::WalletData)> for SquareTokenRequest {
+impl TryFrom<(&types::TokenizationRouterData, WalletData)> for SquareTokenRequest {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(
-        value: (&types::TokenizationRouterData, domain::WalletData),
-    ) -> Result<Self, Self::Error> {
+    fn try_from(value: (&types::TokenizationRouterData, WalletData)) -> Result<Self, Self::Error> {
         let (_item, wallet_data) = value;
         match wallet_data {
-            domain::WalletData::ApplePay(_)
-            | domain::WalletData::GooglePay(_)
-            | domain::WalletData::AliPayQr(_)
-            | domain::WalletData::AliPayRedirect(_)
-            | domain::WalletData::AliPayHkRedirect(_)
-            | domain::WalletData::MomoRedirect(_)
-            | domain::WalletData::KakaoPayRedirect(_)
-            | domain::WalletData::GoPayRedirect(_)
-            | domain::WalletData::GcashRedirect(_)
-            | domain::WalletData::ApplePayRedirect(_)
-            | domain::WalletData::ApplePayThirdPartySdk(_)
-            | domain::WalletData::DanaRedirect {}
-            | domain::WalletData::GooglePayRedirect(_)
-            | domain::WalletData::GooglePayThirdPartySdk(_)
-            | domain::WalletData::MbWayRedirect(_)
-            | domain::WalletData::MobilePayRedirect(_)
-            | domain::WalletData::PaypalRedirect(_)
-            | domain::WalletData::PaypalSdk(_)
-            | domain::WalletData::SamsungPay(_)
-            | domain::WalletData::TwintRedirect {}
-            | domain::WalletData::VippsRedirect {}
-            | domain::WalletData::TouchNGoRedirect(_)
-            | domain::WalletData::WeChatPayRedirect(_)
-            | domain::WalletData::WeChatPayQr(_)
-            | domain::WalletData::CashappQr(_)
-            | domain::WalletData::SwishQr(_)
-            | domain::WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
+            WalletData::ApplePay(_)
+            | WalletData::GooglePay(_)
+            | WalletData::AliPayQr(_)
+            | WalletData::AliPayRedirect(_)
+            | WalletData::AliPayHkRedirect(_)
+            | WalletData::MomoRedirect(_)
+            | WalletData::KakaoPayRedirect(_)
+            | WalletData::GoPayRedirect(_)
+            | WalletData::GcashRedirect(_)
+            | WalletData::ApplePayRedirect(_)
+            | WalletData::ApplePayThirdPartySdk(_)
+            | WalletData::DanaRedirect {}
+            | WalletData::GooglePayRedirect(_)
+            | WalletData::GooglePayThirdPartySdk(_)
+            | WalletData::MbWayRedirect(_)
+            | WalletData::MobilePayRedirect(_)
+            | WalletData::PaypalRedirect(_)
+            | WalletData::PaypalSdk(_)
+            | WalletData::SamsungPay(_)
+            | WalletData::TwintRedirect {}
+            | WalletData::VippsRedirect {}
+            | WalletData::TouchNGoRedirect(_)
+            | WalletData::WeChatPayRedirect(_)
+            | WalletData::WeChatPayQr(_)
+            | WalletData::CashappQr(_)
+            | WalletData::SwishQr(_)
+            | WalletData::Mifinity(_) => Err(errors::ConnectorError::NotImplemented(
                 utils::get_unimplemented_payment_method_error_message("Square"),
             ))?,
         }
@@ -156,31 +158,27 @@ impl TryFrom<&types::TokenizationRouterData> for SquareTokenRequest {
     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::BankDebit(bank_debit_data) => {
+            PaymentMethodData::BankDebit(bank_debit_data) => {
                 Self::try_from((item, bank_debit_data))
             }
-            domain::PaymentMethodData::Card(card_data) => Self::try_from((item, card_data)),
-            domain::PaymentMethodData::Wallet(wallet_data) => Self::try_from((item, wallet_data)),
-            domain::PaymentMethodData::PayLater(pay_later_data) => {
-                Self::try_from((item, pay_later_data))
-            }
-            domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_) => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("Square"),
-                ))?
-            }
+            PaymentMethodData::Card(card_data) => Self::try_from((item, card_data)),
+            PaymentMethodData::Wallet(wallet_data) => Self::try_from((item, wallet_data)),
+            PaymentMethodData::PayLater(pay_later_data) => Self::try_from((item, pay_later_data)),
+            PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_) => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("Square"),
+            ))?,
         }
     }
 }
@@ -191,18 +189,17 @@ pub struct SquareSessionResponse {
     session_id: Secret<String>,
 }
 
-impl<F, T>
-    TryFrom<types::ResponseRouterData<F, SquareSessionResponse, T, types::PaymentsResponseData>>
-    for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, SquareSessionResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<F, SquareSessionResponse, T, types::PaymentsResponseData>,
+        item: ResponseRouterData<F, SquareSessionResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
             status: enums::AttemptStatus::Pending,
             session_token: Some(item.response.session_id.clone().expose()),
-            response: Ok(types::PaymentsResponseData::SessionTokenResponse {
+            response: Ok(PaymentsResponseData::SessionTokenResponse {
                 session_token: item.response.session_id.expose(),
             }),
             ..item.data
@@ -215,16 +212,15 @@ pub struct SquareTokenResponse {
     card_nonce: Secret<String>,
 }
 
-impl<F, T>
-    TryFrom<types::ResponseRouterData<F, SquareTokenResponse, T, types::PaymentsResponseData>>
-    for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, SquareTokenResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<F, SquareTokenResponse, T, types::PaymentsResponseData>,
+        item: ResponseRouterData<F, SquareTokenResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            response: Ok(types::PaymentsResponseData::TokenizationResponse {
+            response: Ok(PaymentsResponseData::TokenizationResponse {
                 token: item.response.card_nonce.expose(),
             }),
             ..item.data
@@ -258,13 +254,13 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for SquarePaymentsRequest {
     fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> {
         let autocomplete = item.request.is_auto_capture()?;
         match item.request.payment_method_data.clone() {
-            domain::PaymentMethodData::Card(_) => {
+            PaymentMethodData::Card(_) => {
                 let pm_token = item.get_payment_method_token()?;
                 Ok(Self {
                     idempotency_key: Secret::new(item.attempt_id.clone()),
                     source_id: match pm_token {
-                        types::PaymentMethodToken::Token(token) => token,
-                        types::PaymentMethodToken::ApplePayDecrypt(_) => Err(
+                        PaymentMethodToken::Token(token) => token,
+                        PaymentMethodToken::ApplePayDecrypt(_) => Err(
                             unimplemented_payment_method!("Apple Pay", "Simplified", "Square"),
                         )?,
                     },
@@ -279,26 +275,24 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for SquarePaymentsRequest {
                     },
                 })
             }
-            domain::PaymentMethodData::BankDebit(_)
-            | domain::PaymentMethodData::GiftCard(_)
-            | domain::PaymentMethodData::PayLater(_)
-            | domain::PaymentMethodData::Wallet(_)
-            | domain::PaymentMethodData::BankRedirect(_)
-            | domain::PaymentMethodData::BankTransfer(_)
-            | domain::PaymentMethodData::CardRedirect(_)
-            | domain::PaymentMethodData::Crypto(_)
-            | domain::PaymentMethodData::MandatePayment
-            | domain::PaymentMethodData::Reward
-            | domain::PaymentMethodData::RealTimePayment(_)
-            | domain::PaymentMethodData::Upi(_)
-            | domain::PaymentMethodData::Voucher(_)
-            | domain::PaymentMethodData::OpenBanking(_)
-            | domain::PaymentMethodData::CardToken(_)
-            | domain::PaymentMethodData::NetworkToken(_) => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("Square"),
-                ))?
-            }
+            PaymentMethodData::BankDebit(_)
+            | PaymentMethodData::GiftCard(_)
+            | PaymentMethodData::PayLater(_)
+            | PaymentMethodData::Wallet(_)
+            | PaymentMethodData::BankRedirect(_)
+            | PaymentMethodData::BankTransfer(_)
+            | PaymentMethodData::CardRedirect(_)
+            | PaymentMethodData::Crypto(_)
+            | PaymentMethodData::MandatePayment
+            | PaymentMethodData::Reward
+            | PaymentMethodData::RealTimePayment(_)
+            | PaymentMethodData::Upi(_)
+            | PaymentMethodData::Voucher(_)
+            | PaymentMethodData::OpenBanking(_)
+            | PaymentMethodData::CardToken(_)
+            | PaymentMethodData::NetworkToken(_) => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("Square"),
+            ))?,
         }
     }
 }
@@ -309,21 +303,21 @@ pub struct SquareAuthType {
     pub(super) key1: Secret<String>,
 }
 
-impl TryFrom<&types::ConnectorAuthType> for SquareAuthType {
+impl TryFrom<&ConnectorAuthType> for SquareAuthType {
     type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(auth_type: &types::ConnectorAuthType) -> Result<Self, Self::Error> {
+    fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> {
         match auth_type {
-            types::ConnectorAuthType::BodyKey { api_key, key1, .. } => Ok(Self {
+            ConnectorAuthType::BodyKey { api_key, key1, .. } => Ok(Self {
                 api_key: api_key.to_owned(),
                 key1: key1.to_owned(),
             }),
-            types::ConnectorAuthType::HeaderKey { .. }
-            | types::ConnectorAuthType::SignatureKey { .. }
-            | types::ConnectorAuthType::MultiAuthKey { .. }
-            | types::ConnectorAuthType::CurrencyAuthKey { .. }
-            | types::ConnectorAuthType::TemporaryAuth { .. }
-            | types::ConnectorAuthType::NoKey { .. }
-            | types::ConnectorAuthType::CertificateAuth { .. } => {
+            ConnectorAuthType::HeaderKey { .. }
+            | ConnectorAuthType::SignatureKey { .. }
+            | ConnectorAuthType::MultiAuthKey { .. }
+            | ConnectorAuthType::CurrencyAuthKey { .. }
+            | ConnectorAuthType::TemporaryAuth { .. }
+            | ConnectorAuthType::NoKey { .. }
+            | ConnectorAuthType::CertificateAuth { .. } => {
                 Err(errors::ConnectorError::FailedToObtainAuthType.into())
             }
         }
@@ -364,13 +358,12 @@ pub struct SquarePaymentsResponse {
     payment: SquarePaymentsResponseDetails,
 }
 
-impl<F, T>
-    TryFrom<types::ResponseRouterData<F, SquarePaymentsResponse, T, types::PaymentsResponseData>>
-    for types::RouterData<F, T, types::PaymentsResponseData>
+impl<F, T> TryFrom<ResponseRouterData<F, SquarePaymentsResponse, T, PaymentsResponseData>>
+    for RouterData<F, T, PaymentsResponseData>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::ResponseRouterData<F, SquarePaymentsResponse, T, types::PaymentsResponseData>,
+        item: ResponseRouterData<F, SquarePaymentsResponse, T, PaymentsResponseData>,
     ) -> Result<Self, Self::Error> {
         //Since this try_from is being used in Authorize, Sync, Capture & Void flow. Field amount_captured should only be updated in case of Charged status.
         let status = enums::AttemptStatus::from(item.response.payment.status);
@@ -380,8 +373,8 @@ impl<F, T>
         };
         Ok(Self {
             status,
-            response: Ok(types::PaymentsResponseData::TransactionResponse {
-                resource_id: types::ResponseId::ConnectorTransactionId(item.response.payment.id),
+            response: Ok(PaymentsResponseData::TransactionResponse {
+                resource_id: ResponseId::ConnectorTransactionId(item.response.payment.id),
                 redirection_data: None,
                 mandate_reference: None,
                 connector_metadata: None,
@@ -448,15 +441,15 @@ pub struct RefundResponse {
     refund: SquareRefundResponseDetails,
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>>
-    for types::RefundsRouterData<api::Execute>
+impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>>
+    for types::RefundsRouterData<Execute>
 {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::Execute, RefundResponse>,
+        item: RefundsResponseRouterData<Execute, RefundResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            response: Ok(types::RefundsResponseData {
+            response: Ok(RefundsResponseData {
                 connector_refund_id: item.response.refund.id,
                 refund_status: enums::RefundStatus::from(item.response.refund.status),
             }),
@@ -465,15 +458,13 @@ impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>>
     }
 }
 
-impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundResponse>>
-    for types::RefundsRouterData<api::RSync>
-{
+impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for types::RefundsRouterData<RSync> {
     type Error = error_stack::Report<errors::ConnectorError>;
     fn try_from(
-        item: types::RefundsResponseRouterData<api::RSync, RefundResponse>,
+        item: RefundsResponseRouterData<RSync, RefundResponse>,
     ) -> Result<Self, Self::Error> {
         Ok(Self {
-            response: Ok(types::RefundsResponseData {
+            response: Ok(RefundsResponseData {
                 connector_refund_id: item.response.refund.id,
                 refund_status: enums::RefundStatus::from(item.response.refund.status),
             }),
@@ -513,7 +504,7 @@ pub struct SquareWebhookBody {
     pub data: SquareWebhookData,
 }
 
-impl From<SquareWebhookObject> for api::IncomingWebhookEvent {
+impl From<SquareWebhookObject> for IncomingWebhookEvent {
     fn from(item: SquareWebhookObject) -> Self {
         match item {
             SquareWebhookObject::Payment(payment_data) => match payment_data.status {
diff --git a/crates/hyperswitch_connectors/src/constants.rs b/crates/hyperswitch_connectors/src/constants.rs
index 4c27e11fc45..5b71a1bd29c 100644
--- a/crates/hyperswitch_connectors/src/constants.rs
+++ b/crates/hyperswitch_connectors/src/constants.rs
@@ -12,7 +12,11 @@ pub(crate) mod headers {
     pub(crate) const X_ACCEPT_VERSION: &str = "X-Accept-Version";
     pub(crate) const X_CC_API_KEY: &str = "X-CC-Api-Key";
     pub(crate) const X_CC_VERSION: &str = "X-CC-Version";
+    pub(crate) const X_DATE: &str = "X-Date";
+    pub(crate) const X_LOGIN: &str = "X-Login";
     pub(crate) const X_NN_ACCESS_KEY: &str = "X-NN-Access-Key";
+    pub(crate) const X_TRANS_KEY: &str = "X-Trans-Key";
     pub(crate) const X_RANDOM_VALUE: &str = "X-RandomValue";
     pub(crate) const X_REQUEST_DATE: &str = "X-RequestDate";
+    pub(crate) const X_VERSION: &str = "X-Version";
 }
diff --git a/crates/hyperswitch_connectors/src/default_implementations.rs b/crates/hyperswitch_connectors/src/default_implementations.rs
index 31052ab0df2..0d43c263f97 100644
--- a/crates/hyperswitch_connectors/src/default_implementations.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations.rs
@@ -95,6 +95,7 @@ default_imp_for_authorize_session_token!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -132,10 +133,12 @@ default_imp_for_calculate_tax!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Helcim,
     connectors::Stax,
+    connectors::Square,
     connectors::Novalnet,
     connectors::Mollie,
     connectors::Nexixpay,
@@ -169,10 +172,12 @@ default_imp_for_session_update!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Helcim,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Mollie,
     connectors::Novalnet,
@@ -208,6 +213,7 @@ default_imp_for_complete_authorize!(
     connectors::Cashtocode,
     connectors::Coinbase,
     connectors::Cryptopay,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -216,6 +222,7 @@ default_imp_for_complete_authorize!(
     connectors::Novalnet,
     connectors::Nexixpay,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -245,6 +252,7 @@ default_imp_for_incremental_authorization!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -255,6 +263,7 @@ default_imp_for_incremental_authorization!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -284,6 +293,7 @@ default_imp_for_create_customer!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -293,6 +303,7 @@ default_imp_for_create_customer!(
     connectors::Novalnet,
     connectors::Nexixpay,
     connectors::Powertranz,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -323,6 +334,7 @@ default_imp_for_connector_redirect_response!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -331,6 +343,7 @@ default_imp_for_connector_redirect_response!(
     connectors::Nexixpay,
     connectors::Powertranz,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -360,6 +373,7 @@ default_imp_for_pre_processing_steps!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -370,6 +384,7 @@ default_imp_for_pre_processing_steps!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -399,6 +414,7 @@ default_imp_for_post_processing_steps!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -409,6 +425,7 @@ default_imp_for_post_processing_steps!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -438,6 +455,7 @@ default_imp_for_approve!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -448,6 +466,7 @@ default_imp_for_approve!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -477,6 +496,7 @@ default_imp_for_reject!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -487,6 +507,7 @@ default_imp_for_reject!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -516,6 +537,7 @@ default_imp_for_webhook_source_verification!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -526,6 +548,7 @@ default_imp_for_webhook_source_verification!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -556,6 +579,7 @@ default_imp_for_accept_dispute!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -566,6 +590,7 @@ default_imp_for_accept_dispute!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -595,6 +620,7 @@ default_imp_for_submit_evidence!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -605,6 +631,7 @@ default_imp_for_submit_evidence!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -634,6 +661,7 @@ default_imp_for_defend_dispute!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -644,6 +672,7 @@ default_imp_for_defend_dispute!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -682,6 +711,7 @@ default_imp_for_file_upload!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -692,6 +722,7 @@ default_imp_for_file_upload!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -723,6 +754,7 @@ default_imp_for_payouts_create!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -733,6 +765,7 @@ default_imp_for_payouts_create!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -764,6 +797,7 @@ default_imp_for_payouts_retrieve!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -774,6 +808,7 @@ default_imp_for_payouts_retrieve!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -805,6 +840,7 @@ default_imp_for_payouts_eligibility!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -815,6 +851,7 @@ default_imp_for_payouts_eligibility!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -846,6 +883,7 @@ default_imp_for_payouts_fulfill!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -856,6 +894,7 @@ default_imp_for_payouts_fulfill!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -887,6 +926,7 @@ default_imp_for_payouts_cancel!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -897,6 +937,7 @@ default_imp_for_payouts_cancel!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -928,6 +969,7 @@ default_imp_for_payouts_quote!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -938,6 +980,7 @@ default_imp_for_payouts_quote!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -969,6 +1012,7 @@ default_imp_for_payouts_recipient!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -979,6 +1023,7 @@ default_imp_for_payouts_recipient!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1010,6 +1055,7 @@ default_imp_for_payouts_recipient_account!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1020,6 +1066,7 @@ default_imp_for_payouts_recipient_account!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1051,6 +1098,7 @@ default_imp_for_frm_sale!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1061,6 +1109,7 @@ default_imp_for_frm_sale!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1092,6 +1141,7 @@ default_imp_for_frm_checkout!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1102,6 +1152,7 @@ default_imp_for_frm_checkout!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1133,6 +1184,7 @@ default_imp_for_frm_transaction!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1143,6 +1195,7 @@ default_imp_for_frm_transaction!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1174,6 +1227,7 @@ default_imp_for_frm_fulfillment!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1184,6 +1238,7 @@ default_imp_for_frm_fulfillment!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1215,6 +1270,7 @@ default_imp_for_frm_record_return!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1225,6 +1281,7 @@ default_imp_for_frm_record_return!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1253,6 +1310,7 @@ default_imp_for_revoking_mandates!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1263,6 +1321,7 @@ default_imp_for_revoking_mandates!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
diff --git a/crates/hyperswitch_connectors/src/default_implementations_v2.rs b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
index 16e592688ac..d4e1836ac5f 100644
--- a/crates/hyperswitch_connectors/src/default_implementations_v2.rs
+++ b/crates/hyperswitch_connectors/src/default_implementations_v2.rs
@@ -202,6 +202,7 @@ default_imp_for_new_connector_integration_payment!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -212,6 +213,7 @@ default_imp_for_new_connector_integration_payment!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -242,6 +244,7 @@ default_imp_for_new_connector_integration_refund!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -252,6 +255,7 @@ default_imp_for_new_connector_integration_refund!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -277,6 +281,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -287,6 +292,7 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -318,6 +324,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -328,6 +335,7 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -358,6 +366,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -368,6 +377,7 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -398,6 +408,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -408,6 +419,7 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -448,6 +460,7 @@ default_imp_for_new_connector_integration_file_upload!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -458,6 +471,7 @@ default_imp_for_new_connector_integration_file_upload!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -490,6 +504,7 @@ default_imp_for_new_connector_integration_payouts_create!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -500,6 +515,7 @@ default_imp_for_new_connector_integration_payouts_create!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -532,6 +548,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -542,6 +559,7 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -574,6 +592,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -584,6 +603,7 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -616,6 +636,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -626,6 +647,7 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -658,6 +680,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -668,6 +691,7 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -700,6 +724,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -710,6 +735,7 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -742,6 +768,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -752,6 +779,7 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -784,6 +812,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -794,6 +823,7 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -824,6 +854,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -834,6 +865,7 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -866,6 +898,7 @@ default_imp_for_new_connector_integration_frm_sale!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -876,6 +909,7 @@ default_imp_for_new_connector_integration_frm_sale!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -908,6 +942,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -918,6 +953,7 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -950,6 +986,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -960,6 +997,7 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -992,6 +1030,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1002,6 +1041,7 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1034,6 +1074,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1044,6 +1085,7 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
@@ -1073,6 +1115,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connectors::Coinbase,
     connectors::Cryptopay,
     connectors::Deutschebank,
+    connectors::Dlocal,
     connectors::Fiserv,
     connectors::Fiservemea,
     connectors::Fiuu,
@@ -1083,6 +1126,7 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connectors::Powertranz,
     connectors::Mollie,
     connectors::Stax,
+    connectors::Square,
     connectors::Taxjar,
     connectors::Thunes,
     connectors::Tsys,
diff --git a/crates/hyperswitch_domain_models/src/types.rs b/crates/hyperswitch_domain_models/src/types.rs
index 3d47afb9b82..a6be862403d 100644
--- a/crates/hyperswitch_domain_models/src/types.rs
+++ b/crates/hyperswitch_domain_models/src/types.rs
@@ -1,14 +1,15 @@
 use crate::{
     router_data::{AccessToken, RouterData},
     router_flow_types::{
-        AccessTokenAuth, Authorize, CalculateTax, Capture, CompleteAuthorize,
-        CreateConnectorCustomer, PSync, PaymentMethodToken, RSync, SetupMandate, Void,
+        AccessTokenAuth, Authorize, AuthorizeSessionToken, CalculateTax, Capture,
+        CompleteAuthorize, CreateConnectorCustomer, PSync, PaymentMethodToken, RSync, SetupMandate,
+        Void,
     },
     router_request_types::{
-        AccessTokenRequestData, CompleteAuthorizeData, ConnectorCustomerData,
-        PaymentMethodTokenizationData, PaymentsAuthorizeData, PaymentsCancelData,
-        PaymentsCaptureData, PaymentsSyncData, PaymentsTaxCalculationData, RefundsData,
-        SetupMandateRequestData,
+        AccessTokenRequestData, AuthorizeSessionTokenData, CompleteAuthorizeData,
+        ConnectorCustomerData, PaymentMethodTokenizationData, PaymentsAuthorizeData,
+        PaymentsCancelData, PaymentsCaptureData, PaymentsSyncData, PaymentsTaxCalculationData,
+        RefundsData, SetupMandateRequestData,
     },
     router_response_types::{
         PaymentsResponseData, RefundsResponseData, TaxCalculationResponseData,
@@ -17,6 +18,8 @@ use crate::{
 
 pub type PaymentsAuthorizeRouterData =
     RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData>;
+pub type PaymentsAuthorizeSessionTokenRouterData =
+    RouterData<AuthorizeSessionToken, AuthorizeSessionTokenData, PaymentsResponseData>;
 pub type PaymentsSyncRouterData = RouterData<PSync, PaymentsSyncData, PaymentsResponseData>;
 pub type PaymentsCaptureRouterData = RouterData<Capture, PaymentsCaptureData, PaymentsResponseData>;
 pub type PaymentsCancelRouterData = RouterData<Void, PaymentsCancelData, PaymentsResponseData>;
diff --git a/crates/router/src/connector.rs b/crates/router/src/connector.rs
index 116fc67320f..390d5de1513 100644
--- a/crates/router/src/connector.rs
+++ b/crates/router/src/connector.rs
@@ -12,7 +12,6 @@ pub mod braintree;
 pub mod checkout;
 pub mod cybersource;
 pub mod datatrans;
-pub mod dlocal;
 #[cfg(feature = "dummy_connector")]
 pub mod dummyconnector;
 pub mod ebanx;
@@ -46,7 +45,6 @@ pub mod razorpay;
 pub mod riskified;
 pub mod shift4;
 pub mod signifyd;
-pub mod square;
 pub mod stripe;
 pub mod threedsecureio;
 pub mod trustpay;
@@ -61,11 +59,11 @@ pub mod zsl;
 pub use hyperswitch_connectors::connectors::{
     bambora, bambora::Bambora, bitpay, bitpay::Bitpay, cashtocode, cashtocode::Cashtocode,
     coinbase, coinbase::Coinbase, cryptopay, cryptopay::Cryptopay, deutschebank,
-    deutschebank::Deutschebank, fiserv, fiserv::Fiserv, fiservemea, fiservemea::Fiservemea, fiuu,
-    fiuu::Fiuu, globepay, globepay::Globepay, helcim, helcim::Helcim, mollie, mollie::Mollie,
-    nexixpay, nexixpay::Nexixpay, novalnet, novalnet::Novalnet, powertranz, powertranz::Powertranz,
-    stax, stax::Stax, taxjar, taxjar::Taxjar, thunes, thunes::Thunes, tsys, tsys::Tsys, volt,
-    volt::Volt, worldline, worldline::Worldline,
+    deutschebank::Deutschebank, dlocal, dlocal::Dlocal, fiserv, fiserv::Fiserv, fiservemea,
+    fiservemea::Fiservemea, fiuu, fiuu::Fiuu, globepay, globepay::Globepay, helcim, helcim::Helcim,
+    mollie, mollie::Mollie, nexixpay, nexixpay::Nexixpay, novalnet, novalnet::Novalnet, powertranz,
+    powertranz::Powertranz, square, square::Square, stax, stax::Stax, taxjar, taxjar::Taxjar,
+    thunes, thunes::Thunes, tsys, tsys::Tsys, volt, volt::Volt, worldline, worldline::Worldline,
 };
 
 #[cfg(feature = "dummy_connector")]
@@ -74,14 +72,13 @@ pub use self::{
     aci::Aci, adyen::Adyen, adyenplatform::Adyenplatform, airwallex::Airwallex,
     authorizedotnet::Authorizedotnet, bamboraapac::Bamboraapac, bankofamerica::Bankofamerica,
     billwerk::Billwerk, bluesnap::Bluesnap, boku::Boku, braintree::Braintree, checkout::Checkout,
-    cybersource::Cybersource, datatrans::Datatrans, dlocal::Dlocal, ebanx::Ebanx, forte::Forte,
+    cybersource::Cybersource, datatrans::Datatrans, ebanx::Ebanx, forte::Forte,
     globalpay::Globalpay, gocardless::Gocardless, gpayments::Gpayments, iatapay::Iatapay,
     itaubank::Itaubank, klarna::Klarna, mifinity::Mifinity, multisafepay::Multisafepay,
     netcetera::Netcetera, nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo,
     opennode::Opennode, paybox::Paybox, payeezy::Payeezy, payme::Payme, payone::Payone,
     paypal::Paypal, payu::Payu, placetopay::Placetopay, plaid::Plaid, prophetpay::Prophetpay,
     rapyd::Rapyd, razorpay::Razorpay, riskified::Riskified, shift4::Shift4, signifyd::Signifyd,
-    square::Square, stripe::Stripe, threedsecureio::Threedsecureio, trustpay::Trustpay,
-    wellsfargo::Wellsfargo, wellsfargopayout::Wellsfargopayout, wise::Wise, worldpay::Worldpay,
-    zen::Zen, zsl::Zsl,
+    stripe::Stripe, threedsecureio::Threedsecureio, trustpay::Trustpay, wellsfargo::Wellsfargo,
+    wellsfargopayout::Wellsfargopayout, wise::Wise, worldpay::Worldpay, zen::Zen, zsl::Zsl,
 };
diff --git a/crates/router/src/core/payments/connector_integration_v2_impls.rs b/crates/router/src/core/payments/connector_integration_v2_impls.rs
index 3ff93cf9bf0..5c350f3a475 100644
--- a/crates/router/src/core/payments/connector_integration_v2_impls.rs
+++ b/crates/router/src/core/payments/connector_integration_v2_impls.rs
@@ -685,7 +685,6 @@ default_imp_for_new_connector_integration_payment!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -715,7 +714,6 @@ default_imp_for_new_connector_integration_payment!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -760,7 +758,6 @@ default_imp_for_new_connector_integration_refund!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -790,7 +787,6 @@ default_imp_for_new_connector_integration_refund!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -829,7 +825,6 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -859,7 +854,6 @@ default_imp_for_new_connector_integration_connector_access_token!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -920,7 +914,6 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -950,7 +943,6 @@ default_imp_for_new_connector_integration_accept_dispute!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -993,7 +985,6 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1023,7 +1014,6 @@ default_imp_for_new_connector_integration_defend_dispute!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1050,7 +1040,6 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1080,7 +1069,6 @@ default_imp_for_new_connector_integration_submit_evidence!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1134,7 +1122,6 @@ default_imp_for_new_connector_integration_file_upload!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1164,7 +1151,6 @@ default_imp_for_new_connector_integration_file_upload!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1297,7 +1283,6 @@ default_imp_for_new_connector_integration_payouts_create!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1327,7 +1312,6 @@ default_imp_for_new_connector_integration_payouts_create!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1373,7 +1357,6 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1403,7 +1386,6 @@ default_imp_for_new_connector_integration_payouts_eligibility!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1449,7 +1431,6 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1479,7 +1460,6 @@ default_imp_for_new_connector_integration_payouts_fulfill!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1525,7 +1505,6 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1555,7 +1534,6 @@ default_imp_for_new_connector_integration_payouts_cancel!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1601,7 +1579,6 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1631,7 +1608,6 @@ default_imp_for_new_connector_integration_payouts_quote!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1677,7 +1653,6 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1707,7 +1682,6 @@ default_imp_for_new_connector_integration_payouts_recipient!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1753,7 +1727,6 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1784,7 +1757,6 @@ default_imp_for_new_connector_integration_payouts_sync!(
     connector::Riskified,
     connector::Signifyd,
     connector::Stripe,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1829,7 +1801,6 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1859,7 +1830,6 @@ default_imp_for_new_connector_integration_payouts_recipient_account!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -1903,7 +1873,6 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1933,7 +1902,6 @@ default_imp_for_new_connector_integration_webhook_source_verification!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2066,7 +2034,6 @@ default_imp_for_new_connector_integration_frm_sale!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2096,7 +2063,6 @@ default_imp_for_new_connector_integration_frm_sale!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2142,7 +2108,6 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2172,7 +2137,6 @@ default_imp_for_new_connector_integration_frm_checkout!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2218,7 +2182,6 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2248,7 +2211,6 @@ default_imp_for_new_connector_integration_frm_transaction!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2294,7 +2256,6 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2324,7 +2285,6 @@ default_imp_for_new_connector_integration_frm_fulfillment!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2370,7 +2330,6 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2400,7 +2359,6 @@ default_imp_for_new_connector_integration_frm_record_return!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
@@ -2443,7 +2401,6 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2473,7 +2430,6 @@ default_imp_for_new_connector_integration_revoking_mandates!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Trustpay,
diff --git a/crates/router/src/core/payments/flows.rs b/crates/router/src/core/payments/flows.rs
index 79ed9e25259..677c7968f45 100644
--- a/crates/router/src/core/payments/flows.rs
+++ b/crates/router/src/core/payments/flows.rs
@@ -211,7 +211,6 @@ default_imp_for_complete_authorize!(
     connector::Boku,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Gocardless,
@@ -235,7 +234,6 @@ default_imp_for_complete_authorize!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -287,7 +285,6 @@ default_imp_for_webhook_source_verification!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -318,7 +315,6 @@ default_imp_for_webhook_source_verification!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -372,7 +368,6 @@ default_imp_for_create_customer!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -403,7 +398,6 @@ default_imp_for_create_customer!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Wellsfargo,
@@ -453,7 +447,6 @@ default_imp_for_connector_redirect_response!(
     connector::Boku,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Gocardless,
@@ -478,7 +471,6 @@ default_imp_for_connector_redirect_response!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Wellsfargo,
     connector::Wellsfargopayout,
@@ -618,7 +610,6 @@ default_imp_for_accept_dispute!(
     connector::Braintree,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -650,7 +641,6 @@ default_imp_for_accept_dispute!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -724,7 +714,6 @@ default_imp_for_file_upload!(
     connector::Braintree,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -755,7 +744,6 @@ default_imp_for_file_upload!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Opennode,
@@ -807,7 +795,6 @@ default_imp_for_submit_evidence!(
     connector::Braintree,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -838,7 +825,6 @@ default_imp_for_submit_evidence!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Trustpay,
     connector::Opennode,
@@ -890,7 +876,6 @@ default_imp_for_defend_dispute!(
     connector::Braintree,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Globalpay,
     connector::Forte,
@@ -921,7 +906,6 @@ default_imp_for_defend_dispute!(
     connector::Riskified,
     connector::Shift4,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -988,7 +972,6 @@ default_imp_for_pre_processing_steps!(
     connector::Braintree,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Iatapay,
     connector::Itaubank,
@@ -1014,7 +997,6 @@ default_imp_for_pre_processing_steps!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Wellsfargo,
     connector::Wellsfargopayout,
@@ -1059,7 +1041,6 @@ default_imp_for_post_processing_steps!(
     connector::Braintree,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Iatapay,
     connector::Itaubank,
@@ -1083,7 +1064,6 @@ default_imp_for_post_processing_steps!(
     connector::Rapyd,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Threedsecureio,
     connector::Wellsfargo,
     connector::Wellsfargopayout,
@@ -1218,7 +1198,6 @@ default_imp_for_payouts_create!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1247,7 +1226,6 @@ default_imp_for_payouts_create!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1301,7 +1279,6 @@ default_imp_for_payouts_retrieve!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1332,7 +1309,6 @@ default_imp_for_payouts_retrieve!(
     connector::Riskified,
     connector::Signifyd,
     connector::Stripe,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1389,7 +1365,6 @@ default_imp_for_payouts_eligibility!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1419,7 +1394,6 @@ default_imp_for_payouts_eligibility!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -1471,7 +1445,6 @@ default_imp_for_payouts_fulfill!(
     connector::Braintree,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1499,7 +1472,6 @@ default_imp_for_payouts_fulfill!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1552,7 +1524,6 @@ default_imp_for_payouts_cancel!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1582,7 +1553,6 @@ default_imp_for_payouts_cancel!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1636,7 +1606,6 @@ default_imp_for_payouts_quote!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1666,7 +1635,6 @@ default_imp_for_payouts_quote!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -1721,7 +1689,6 @@ default_imp_for_payouts_recipient!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Forte,
     connector::Globalpay,
     connector::Gocardless,
@@ -1751,7 +1718,6 @@ default_imp_for_payouts_recipient!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1808,7 +1774,6 @@ default_imp_for_payouts_recipient_account!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1839,7 +1804,6 @@ default_imp_for_payouts_recipient_account!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Shift4,
     connector::Threedsecureio,
     connector::Trustpay,
@@ -1893,7 +1857,6 @@ default_imp_for_approve!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -1924,7 +1887,6 @@ default_imp_for_approve!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -1979,7 +1941,6 @@ default_imp_for_reject!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2010,7 +1971,6 @@ default_imp_for_reject!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2155,7 +2115,6 @@ default_imp_for_frm_sale!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2184,7 +2143,6 @@ default_imp_for_frm_sale!(
     connector::Prophetpay,
     connector::Rapyd,
     connector::Razorpay,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2241,7 +2199,6 @@ default_imp_for_frm_checkout!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2270,7 +2227,6 @@ default_imp_for_frm_checkout!(
     connector::Prophetpay,
     connector::Rapyd,
     connector::Razorpay,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2327,7 +2283,6 @@ default_imp_for_frm_transaction!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2356,7 +2311,6 @@ default_imp_for_frm_transaction!(
     connector::Prophetpay,
     connector::Rapyd,
     connector::Razorpay,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2413,7 +2367,6 @@ default_imp_for_frm_fulfillment!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2442,7 +2395,6 @@ default_imp_for_frm_fulfillment!(
     connector::Prophetpay,
     connector::Rapyd,
     connector::Razorpay,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2499,7 +2451,6 @@ default_imp_for_frm_record_return!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2528,7 +2479,6 @@ default_imp_for_frm_record_return!(
     connector::Prophetpay,
     connector::Rapyd,
     connector::Razorpay,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2582,7 +2532,6 @@ default_imp_for_incremental_authorization!(
     connector::Braintree,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2613,7 +2562,6 @@ default_imp_for_incremental_authorization!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2664,7 +2612,6 @@ default_imp_for_revoking_mandates!(
     connector::Braintree,
     connector::Checkout,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2694,7 +2641,6 @@ default_imp_for_revoking_mandates!(
     connector::Razorpay,
     connector::Riskified,
     connector::Signifyd,
-    connector::Square,
     connector::Stripe,
     connector::Shift4,
     connector::Threedsecureio,
@@ -2906,7 +2852,6 @@ default_imp_for_authorize_session_token!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -2988,7 +2933,6 @@ default_imp_for_calculate_tax!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -3018,7 +2962,6 @@ default_imp_for_calculate_tax!(
     connector::Rapyd,
     connector::Razorpay,
     connector::Riskified,
-    connector::Square,
     connector::Signifyd,
     connector::Stripe,
     connector::Shift4,
@@ -3072,7 +3015,6 @@ default_imp_for_session_update!(
     connector::Checkout,
     connector::Cybersource,
     connector::Datatrans,
-    connector::Dlocal,
     connector::Ebanx,
     connector::Forte,
     connector::Globalpay,
@@ -3102,7 +3044,6 @@ default_imp_for_session_update!(
     connector::Rapyd,
     connector::Razorpay,
     connector::Riskified,
-    connector::Square,
     connector::Signifyd,
     connector::Stripe,
     connector::Shift4,

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

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

## Description
Move conector Dlocal and Square from router to hyperswitch_connector crate

### 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?
1. Create Merchant Account
```
curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data-raw '{
  "merchant_id": "merchant_1727684785",
  "locker_id": "m0010",
  "merchant_name": "NewAge Retailer",
  "merchant_details": {
    "primary_contact_person": "John Test",
    "primary_email": "JohnTest@test.com",
    "primary_phone": "sunt laborum",
    "secondary_contact_person": "John Test2",
    "secondary_email": "JohnTest2@test.com",
    "secondary_phone": "cillum do dolor id",
    "website": "https://www.example.com",
    "about_business": "Online Retail with a wide selection of organic products for North America",
    "address": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "US"
    }
  },
  "return_url": "https://google.com/success",
  "webhook_details": {
    "webhook_version": "1.0.1",
    "webhook_username": "ekart_retail",
    "webhook_password": "password_ekart@123",
    "payment_created_enabled": true,
    "payment_succeeded_enabled": true,
    "payment_failed_enabled": true
  },
  "sub_merchants_enabled": false,
  "metadata": {
    "city": "NY",
    "unit": "245"
  },
  "primary_business_details": [
    {
      "country": "US",
      "business": "food"
    }
  ]
}'
```

2. Create API Key
```
curl --location 'http://localhost:8080/api_keys/merchant_1727684450' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
  "name": "API Key 1",
  "description": null,
  "expiration": "2038-01-19T03:14:08.000Z"
}'
```

3. Create Payment Connector for Dlocal
```
curl --location 'http://localhost:8080/account/merchant_1727684450/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
    "connector_type": "payment_processor",
     "connector_name": "dlocal",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": "_____",
        "key1": "_____",
        "api_secret" : "_____"

    },
    "test_mode": false,
    "disabled": false,
     "payment_methods_enabled": [
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "credit",
                    "card_networks": [
                        "Visa",
                        "Mastercard"
                    ],
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "debit",
                    "card_networks": [
                        "Visa",
                        "Mastercard"
                    ],
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "metadata": {
        "city": "NY",
        "unit": "245",
        "brand_id": "001",
        "destination_account_number": "5001000001223369"
    },
    "business_country": "US",
    "business_label": "food"
}'
```

4. Payment Create
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: ______' \
--data-raw '{
    "amount": 60000,
    "currency": "BRL",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2024-09-10T10:11:12Z",
    "amount_to_capture": 60000,
    "customer_id": "jsdhfgbds",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_type": "debit",
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "02",
            "card_exp_year": "37",
            "card_holder_name": "joseph Doe",
            "card_cvc": "999"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "BR",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "BR",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": "dlocal"
    }
}'
```

5. Response
```
{
    "payment_id": "pay_2cRAibQolK8jdZr1Teai",
    "merchant_id": "merchant_1727684450",
    "status": "succeeded",
    "amount": 60000,
    "net_amount": 60000,
    "amount_capturable": 0,
    "amount_received": 60000,
    "connector": "dlocal",
    "client_secret": "pay_2cRAibQolK8jdZr1Teai_secret_tINYaNt6LoYfuq2wD2Am",
    "created": "2024-09-30T08:20:54.759Z",
    "currency": "BRL",
    "customer_id": "jsdhfgbds",
    "customer": {
        "id": "jsdhfgbds",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "02",
            "card_exp_year": "37",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "BR",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "BR",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "debit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "jsdhfgbds",
        "created_at": 1727684454,
        "expires": 1727688054,
        "secret": "epk_ed5899814cc94112940d95f020cdb9aa"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "T-413100-f19a6e86-e95d-4e9e-bb5c-e27371ae8aa0",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_2cRAibQolK8jdZr1Teai_1",
    "payment_link": null,
    "profile_id": "pro_9mhY0ulaJuedDbQRGBDi",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_x0MV7McpNzabX1vANWza",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-30T08:35:54.759Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-30T08:20:56.357Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null
}
```

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

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