Bug: [REFCTOR]: Move CustomerAcceptance type to `common_types`



`CustomerAcceptance` is currently defined separately in `api_models` and `hyperswitch_domain_models`. These types are exactly the same, so they can be moved to `common_types`.


Additionally, in V2, we can use this strict type in `diesel_models` as well, instead of having a `SecretSerdeValue`
diff --git a/Cargo.lock b/Cargo.lock
index 42add100ade..d6037be06fd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1794,8 +1794,10 @@ dependencies = [
  "common_utils",
  "diesel",
  "euclid",
+ "masking",
  "serde",
  "serde_json",
+ "time",
  "utoipa",
 ]
 
diff --git a/crates/api_models/src/mandates.rs b/crates/api_models/src/mandates.rs
index 2d61a630988..67852326642 100644
--- a/crates/api_models/src/mandates.rs
+++ b/crates/api_models/src/mandates.rs
@@ -1,9 +1,10 @@
+use common_types::payments as common_payments_types;
 use masking::Secret;
 use serde::{Deserialize, Serialize};
 use time::PrimitiveDateTime;
 use utoipa::ToSchema;
 
-use crate::{enums as api_enums, payments};
+use crate::enums as api_enums;
 
 #[derive(Default, Debug, Deserialize, Serialize)]
 pub struct MandateId {
@@ -42,7 +43,7 @@ pub struct MandateResponse {
     pub card: Option<MandateCardDetails>,
     /// Details about the customer’s acceptance
     #[schema(value_type = Option<CustomerAcceptance>)]
-    pub customer_acceptance: Option<payments::CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
 }
 
 #[derive(Default, Debug, Deserialize, Serialize, ToSchema, Clone)]
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index 648df7b05a5..c251d78af5d 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -10,6 +10,7 @@ use cards::CardNumber;
 #[cfg(feature = "v2")]
 use common_enums::enums::PaymentConnectorTransmission;
 use common_enums::ProductType;
+use common_types::payments as common_payments_types;
 #[cfg(feature = "v1")]
 use common_types::primitive_wrappers::{
     ExtendedAuthorizationAppliedBool, RequestExtendedAuthorizationBool,
@@ -1045,7 +1046,7 @@ pub struct PaymentsRequest {
 
     /// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
     #[schema(value_type = Option<CustomerAcceptance>)]
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
 
     /// A unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data
     #[schema(max_length = 64, example = "mandate_iwer89rnjef349dni3")]
@@ -1876,7 +1877,8 @@ pub struct MandateData {
     /// A way to update the mandate's payment method details
     pub update_mandate_id: Option<String>,
     /// A consent from the customer to store the payment method
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    #[schema(value_type = Option<CustomerAcceptance>)]
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     /// A way to select the type of mandate used
     pub mandate_type: Option<MandateType>,
 }
@@ -1925,40 +1927,6 @@ impl Default for MandateType {
     }
 }
 
-/// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
-#[derive(Default, Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
-#[serde(deny_unknown_fields)]
-pub struct CustomerAcceptance {
-    /// Type of acceptance provided by the
-    #[schema(example = "online")]
-    pub acceptance_type: AcceptanceType,
-    /// Specifying when the customer acceptance was provided
-    #[schema(example = "2022-09-10T10:11:12Z")]
-    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
-    pub accepted_at: Option<PrimitiveDateTime>,
-    /// Information required for online mandate generation
-    pub online: Option<OnlineMandate>,
-}
-
-#[derive(Default, Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq, Clone, ToSchema)]
-#[serde(rename_all = "lowercase")]
-/// This is used to indicate if the mandate was accepted online or offline
-pub enum AcceptanceType {
-    Online,
-    #[default]
-    Offline,
-}
-
-#[derive(Default, Eq, PartialEq, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
-#[serde(deny_unknown_fields)]
-pub struct OnlineMandate {
-    /// Ip address of the customer machine from which the mandate was created
-    #[schema(value_type = String, example = "123.32.25.123")]
-    pub ip_address: Option<Secret<String, pii::IpAddress>>,
-    /// The user-agent of the customer's browser
-    pub user_agent: String,
-}
-
 #[derive(Default, Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
 pub struct Card {
     /// The card number
@@ -5370,7 +5338,7 @@ pub struct PaymentsConfirmIntentRequest {
 
     /// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
     #[schema(value_type = Option<CustomerAcceptance>)]
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
 
     /// Additional details required by 3DS 2.0
     #[schema(value_type = Option<BrowserInformation>)]
@@ -5542,7 +5510,7 @@ pub struct PaymentsRequest {
 
     /// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
     #[schema(value_type = Option<CustomerAcceptance>)]
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
 
     /// Additional details required by 3DS 2.0
     #[schema(value_type = Option<BrowserInformation>)]
diff --git a/crates/common_types/Cargo.toml b/crates/common_types/Cargo.toml
index 0734a8860ae..7aec0314706 100644
--- a/crates/common_types/Cargo.toml
+++ b/crates/common_types/Cargo.toml
@@ -17,10 +17,12 @@ diesel = "2.2.10"
 serde = { version = "1.0.219", features = ["derive"] }
 serde_json = "1.0.140"
 utoipa = { version = "4.2.3", features = ["preserve_order", "preserve_path_order"] }
+time = { version = "0.3.35", features = ["serde", "serde-well-known", "std"] }
 
 common_enums = { version = "0.1.0", path = "../common_enums" }
 common_utils = { version = "0.1.0", path = "../common_utils"}
 euclid = { version = "0.1.0", path = "../euclid" }
+masking = { version = "0.1.0", path = "../masking" }
 
 [lints]
 workspace = true
diff --git a/crates/common_types/src/payments.rs b/crates/common_types/src/payments.rs
index 1a73e2f9787..e0ea52abc79 100644
--- a/crates/common_types/src/payments.rs
+++ b/crates/common_types/src/payments.rs
@@ -3,13 +3,15 @@
 use std::collections::HashMap;
 
 use common_enums::enums;
-use common_utils::{errors, events, impl_to_sql_from_sql_json, types::MinorUnit};
+use common_utils::{date_time, errors, events, impl_to_sql_from_sql_json, pii, types::MinorUnit};
 use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
 use euclid::frontend::{
     ast::Program,
     dir::{DirKeyKind, EuclidDirFilter},
 };
+use masking::{PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
+use time::PrimitiveDateTime;
 use utoipa::ToSchema;
 
 use crate::domain::{AdyenSplitData, XenditSplitSubMerchantData};
@@ -100,6 +102,92 @@ impl EuclidDirFilter for ConditionalConfigs {
 
 impl_to_sql_from_sql_json!(ConditionalConfigs);
 
+/// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
+#[derive(
+    Default,
+    Eq,
+    PartialEq,
+    Debug,
+    serde::Deserialize,
+    serde::Serialize,
+    Clone,
+    AsExpression,
+    ToSchema,
+)]
+#[serde(deny_unknown_fields)]
+#[diesel(sql_type = Jsonb)]
+pub struct CustomerAcceptance {
+    /// Type of acceptance provided by the
+    #[schema(example = "online")]
+    pub acceptance_type: AcceptanceType,
+    /// Specifying when the customer acceptance was provided
+    #[schema(example = "2022-09-10T10:11:12Z")]
+    #[serde(default, with = "common_utils::custom_serde::iso8601::option")]
+    pub accepted_at: Option<PrimitiveDateTime>,
+    /// Information required for online mandate generation
+    pub online: Option<OnlineMandate>,
+}
+
+impl_to_sql_from_sql_json!(CustomerAcceptance);
+
+impl CustomerAcceptance {
+    /// Get the IP address
+    pub fn get_ip_address(&self) -> Option<String> {
+        self.online
+            .as_ref()
+            .and_then(|data| data.ip_address.as_ref().map(|ip| ip.peek().to_owned()))
+    }
+
+    /// Get the User Agent
+    pub fn get_user_agent(&self) -> Option<String> {
+        self.online.as_ref().map(|data| data.user_agent.clone())
+    }
+
+    /// Get when the customer acceptance was provided
+    pub fn get_accepted_at(&self) -> PrimitiveDateTime {
+        self.accepted_at.unwrap_or_else(date_time::now)
+    }
+}
+
+impl masking::SerializableSecret for CustomerAcceptance {}
+
+#[derive(
+    Default, Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq, Clone, Copy, ToSchema,
+)]
+#[serde(rename_all = "lowercase")]
+/// This is used to indicate if the mandate was accepted online or offline
+pub enum AcceptanceType {
+    /// Online
+    Online,
+    /// Offline
+    #[default]
+    Offline,
+}
+
+#[derive(
+    Default,
+    Eq,
+    PartialEq,
+    Debug,
+    serde::Deserialize,
+    serde::Serialize,
+    AsExpression,
+    Clone,
+    ToSchema,
+)]
+#[serde(deny_unknown_fields)]
+/// Details of online mandate
+#[diesel(sql_type = Jsonb)]
+pub struct OnlineMandate {
+    /// Ip address of the customer machine from which the mandate was created
+    #[schema(value_type = String, example = "123.32.25.123")]
+    pub ip_address: Option<Secret<String, pii::IpAddress>>,
+    /// The user-agent of the customer's browser
+    pub user_agent: String,
+}
+
+impl_to_sql_from_sql_json!(OnlineMandate);
+
 #[derive(Serialize, Deserialize, Debug, Clone, FromSqlRow, AsExpression, ToSchema)]
 #[diesel(sql_type = Jsonb)]
 /// DecisionManagerRecord
diff --git a/crates/diesel_models/src/payment_attempt.rs b/crates/diesel_models/src/payment_attempt.rs
index 473502ad746..9a2e76b5fd3 100644
--- a/crates/diesel_models/src/payment_attempt.rs
+++ b/crates/diesel_models/src/payment_attempt.rs
@@ -1,3 +1,5 @@
+#[cfg(feature = "v2")]
+use common_types::payments as common_payments_types;
 use common_types::primitive_wrappers::{
     ExtendedAuthorizationAppliedBool, RequestExtendedAuthorizationBool,
 };
@@ -78,7 +80,7 @@ pub struct PaymentAttempt {
     pub fingerprint_id: Option<String>,
     pub client_source: Option<String>,
     pub client_version: Option<String>,
-    pub customer_acceptance: Option<pii::SecretSerdeValue>,
+    pub customer_acceptance: Option<masking::Secret<common_payments_types::CustomerAcceptance>>,
     pub profile_id: id_type::ProfileId,
     pub organization_id: id_type::OrganizationId,
     pub card_network: Option<String>,
@@ -318,7 +320,7 @@ pub struct PaymentAttemptNew {
     pub payment_method_billing_address: Option<common_utils::encryption::Encryption>,
     pub client_source: Option<String>,
     pub client_version: Option<String>,
-    pub customer_acceptance: Option<pii::SecretSerdeValue>,
+    pub customer_acceptance: Option<masking::Secret<common_payments_types::CustomerAcceptance>>,
     pub profile_id: id_type::ProfileId,
     pub organization_id: id_type::OrganizationId,
     pub card_network: Option<String>,
diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
index 353d941ca6c..b6f263373bb 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs
@@ -2,7 +2,7 @@ use std::{collections::HashMap, ops::Deref};
 
 use api_models::{self, enums as api_enums, payments};
 use common_enums::{enums, AttemptStatus, PaymentChargeType, StripeChargeType};
-use common_types::payments::SplitPaymentsRequest;
+use common_types::payments::{AcceptanceType, SplitPaymentsRequest};
 use common_utils::{
     collect_missing_value_keys,
     errors::CustomResult,
@@ -13,7 +13,6 @@ use common_utils::{
 };
 use error_stack::ResultExt;
 use hyperswitch_domain_models::{
-    mandates::AcceptanceType,
     payment_method_data::{
         self, BankRedirectData, Card, CardRedirectData, GiftCardData, GooglePayWalletData,
         PayLaterData, PaymentMethodData, VoucherData, WalletData,
diff --git a/crates/hyperswitch_domain_models/src/mandates.rs b/crates/hyperswitch_domain_models/src/mandates.rs
index 5e5b9e18287..264ed0c6d81 100644
--- a/crates/hyperswitch_domain_models/src/mandates.rs
+++ b/crates/hyperswitch_domain_models/src/mandates.rs
@@ -1,11 +1,10 @@
 use std::collections::HashMap;
 
 use api_models::payments::{
-    AcceptanceType as ApiAcceptanceType, CustomerAcceptance as ApiCustomerAcceptance,
     MandateAmountData as ApiMandateAmountData, MandateData as ApiMandateData, MandateType,
-    OnlineMandate as ApiOnlineMandate,
 };
 use common_enums::Currency;
+use common_types::payments as common_payments_types;
 use common_utils::{
     date_time,
     errors::{CustomResult, ParsingError},
@@ -13,7 +12,6 @@ use common_utils::{
     types::MinorUnit,
 };
 use error_stack::ResultExt;
-use masking::{PeekInterface, Secret};
 use time::PrimitiveDateTime;
 
 #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
@@ -61,39 +59,11 @@ pub struct MandateData {
     /// A way to update the mandate's payment method details
     pub update_mandate_id: Option<String>,
     /// A consent from the customer to store the payment method
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     /// A way to select the type of mandate used
     pub mandate_type: Option<MandateDataType>,
 }
 
-#[derive(Default, Eq, PartialEq, Debug, Clone, serde::Deserialize, serde::Serialize)]
-pub struct CustomerAcceptance {
-    /// Type of acceptance provided by the
-    pub acceptance_type: AcceptanceType,
-    /// Specifying when the customer acceptance was provided
-    #[serde(with = "common_utils::custom_serde::iso8601::option")]
-    pub accepted_at: Option<PrimitiveDateTime>,
-    /// Information required for online mandate generation
-    pub online: Option<OnlineMandate>,
-}
-
-#[derive(Default, Debug, PartialEq, Eq, Clone, serde::Deserialize, serde::Serialize)]
-#[serde(rename_all = "lowercase")]
-pub enum AcceptanceType {
-    Online,
-    #[default]
-    Offline,
-}
-
-#[derive(Default, Eq, PartialEq, Debug, Clone, serde::Deserialize, serde::Serialize)]
-pub struct OnlineMandate {
-    /// Ip address of the customer machine from which the mandate was created
-    #[serde(skip_deserializing)]
-    pub ip_address: Option<Secret<String, pii::IpAddress>>,
-    /// The user-agent of the customer's browser
-    pub user_agent: String,
-}
-
 impl From<MandateType> for MandateDataType {
     fn from(mandate_type: MandateType) -> Self {
         match mandate_type {
@@ -168,83 +138,13 @@ impl From<diesel_models::enums::MandateAmountData> for MandateAmountData {
 impl From<ApiMandateData> for MandateData {
     fn from(value: ApiMandateData) -> Self {
         Self {
-            customer_acceptance: value.customer_acceptance.map(|d| d.into()),
+            customer_acceptance: value.customer_acceptance,
             mandate_type: value.mandate_type.map(|d| d.into()),
             update_mandate_id: value.update_mandate_id,
         }
     }
 }
 
-impl From<ApiCustomerAcceptance> for CustomerAcceptance {
-    fn from(value: ApiCustomerAcceptance) -> Self {
-        Self {
-            acceptance_type: value.acceptance_type.into(),
-            accepted_at: value.accepted_at,
-            online: value.online.map(|d| d.into()),
-        }
-    }
-}
-
-impl From<CustomerAcceptance> for ApiCustomerAcceptance {
-    fn from(value: CustomerAcceptance) -> Self {
-        Self {
-            acceptance_type: value.acceptance_type.into(),
-            accepted_at: value.accepted_at,
-            online: value.online.map(|d| d.into()),
-        }
-    }
-}
-
-impl From<ApiAcceptanceType> for AcceptanceType {
-    fn from(value: ApiAcceptanceType) -> Self {
-        match value {
-            ApiAcceptanceType::Online => Self::Online,
-            ApiAcceptanceType::Offline => Self::Offline,
-        }
-    }
-}
-impl From<AcceptanceType> for ApiAcceptanceType {
-    fn from(value: AcceptanceType) -> Self {
-        match value {
-            AcceptanceType::Online => Self::Online,
-            AcceptanceType::Offline => Self::Offline,
-        }
-    }
-}
-
-impl From<ApiOnlineMandate> for OnlineMandate {
-    fn from(value: ApiOnlineMandate) -> Self {
-        Self {
-            ip_address: value.ip_address,
-            user_agent: value.user_agent,
-        }
-    }
-}
-impl From<OnlineMandate> for ApiOnlineMandate {
-    fn from(value: OnlineMandate) -> Self {
-        Self {
-            ip_address: value.ip_address,
-            user_agent: value.user_agent,
-        }
-    }
-}
-
-impl CustomerAcceptance {
-    pub fn get_ip_address(&self) -> Option<String> {
-        self.online
-            .as_ref()
-            .and_then(|data| data.ip_address.as_ref().map(|ip| ip.peek().to_owned()))
-    }
-
-    pub fn get_user_agent(&self) -> Option<String> {
-        self.online.as_ref().map(|data| data.user_agent.clone())
-    }
-
-    pub fn get_accepted_at(&self) -> PrimitiveDateTime {
-        self.accepted_at.unwrap_or_else(date_time::now)
-    }
-}
-
 impl MandateAmountData {
     pub fn get_end_date(
         &self,
diff --git a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
index cdc9103c86c..76434c50b4c 100644
--- a/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
+++ b/crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
@@ -1,6 +1,8 @@
 #[cfg(all(feature = "v1", feature = "olap"))]
 use api_models::enums::Connector;
 use common_enums as storage_enums;
+#[cfg(feature = "v2")]
+use common_types::payments as common_payments_types;
 #[cfg(feature = "v1")]
 use common_types::primitive_wrappers::{
     ExtendedAuthorizationAppliedBool, RequestExtendedAuthorizationBool,
@@ -440,8 +442,7 @@ pub struct PaymentAttempt {
     pub fingerprint_id: Option<String>,
     pub client_source: Option<String>,
     pub client_version: Option<String>,
-    // TODO: use a type here instead of value
-    pub customer_acceptance: Option<pii::SecretSerdeValue>,
+    pub customer_acceptance: Option<Secret<common_payments_types::CustomerAcceptance>>,
     /// The profile id for the payment attempt. This will be derived from payment intent.
     pub profile_id: id_type::ProfileId,
     /// The organization id for the payment attempt. This will be derived from payment intent.
@@ -590,14 +591,7 @@ impl PaymentAttempt {
             charges: None,
             client_source: None,
             client_version: None,
-            customer_acceptance: request
-                .customer_acceptance
-                .as_ref()
-                .map(Encode::encode_to_value)
-                .transpose()
-                .change_context(errors::api_error_response::ApiErrorResponse::InternalServerError)
-                .attach_printable("Unable to encode customer_acceptance")?
-                .map(Secret::new),
+            customer_acceptance: request.customer_acceptance.clone().map(Secret::new),
             profile_id: payment_intent.profile_id.clone(),
             organization_id: payment_intent.organization_id.clone(),
             payment_method_type: request.payment_method_type,
diff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rs
index 06932fb1265..e811b872c8c 100644
--- a/crates/hyperswitch_domain_models/src/router_request_types.rs
+++ b/crates/hyperswitch_domain_models/src/router_request_types.rs
@@ -3,6 +3,7 @@ pub mod fraud_check;
 pub mod revenue_recovery;
 pub mod unified_authentication_service;
 use api_models::payments::{AdditionalPaymentData, RequestSurchargeDetails};
+use common_types::payments as common_payments_types;
 use common_utils::{consts, errors, ext_traits::OptionExt, id_type, pii, types::MinorUnit};
 use diesel_models::{enums as storage_enums, types::OrderDetailsWithAmount};
 use error_stack::ResultExt;
@@ -46,7 +47,7 @@ pub struct PaymentsAuthorizeData {
     pub setup_future_usage: Option<storage_enums::FutureUsage>,
     pub mandate_id: Option<api_models::payments::MandateIds>,
     pub off_session: Option<bool>,
-    pub customer_acceptance: Option<mandates::CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     pub setup_mandate_details: Option<mandates::MandateData>,
     pub browser_info: Option<BrowserInformation>,
     pub order_details: Option<Vec<OrderDetailsWithAmount>>,
@@ -478,7 +479,7 @@ pub struct CompleteAuthorizeData {
     pub connector_meta: Option<serde_json::Value>,
     pub complete_authorize_url: Option<String>,
     pub metadata: Option<serde_json::Value>,
-    pub customer_acceptance: Option<mandates::CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     // New amount for amount frame work
     pub minor_amount: MinorUnit,
     pub merchant_account_id: Option<Secret<String>>,
@@ -969,7 +970,7 @@ pub struct SetupMandateRequestData {
     pub amount: Option<i64>,
     pub confirm: bool,
     pub statement_descriptor_suffix: Option<String>,
-    pub customer_acceptance: Option<mandates::CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     pub mandate_id: Option<api_models::payments::MandateIds>,
     pub setup_future_usage: Option<storage_enums::FutureUsage>,
     pub off_session: Option<bool>,
diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index 8ce212dd09b..e6c4ad8514f 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -230,6 +230,9 @@ Never share your secret api keys. Keep them guarded and secure.
         common_types::payments::StripeSplitPaymentRequest,
         common_types::domain::AdyenSplitData,
         common_types::domain::AdyenSplitItem,
+        common_types::payments::AcceptanceType,
+        common_types::payments::CustomerAcceptance,
+        common_types::payments::OnlineMandate,
         common_types::payments::XenditSplitRequest,
         common_types::payments::XenditSplitRoute,
         common_types::payments::XenditChargeResponseData,
@@ -446,13 +449,10 @@ Never share your secret api keys. Keep them guarded and secure.
         api_models::payments::PaymentMethodData,
         api_models::payments::PaymentMethodDataRequest,
         api_models::payments::MandateType,
-        api_models::payments::AcceptanceType,
         api_models::payments::MandateAmountData,
-        api_models::payments::OnlineMandate,
         api_models::payments::Card,
         api_models::payments::CardRedirectData,
         api_models::payments::CardToken,
-        api_models::payments::CustomerAcceptance,
         api_models::payments::PaymentsRequest,
         api_models::payments::PaymentsCreateRequest,
         api_models::payments::PaymentsUpdateRequest,
diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs
index d55d5829bd9..bdf63e1a1ee 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -181,6 +181,9 @@ Never share your secret api keys. Keep them guarded and secure.
         common_types::payments::SplitPaymentsRequest,
         common_types::payments::StripeSplitPaymentRequest,
         common_types::domain::AdyenSplitData,
+        common_types::payments::AcceptanceType,
+        common_types::payments::CustomerAcceptance,
+        common_types::payments::OnlineMandate,
         common_types::payments::XenditSplitRequest,
         common_types::payments::XenditSplitRoute,
         common_types::payments::XenditChargeResponseData,
@@ -412,13 +415,10 @@ Never share your secret api keys. Keep them guarded and secure.
         api_models::payments::PaymentMethodData,
         api_models::payments::PaymentMethodDataRequest,
         api_models::payments::MandateType,
-        api_models::payments::AcceptanceType,
         api_models::payments::MandateAmountData,
-        api_models::payments::OnlineMandate,
         api_models::payments::Card,
         api_models::payments::CardRedirectData,
         api_models::payments::CardToken,
-        api_models::payments::CustomerAcceptance,
         api_models::payments::ConnectorTokenDetails,
         api_models::payments::PaymentsRequest,
         api_models::payments::PaymentsResponse,
diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rs
index c2d2b33b28e..e8813fad688 100644
--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs
@@ -1,6 +1,7 @@
 use std::str::FromStr;
 
 use api_models::payments;
+use common_types::payments as common_payments_types;
 use common_utils::{
     crypto::Encryptable,
     date_time,
@@ -765,16 +766,15 @@ impl ForeignTryFrom<(Option<MandateData>, Option<String>)> for Option<payments::
                     },
                 ))),
             },
-            customer_acceptance: Some(payments::CustomerAcceptance {
-                acceptance_type: payments::AcceptanceType::Online,
+            customer_acceptance: Some(common_payments_types::CustomerAcceptance {
+                acceptance_type: common_payments_types::AcceptanceType::Online,
                 accepted_at: mandate.customer_acceptance.accepted_at,
-                online: mandate
-                    .customer_acceptance
-                    .online
-                    .map(|online| payments::OnlineMandate {
+                online: mandate.customer_acceptance.online.map(|online| {
+                    common_payments_types::OnlineMandate {
                         ip_address: Some(online.ip_address),
                         user_agent: online.user_agent,
-                    }),
+                    }
+                }),
             }),
             update_mandate_id: None,
         });
diff --git a/crates/router/src/core/mandate.rs b/crates/router/src/core/mandate.rs
index fc66f6489fe..1ff35bb5b7d 100644
--- a/crates/router/src/core/mandate.rs
+++ b/crates/router/src/core/mandate.rs
@@ -1,6 +1,7 @@
 pub mod helpers;
 pub mod utils;
 use api_models::payments;
+use common_types::payments as common_payments_types;
 use common_utils::{ext_traits::Encode, id_type};
 use diesel_models::enums as storage_enums;
 use error_stack::{report, ResultExt};
@@ -445,5 +446,5 @@ pub trait MandateBehaviour {
     fn get_setup_mandate_details(
         &self,
     ) -> Option<&hyperswitch_domain_models::mandates::MandateData>;
-    fn get_customer_acceptance(&self) -> Option<payments::CustomerAcceptance>;
+    fn get_customer_acceptance(&self) -> Option<common_payments_types::CustomerAcceptance>;
 }
diff --git a/crates/router/src/core/mandate/helpers.rs b/crates/router/src/core/mandate/helpers.rs
index 14a733d2ebc..298c737c6db 100644
--- a/crates/router/src/core/mandate/helpers.rs
+++ b/crates/router/src/core/mandate/helpers.rs
@@ -1,5 +1,6 @@
 use api_models::payments as api_payments;
 use common_enums::enums;
+use common_types::payments as common_payments_types;
 use common_utils::errors::CustomResult;
 use diesel_models::Mandate;
 use error_stack::ResultExt;
@@ -49,7 +50,7 @@ pub fn get_mandate_type(
     mandate_data: Option<api_payments::MandateData>,
     off_session: Option<bool>,
     setup_future_usage: Option<enums::FutureUsage>,
-    customer_acceptance: Option<api_payments::CustomerAcceptance>,
+    customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     token: Option<String>,
     payment_method: Option<enums::PaymentMethod>,
 ) -> CustomResult<Option<api::MandateTransactionType>, errors::ValidationError> {
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index e3fdf6e1cac..f10cabe4fbf 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -33,6 +33,7 @@ use api_models::{
     payments::{self as payments_api},
 };
 pub use common_enums::enums::CallConnectorAction;
+use common_types::payments as common_payments_types;
 use common_utils::{
     ext_traits::{AsyncExt, StringExt},
     id_type, pii,
@@ -51,7 +52,7 @@ use hyperswitch_domain_models::payments::{
 #[cfg(feature = "v2")]
 use hyperswitch_domain_models::router_response_types::RedirectForm;
 pub use hyperswitch_domain_models::{
-    mandates::{CustomerAcceptance, MandateData},
+    mandates::MandateData,
     payment_address::PaymentAddress,
     payments::{self as domain_payments, HeaderPayload},
     router_data::{PaymentMethodToken, RouterData},
@@ -5959,7 +5960,7 @@ where
     pub mandate_connector: Option<MandateConnectorDetails>,
     pub currency: storage_enums::Currency,
     pub setup_mandate: Option<MandateData>,
-    pub customer_acceptance: Option<CustomerAcceptance>,
+    pub customer_acceptance: Option<common_payments_types::CustomerAcceptance>,
     pub address: PaymentAddress,
     pub token: Option<String>,
     pub token_data: Option<storage::PaymentTokenData>,
diff --git a/crates/router/src/core/payments/flows.rs b/crates/router/src/core/payments/flows.rs
index fa951af010d..2b681202743 100644
--- a/crates/router/src/core/payments/flows.rs
+++ b/crates/router/src/core/payments/flows.rs
@@ -13,13 +13,12 @@ pub mod setup_mandate_flow;
 pub mod update_metadata_flow;
 
 use async_trait::async_trait;
+use common_types::payments::CustomerAcceptance;
 #[cfg(all(feature = "v2", feature = "revenue_recovery"))]
 use hyperswitch_domain_models::router_flow_types::{
     BillingConnectorInvoiceSync, BillingConnectorPaymentsSync, RecoveryRecordBack,
 };
-use hyperswitch_domain_models::{
-    mandates::CustomerAcceptance, router_request_types::PaymentsCaptureData,
-};
+use hyperswitch_domain_models::router_request_types::PaymentsCaptureData;
 
 use crate::{
     core::{
diff --git a/crates/router/src/core/payments/flows/authorize_flow.rs b/crates/router/src/core/payments/flows/authorize_flow.rs
index ee27620917b..318e69d7aca 100644
--- a/crates/router/src/core/payments/flows/authorize_flow.rs
+++ b/crates/router/src/core/payments/flows/authorize_flow.rs
@@ -1,5 +1,6 @@
 use async_trait::async_trait;
 use common_enums as enums;
+use common_types::payments as common_payments_types;
 use hyperswitch_domain_models::errors::api_error_response::ApiErrorResponse;
 #[cfg(feature = "v2")]
 use hyperswitch_domain_models::payments::PaymentConfirmData;
@@ -498,8 +499,8 @@ impl mandate::MandateBehaviour for types::PaymentsAuthorizeData {
     fn set_mandate_id(&mut self, new_mandate_id: Option<api_models::payments::MandateIds>) {
         self.mandate_id = new_mandate_id;
     }
-    fn get_customer_acceptance(&self) -> Option<api_models::payments::CustomerAcceptance> {
-        self.customer_acceptance.clone().map(From::from)
+    fn get_customer_acceptance(&self) -> Option<common_payments_types::CustomerAcceptance> {
+        self.customer_acceptance.clone()
     }
 }
 
diff --git a/crates/router/src/core/payments/flows/setup_mandate_flow.rs b/crates/router/src/core/payments/flows/setup_mandate_flow.rs
index d4722a05c8d..a5bcdb4f55e 100644
--- a/crates/router/src/core/payments/flows/setup_mandate_flow.rs
+++ b/crates/router/src/core/payments/flows/setup_mandate_flow.rs
@@ -1,4 +1,5 @@
 use async_trait::async_trait;
+use common_types::payments as common_payments_types;
 use router_env::logger;
 
 use super::{ConstructFlowSpecificData, Feature};
@@ -247,7 +248,7 @@ impl mandate::MandateBehaviour for types::SetupMandateRequestData {
     ) -> Option<&hyperswitch_domain_models::mandates::MandateData> {
         self.setup_mandate_details.as_ref()
     }
-    fn get_customer_acceptance(&self) -> Option<api_models::payments::CustomerAcceptance> {
-        self.customer_acceptance.clone().map(From::from)
+    fn get_customer_acceptance(&self) -> Option<common_payments_types::CustomerAcceptance> {
+        self.customer_acceptance.clone()
     }
 }
diff --git a/crates/router/src/core/payments/operations/payment_complete_authorize.rs b/crates/router/src/core/payments/operations/payment_complete_authorize.rs
index 199b4faf629..3ce888e6574 100644
--- a/crates/router/src/core/payments/operations/payment_complete_authorize.rs
+++ b/crates/router/src/core/payments/operations/payment_complete_authorize.rs
@@ -11,16 +11,13 @@ use crate::{
     core::{
         errors::{self, CustomResult, RouterResult, StorageErrorExt},
         mandate::helpers as m_helpers,
-        payments::{
-            self, helpers, operations, CustomerAcceptance, CustomerDetails, PaymentAddress,
-            PaymentData,
-        },
+        payments::{self, helpers, operations, CustomerDetails, PaymentAddress, PaymentData},
     },
     events::audit_events::{AuditEvent, AuditEventType},
     routes::{app::ReqState, SessionState},
     services,
     types::{
-        api::{self, PaymentIdTypeExt},
+        api::{self, CustomerAcceptance, PaymentIdTypeExt},
         domain,
         storage::{self, enums as storage_enums},
     },
@@ -139,11 +136,8 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
             payment_intent.customer_id.as_ref(),
         ))
         .await?;
-        let customer_acceptance: Option<CustomerAcceptance> = request
-            .customer_acceptance
-            .clone()
-            .map(From::from)
-            .or(payment_method_info
+        let customer_acceptance: Option<CustomerAcceptance> =
+            request.customer_acceptance.clone().or(payment_method_info
                 .clone()
                 .map(|pm| {
                     pm.customer_acceptance
diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rs
index 944f2852b18..4ee639f5f42 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -788,7 +788,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
             mandate_id: mandate_id.clone(),
             mandate_connector,
             setup_mandate,
-            customer_acceptance: customer_acceptance.map(From::from),
+            customer_acceptance,
             token,
             address: unified_address,
             token_data,
diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rs
index 68f1b9d9c15..bc88a4e0019 100644
--- a/crates/router/src/core/payments/operations/payment_create.rs
+++ b/crates/router/src/core/payments/operations/payment_create.rs
@@ -5,6 +5,7 @@ use api_models::{
     payments::GetAddressFromPaymentMethodData,
 };
 use async_trait::async_trait;
+use common_types::payments as common_payments_types;
 use common_utils::{
     ext_traits::{AsyncExt, Encode, ValueExt},
     type_name,
@@ -143,7 +144,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
                 id: profile_id.get_string_repr().to_owned(),
             })?
         };
-        let customer_acceptance = request.customer_acceptance.clone().map(From::from);
+        let customer_acceptance = request.customer_acceptance.clone();
 
         let recurring_details = request.recurring_details.clone();
 
@@ -1116,7 +1117,7 @@ impl PaymentCreate {
         payment_method_info: &Option<domain::PaymentMethod>,
         key_store: &domain::MerchantKeyStore,
         profile_id: common_utils::id_type::ProfileId,
-        customer_acceptance: &Option<payments::CustomerAcceptance>,
+        customer_acceptance: &Option<common_payments_types::CustomerAcceptance>,
         storage_scheme: enums::MerchantStorageScheme,
     ) -> RouterResult<(
         storage::PaymentAttemptNew,
diff --git a/crates/router/src/core/payments/operations/payment_update.rs b/crates/router/src/core/payments/operations/payment_update.rs
index eaae9514912..ca8bef361c0 100644
--- a/crates/router/src/core/payments/operations/payment_update.rs
+++ b/crates/router/src/core/payments/operations/payment_update.rs
@@ -129,7 +129,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
             .await
             .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;
 
-        let customer_acceptance = request.customer_acceptance.clone().map(From::from);
+        let customer_acceptance = request.customer_acceptance.clone();
         let recurring_details = request.recurring_details.clone();
 
         let mandate_type = m_helpers::get_mandate_type(
diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rs
index 2ab004cccd1..59acc0c7d7a 100644
--- a/crates/router/src/core/payments/routing.rs
+++ b/crates/router/src/core/payments/routing.rs
@@ -15,6 +15,7 @@ use api_models::{
     enums::{self as api_enums, CountryAlpha2},
     routing::ConnectorSelection,
 };
+use common_types::payments as common_payments_types;
 #[cfg(all(feature = "v1", feature = "dynamic_routing"))]
 use common_utils::ext_traits::AsyncExt;
 use diesel_models::enums as storage_enums;
@@ -208,10 +209,10 @@ pub fn make_dsl_input(
                     .customer_acceptance
                     .as_ref()
                     .map(|customer_accept| match customer_accept.acceptance_type {
-                        hyperswitch_domain_models::mandates::AcceptanceType::Online => {
+                        common_payments_types::AcceptanceType::Online => {
                             euclid_enums::MandateAcceptanceType::Online
                         }
-                        hyperswitch_domain_models::mandates::AcceptanceType::Offline => {
+                        common_payments_types::AcceptanceType::Offline => {
                             euclid_enums::MandateAcceptanceType::Offline
                         }
                     })
@@ -323,10 +324,10 @@ pub fn make_dsl_input(
                     .customer_acceptance
                     .as_ref()
                     .map(|cat| match cat.acceptance_type {
-                        hyperswitch_domain_models::mandates::AcceptanceType::Online => {
+                        common_payments_types::AcceptanceType::Online => {
                             euclid_enums::MandateAcceptanceType::Online
                         }
-                        hyperswitch_domain_models::mandates::AcceptanceType::Offline => {
+                        common_payments_types::AcceptanceType::Offline => {
                             euclid_enums::MandateAcceptanceType::Offline
                         }
                     })
diff --git a/crates/router/src/core/payments/routing/transformers.rs b/crates/router/src/core/payments/routing/transformers.rs
index 026807f3976..7e667732249 100644
--- a/crates/router/src/core/payments/routing/transformers.rs
+++ b/crates/router/src/core/payments/routing/transformers.rs
@@ -1,6 +1,7 @@
 use std::collections::HashMap;
 
 use api_models::{self, routing as routing_types};
+use common_types::payments as common_payments_types;
 use diesel_models::enums as storage_enums;
 use euclid::{enums as dsl_enums, frontend::ast as dsl_ast};
 use kgraph_utils::types;
@@ -31,11 +32,11 @@ impl ForeignFrom<storage_enums::CaptureMethod> for Option<dsl_enums::CaptureMeth
     }
 }
 
-impl ForeignFrom<api_models::payments::AcceptanceType> for dsl_enums::MandateAcceptanceType {
-    fn foreign_from(from: api_models::payments::AcceptanceType) -> Self {
+impl ForeignFrom<common_payments_types::AcceptanceType> for dsl_enums::MandateAcceptanceType {
+    fn foreign_from(from: common_payments_types::AcceptanceType) -> Self {
         match from {
-            api_models::payments::AcceptanceType::Online => Self::Online,
-            api_models::payments::AcceptanceType::Offline => Self::Offline,
+            common_payments_types::AcceptanceType::Online => Self::Online,
+            common_payments_types::AcceptanceType::Offline => Self::Offline,
         }
     }
 }
diff --git a/crates/router/src/core/payments/session_operation.rs b/crates/router/src/core/payments/session_operation.rs
index 3ed015309ea..d24845d4b59 100644
--- a/crates/router/src/core/payments/session_operation.rs
+++ b/crates/router/src/core/payments/session_operation.rs
@@ -4,7 +4,7 @@ pub use common_enums::enums::CallConnectorAction;
 use common_utils::id_type;
 use error_stack::ResultExt;
 pub use hyperswitch_domain_models::{
-    mandates::{CustomerAcceptance, MandateData},
+    mandates::MandateData,
     payment_address::PaymentAddress,
     payments::{HeaderPayload, PaymentIntentData},
     router_data::{PaymentMethodToken, RouterData},
diff --git a/crates/router/src/core/payments/tokenization.rs b/crates/router/src/core/payments/tokenization.rs
index f758066207f..b88476e19d8 100644
--- a/crates/router/src/core/payments/tokenization.rs
+++ b/crates/router/src/core/payments/tokenization.rs
@@ -168,7 +168,7 @@ where
             let customer_acceptance = save_payment_method_data
                 .request
                 .get_customer_acceptance()
-                .or(mandate_data_customer_acceptance.clone().map(From::from))
+                .or(mandate_data_customer_acceptance.clone())
                 .map(|ca| ca.encode_to_value())
                 .transpose()
                 .change_context(errors::ApiErrorResponse::InternalServerError)
diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs
index 65f526af2e3..959c201bc7a 100644
--- a/crates/router/src/core/payments/transformers.rs
+++ b/crates/router/src/core/payments/transformers.rs
@@ -2754,24 +2754,8 @@ where
         });
 
         let mandate_data = payment_data.get_setup_mandate().map(|d| api::MandateData {
-            customer_acceptance: d
-                .customer_acceptance
-                .clone()
-                .map(|d| api::CustomerAcceptance {
-                    acceptance_type: match d.acceptance_type {
-                        hyperswitch_domain_models::mandates::AcceptanceType::Online => {
-                            api::AcceptanceType::Online
-                        }
-                        hyperswitch_domain_models::mandates::AcceptanceType::Offline => {
-                            api::AcceptanceType::Offline
-                        }
-                    },
-                    accepted_at: d.accepted_at,
-                    online: d.online.map(|d| api::OnlineMandate {
-                        ip_address: d.ip_address,
-                        user_agent: d.user_agent,
-                    }),
-                }),
+            customer_acceptance: d.customer_acceptance.clone(),
+
             mandate_type: d.mandate_type.clone().map(|d| match d {
                 hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(i)) => {
                     api::MandateType::MultiUse(Some(api::MandateAmountData {
diff --git a/crates/router/src/core/payments/vault_session.rs b/crates/router/src/core/payments/vault_session.rs
index db77d6a9997..10b965786e5 100644
--- a/crates/router/src/core/payments/vault_session.rs
+++ b/crates/router/src/core/payments/vault_session.rs
@@ -4,7 +4,7 @@ pub use common_enums::enums::CallConnectorAction;
 use common_utils::id_type;
 use error_stack::ResultExt;
 pub use hyperswitch_domain_models::{
-    mandates::{CustomerAcceptance, MandateData},
+    mandates::MandateData,
     payment_address::PaymentAddress,
     payments::{HeaderPayload, PaymentIntentData},
     router_data::{PaymentMethodToken, RouterData},
diff --git a/crates/router/src/services/kafka/payment_attempt.rs b/crates/router/src/services/kafka/payment_attempt.rs
index f2c18ae9302..e7f55c51c0f 100644
--- a/crates/router/src/services/kafka/payment_attempt.rs
+++ b/crates/router/src/services/kafka/payment_attempt.rs
@@ -189,7 +189,7 @@ pub struct KafkaPaymentAttempt<'a> {
     pub authentication_connector: Option<String>,
     pub authentication_id: Option<String>,
     pub fingerprint_id: Option<String>,
-    pub customer_acceptance: Option<&'a masking::Secret<serde_json::Value>>,
+    pub customer_acceptance: Option<&'a masking::Secret<payments::CustomerAcceptance>>,
     pub shipping_cost: Option<MinorUnit>,
     pub order_tax_amount: Option<MinorUnit>,
     pub charges: Option<payments::ConnectorChargeResponseData>,
diff --git a/crates/router/src/services/kafka/payment_attempt_event.rs b/crates/router/src/services/kafka/payment_attempt_event.rs
index e06f4e014dd..4fd411dfcf5 100644
--- a/crates/router/src/services/kafka/payment_attempt_event.rs
+++ b/crates/router/src/services/kafka/payment_attempt_event.rs
@@ -191,7 +191,7 @@ pub struct KafkaPaymentAttemptEvent<'a> {
     pub authentication_connector: Option<String>,
     pub authentication_id: Option<String>,
     pub fingerprint_id: Option<String>,
-    pub customer_acceptance: Option<&'a masking::Secret<serde_json::Value>>,
+    pub customer_acceptance: Option<&'a masking::Secret<payments::CustomerAcceptance>>,
     pub shipping_cost: Option<MinorUnit>,
     pub order_tax_amount: Option<MinorUnit>,
     pub charges: Option<payments::ConnectorChargeResponseData>,
diff --git a/crates/router/src/types/api/payments.rs b/crates/router/src/types/api/payments.rs
index 725a821eba1..62738680b1b 100644
--- a/crates/router/src/types/api/payments.rs
+++ b/crates/router/src/types/api/payments.rs
@@ -12,26 +12,27 @@ pub use api_models::{
         ConnectorFeatureMatrixResponse, FeatureMatrixListResponse, FeatureMatrixRequest,
     },
     payments::{
-        AcceptanceType, Address, AddressDetails, Amount, AuthenticationForStartResponse, Card,
-        CryptoData, CustomerAcceptance, CustomerDetails, CustomerDetailsResponse,
-        HyperswitchVaultSessionDetails, MandateAmountData, MandateData, MandateTransactionType,
-        MandateType, MandateValidationFields, NextActionType, OnlineMandate,
-        OpenBankingSessionToken, PayLaterData, PaymentIdType, PaymentListConstraints,
-        PaymentListFilters, PaymentListFiltersV2, PaymentMethodData, PaymentMethodDataRequest,
-        PaymentMethodDataResponse, PaymentOp, PaymentRetrieveBody,
-        PaymentRetrieveBodyWithCredentials, PaymentsAggregateResponse, PaymentsApproveRequest,
-        PaymentsCancelRequest, PaymentsCaptureRequest, PaymentsCompleteAuthorizeRequest,
-        PaymentsDynamicTaxCalculationRequest, PaymentsDynamicTaxCalculationResponse,
-        PaymentsExternalAuthenticationRequest, PaymentsIncrementalAuthorizationRequest,
-        PaymentsManualUpdateRequest, PaymentsPostSessionTokensRequest,
-        PaymentsPostSessionTokensResponse, PaymentsRedirectRequest, PaymentsRedirectionResponse,
-        PaymentsRejectRequest, PaymentsRequest, PaymentsResponse, PaymentsResponseForm,
-        PaymentsRetrieveRequest, PaymentsSessionRequest, PaymentsSessionResponse,
-        PaymentsStartRequest, PaymentsUpdateMetadataRequest, PaymentsUpdateMetadataResponse,
-        PgRedirectResponse, PhoneDetails, RedirectionResponse, SessionToken, UrlDetails,
-        VaultSessionDetails, VerifyRequest, VerifyResponse, VgsSessionDetails, WalletData,
+        Address, AddressDetails, Amount, AuthenticationForStartResponse, Card, CryptoData,
+        CustomerDetails, CustomerDetailsResponse, HyperswitchVaultSessionDetails,
+        MandateAmountData, MandateData, MandateTransactionType, MandateType,
+        MandateValidationFields, NextActionType, OpenBankingSessionToken, PayLaterData,
+        PaymentIdType, PaymentListConstraints, PaymentListFilters, PaymentListFiltersV2,
+        PaymentMethodData, PaymentMethodDataRequest, PaymentMethodDataResponse, PaymentOp,
+        PaymentRetrieveBody, PaymentRetrieveBodyWithCredentials, PaymentsAggregateResponse,
+        PaymentsApproveRequest, PaymentsCancelRequest, PaymentsCaptureRequest,
+        PaymentsCompleteAuthorizeRequest, PaymentsDynamicTaxCalculationRequest,
+        PaymentsDynamicTaxCalculationResponse, PaymentsExternalAuthenticationRequest,
+        PaymentsIncrementalAuthorizationRequest, PaymentsManualUpdateRequest,
+        PaymentsPostSessionTokensRequest, PaymentsPostSessionTokensResponse,
+        PaymentsRedirectRequest, PaymentsRedirectionResponse, PaymentsRejectRequest,
+        PaymentsRequest, PaymentsResponse, PaymentsResponseForm, PaymentsRetrieveRequest,
+        PaymentsSessionRequest, PaymentsSessionResponse, PaymentsStartRequest,
+        PaymentsUpdateMetadataRequest, PaymentsUpdateMetadataResponse, PgRedirectResponse,
+        PhoneDetails, RedirectionResponse, SessionToken, UrlDetails, VaultSessionDetails,
+        VerifyRequest, VerifyResponse, VgsSessionDetails, WalletData,
     },
 };
+pub use common_types::payments::{AcceptanceType, CustomerAcceptance, OnlineMandate};
 use error_stack::ResultExt;
 pub use hyperswitch_domain_models::router_flow_types::payments::{
     Approve, Authorize, AuthorizeSessionToken, Balance, CalculateTax, Capture, CompleteAuthorize,
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index 2e64b10c284..3a1c89a0168 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -398,25 +398,7 @@ impl ForeignFrom<storage_enums::MandateAmountData> for payments::MandateAmountDa
 impl ForeignFrom<payments::MandateData> for hyperswitch_domain_models::mandates::MandateData {
     fn foreign_from(d: payments::MandateData) -> Self {
         Self {
-            customer_acceptance: d.customer_acceptance.map(|d| {
-                hyperswitch_domain_models::mandates::CustomerAcceptance {
-                    acceptance_type: match d.acceptance_type {
-                        payments::AcceptanceType::Online => {
-                            hyperswitch_domain_models::mandates::AcceptanceType::Online
-                        }
-                        payments::AcceptanceType::Offline => {
-                            hyperswitch_domain_models::mandates::AcceptanceType::Offline
-                        }
-                    },
-                    accepted_at: d.accepted_at,
-                    online: d
-                        .online
-                        .map(|d| hyperswitch_domain_models::mandates::OnlineMandate {
-                            ip_address: d.ip_address,
-                            user_agent: d.user_agent,
-                        }),
-                }
-            }),
+            customer_acceptance: d.customer_acceptance,
             mandate_type: d.mandate_type.map(|d| match d {
                 payments::MandateType::MultiUse(Some(i)) => {
                     hyperswitch_domain_models::mandates::MandateDataType::MultiUse(Some(

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

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

## Description
<!-- Describe your changes in detail -->
- Moved `CustomerAcceptance`, `AcceptanceType`, `OnlineMandate` to `common_types`
- Removed unnecessary conversions from the code
- Changed `payment_attempt` domain model and diesel model in v2 to use strict type

### 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).
-->
Closes #8298 

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

V1 Payments Create + Confirm

Request:

```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_YYBHtW1Ed85InL1L2TfWTZRUY7LCQxWotVQnOt5WjlMF6pMzEakhdpCzkj1AYaIa' \
--data-raw '{
    "amount": 180000,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "customer_id": "klarna",
    "capture_on": "2022-09-10T10:11:12Z",
    "authentication_type": "three_ds",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "return_url": "https://google.com",
    "statement_descriptor_name": "Juspay",
    "statement_descriptor_suffix": "Router",
    "setup_future_usage": "off_session",
    "business_country": "NL",
    "payment_method": "bank_redirect",
    "payment_method_type": "ideal",
    "payment_method_data": {
        "bank_redirect": {
            "ideal": {
                "country": "NL",
                "bank_name": "rabobank",
                "billing_details": {
                    "billing_name": "John Doe",
                    "email": "guest@example.com"
                }
            }
        }
    },
    "mandate_data": {
        "customer_acceptance": {
            "acceptance_type": "online",
            "accepted_at": "2022-09-10T10:11:12Z",
            "online": {
                "ip_address": "123.32.25.123",
                "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
            }
        },
        "mandate_type": {
            "single_use": {
                "amount": 6540,
                "currency": "EUR"
            }
        }
    },
    "metadata": {
        "order_details": {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "account_name": "transaction_processing"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "en-GB",
        "color_depth": 24,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true,
        "device_model": "Macintosh",
        "os_type": "macOS",
        "os_version": "10.15.7"
    }
}'
```

Response:

```json
{
    "payment_id": "pay_8LTgSVkhEmehgtu1eIuJ",
    "merchant_id": "merchant_1750233210",
    "status": "requires_customer_action",
    "amount": 180000,
    "net_amount": 180000,
    "shipping_cost": null,
    "amount_capturable": 180000,
    "amount_received": 0,
    "connector": "stripe",
    "client_secret": "pay_8LTgSVkhEmehgtu1eIuJ_secret_kALuNnmlbaNEzyQJkeP5",
    "created": "2025-06-18T07:53:54.544Z",
    "currency": "EUR",
    "customer_id": "klarna",
    "customer": {
        "id": "klarna",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": "man_dotLdCpwGUyqeE3bJhvj",
    "mandate_data": {
        "update_mandate_id": null,
        "customer_acceptance": {
            "acceptance_type": "online",
            "accepted_at": "2022-09-10T10:11:12.000Z",
            "online": {
                "ip_address": "123.32.25.123",
                "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
            }
        },
        "mandate_type": {
            "single_use": {
                "amount": 6540,
                "currency": "EUR",
                "start_date": null,
                "end_date": null,
                "metadata": null
            }
        }
    },
    ...
}
```

V2 Payments Confirm

Request:

```
curl --location 'http://localhost:8080/v2/payments/12345_pay_0197821d2b14713291386704613637ad/confirm-intent' \
--header 'x-profile-id: pro_GiWMG7VDcuWfIrlReElL' \
--header 'x-client-secret: cs_0197821d2b227603bd66e184fe946484' \
--header 'Authorization: publishable-key=pk_dev_c28ad8ebb32e4f9c8ac1a84f221ec3e4,client-secret=cs_0197821d2b227603bd66e184fe946484' \
--header 'Content-Type: application/json' \
--header 'api-key: pk_dev_c28ad8ebb32e4f9c8ac1a84f221ec3e4' \
--data '{
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "01",
            "card_exp_year": "26",
            "card_holder_name": "John Doe",
            "card_cvc": "123"
        }
    },
    "payment_method_type": "card",
    "payment_method_subtype": "card",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2022-09-10T10:11:12Z",
        "online": {
            "ip_address": "123.32.25.123",
            "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
        }
    }
    
}'
```

Response

```json
{
    "id": "12345_pay_0197821d2b14713291386704613637ad",
    "status": "succeeded",
    "amount": {
        "order_amount": 1000,
        "currency": "EUR",
        "shipping_cost": null,
        "order_tax_amount": null,
        "external_tax_calculation": "skip",
        "surcharge_calculation": "skip",
        "surcharge_amount": null,
        "tax_on_surcharge": null,
        "net_amount": 1000,
        "amount_to_capture": null,
        "amount_capturable": 0,
        "amount_captured": 1000
    },
    "customer_id": "12345_cus_0197821d18d77ee183767e2baec9dc80",
    "connector": "stripe",
    "created": "2025-06-18T08:17:19.135Z",
    "payment_method_data": {
        "billing": null
    },
    "payment_method_type": "card",
    "payment_method_subtype": "card",
    "connector_transaction_id": "pi_3RbHBPCuXDMKrYZe1NDYJ7TC",
    "connector_reference_id": null,
    "merchant_connector_id": "mca_uUOvCLZKNXK5LT8Ghr6T",
    "browser_info": null,
    "error": null,
    "shipping": null,
    "billing": null,
    "attempts": null,
    "connector_token_details": {
        "token": "pm_1RbHBPCuXDMKrYZeHuVQG7NM",
        "connector_token_request_reference_id": "lRI0TlJZTT5OjItgR2"
    },
    "payment_method_id": "12345_pm_0197821d37f47203a783e419365ff252",
    "next_action": null,
    "return_url": "https://google.com/success",
    "authentication_type": "no_three_ds",
    "authentication_type_applied": "no_three_ds",
    "is_iframe_redirection_enabled": 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
