Bug: [FEATURE] NTID Support + googlepay & applepay mandate support



### Feature Description


  -  Add NTID proxy support for nuvei. ( NOTE: Nuvei is not responding with NTID as of now hence we cant make ntid originated flow via nuvei to other connector. We are verifying NTID originated from other connector through nuvei. )
-     Extend mandate support for googlepay and applepay. ( decrypt flow only)


### Possible Implementation

Implement NTID AND wallet (GOOGLEPAY + APPLEPAY) MANDATES

### 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?

None
diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml
index 21ac732394f..482da1feca0 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -209,9 +209,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen" }
 card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 pay_later.klarna.connector_list = "adyen"
-wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.samsung_pay.connector_list = "cybersource"
-wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.paypal.connector_list = "adyen,novalnet"
 wallet.momo.connector_list = "adyen"
 wallet.kakao_pay.connector_list = "adyen"
@@ -258,7 +258,7 @@ card.credit = { connector_list = "cybersource" }            # Update Mandate sup
 card.debit = { connector_list = "cybersource" }             # Update Mandate supported payment method type and connector for card
 
 [network_transaction_id_supported_connectors]
-connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay,worldpayvantiv"
+connector_list = "adyen,archipel,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv"
 
 
 [payouts]
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index 853ec279f66..090520d1bab 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -209,9 +209,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen" }
 card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 pay_later.klarna.connector_list = "adyen"
-wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.samsung_pay.connector_list = "cybersource"
-wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.paypal.connector_list = "adyen,novalnet"
 wallet.momo.connector_list = "adyen"
 wallet.kakao_pay.connector_list = "adyen"
@@ -258,7 +258,7 @@ card.credit = { connector_list = "cybersource" }            # Update Mandate sup
 card.debit = { connector_list = "cybersource" }             # Update Mandate supported payment method type and connector for card
 
 [network_transaction_id_supported_connectors]
-connector_list = "adyen,archipel,stripe,worldpayvantiv"
+connector_list = "adyen,archipel,stripe,nuvei,worldpayvantiv"
 
 [payouts]
 payout_eligibility = true            # Defaults the eligibility of a payout method to true in case connector does not provide checks for payout eligibility
diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml
index dbd5e87e520..92ea9264cca 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -216,9 +216,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen" }
 card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,worldpay,nmi,bankofamerica,wellsfargo,bamboraapac,nexixpay,novalnet,paypal,archipel"
 pay_later.klarna.connector_list = "adyen"
-wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.apple_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.samsung_pay.connector_list = "cybersource"
-wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,authorizedotnet"
+wallet.google_pay.connector_list = "adyen,cybersource,bankofamerica,novalnet,nuvei,authorizedotnet"
 wallet.paypal.connector_list = "adyen,novalnet"
 wallet.momo.connector_list = "adyen"
 wallet.kakao_pay.connector_list = "adyen"
@@ -265,7 +265,7 @@ card.credit = { connector_list = "cybersource" }            # Update Mandate sup
 card.debit = { connector_list = "cybersource" }             # Update Mandate supported payment method type and connector for card
 
 [network_transaction_id_supported_connectors]
-connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay,worldpayvantiv"
+connector_list = "adyen,archipel,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv"
 
 
 [payouts]
diff --git a/config/development.toml b/config/development.toml
index 1215c323628..c8da369704b 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -1048,9 +1048,9 @@ bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" }
 card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload"
 card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit,moneris,archipel,worldpayvantiv,payload"
 pay_later.klarna.connector_list = "adyen,aci"
-wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv"
+wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nuvei,nexinets,novalnet,authorizedotnet,wellsfargo,worldpayvantiv"
 wallet.samsung_pay.connector_list = "cybersource"
-wallet.google_pay.connector_list = "stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,authorizedotnet,wellsfargo,worldpayvantiv"
+wallet.google_pay.connector_list = "stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,nuvei,authorizedotnet,wellsfargo,worldpayvantiv"
 wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal,authorizedotnet"
 wallet.momo.connector_list = "adyen"
 wallet.kakao_pay.connector_list = "adyen"
@@ -1073,7 +1073,7 @@ card.credit = { connector_list = "cybersource" }
 card.debit = { connector_list = "cybersource" }
 
 [network_transaction_id_supported_connectors]
-connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay,worldpayvantiv"
+connector_list = "adyen,archipel,cybersource,novalnet,nuvei,stripe,worldpay,worldpayvantiv"
 
 [connector_request_reference_id_config]
 merchant_ids_send_payment_id_as_connector_request_id = []
diff --git a/crates/hyperswitch_connectors/src/connectors/nuvei.rs b/crates/hyperswitch_connectors/src/connectors/nuvei.rs
index 8fda86c4512..259495d0545 100644
--- a/crates/hyperswitch_connectors/src/connectors/nuvei.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nuvei.rs
@@ -114,7 +114,12 @@ impl ConnectorValidation for Nuvei {
         pm_type: Option<enums::PaymentMethodType>,
         pm_data: PaymentMethodData,
     ) -> CustomResult<(), errors::ConnectorError> {
-        let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::Card]);
+        let mandate_supported_pmd = std::collections::HashSet::from([
+            PaymentMethodDataType::Card,
+            PaymentMethodDataType::GooglePay,
+            PaymentMethodDataType::ApplePay,
+            PaymentMethodDataType::NetworkTransactionIdAndCardDetails,
+        ]);
         is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())
     }
 }
@@ -709,7 +714,9 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
             .response
             .parse_struct("NuveiPaymentsResponse")
             .switch()?;
+
         event_builder.map(|i| i.set_response_body(&response));
+
         router_env::logger::info!(connector_response=?response);
         RouterData::try_from(ResponseRouterData {
             response,
@@ -1286,7 +1293,7 @@ static NUVEI_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = Lazy
         enums::PaymentMethod::Wallet,
         enums::PaymentMethodType::ApplePay,
         PaymentMethodDetails {
-            mandates: enums::FeatureStatus::NotSupported,
+            mandates: enums::FeatureStatus::Supported,
             refunds: enums::FeatureStatus::Supported,
             supported_capture_methods: supported_capture_methods.clone(),
             specific_features: None,
@@ -1296,7 +1303,7 @@ static NUVEI_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = Lazy
         enums::PaymentMethod::Wallet,
         enums::PaymentMethodType::GooglePay,
         PaymentMethodDetails {
-            mandates: enums::FeatureStatus::NotSupported,
+            mandates: enums::FeatureStatus::Supported,
             refunds: enums::FeatureStatus::Supported,
             supported_capture_methods: supported_capture_methods.clone(),
             specific_features: None,
diff --git a/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs b/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
index fa9c3e4d499..e260934852e 100644
--- a/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
@@ -1,4 +1,4 @@
-use common_enums::{enums, CaptureMethod, FutureUsage, PaymentChannel};
+use common_enums::{enums, CaptureMethod, CardNetwork, FutureUsage, PaymentChannel};
 use common_types::payments::{ApplePayPaymentData, GpayTokenizationData};
 use common_utils::{
     crypto::{self, GenerateDigest},
@@ -14,8 +14,8 @@ use error_stack::ResultExt;
 use hyperswitch_domain_models::{
     address::Address,
     payment_method_data::{
-        self, ApplePayWalletData, BankRedirectData, GooglePayWalletData, PayLaterData,
-        PaymentMethodData, WalletData,
+        self, ApplePayWalletData, BankRedirectData, CardDetailsForNetworkTransactionId,
+        GooglePayWalletData, PayLaterData, PaymentMethodData, WalletData,
     },
     router_data::{
         AdditionalPaymentMethodConnectorResponse, ConnectorAuthType, ConnectorResponseData,
@@ -76,6 +76,7 @@ trait NuveiAuthorizePreprocessingCommon {
     fn get_related_transaction_id(&self) -> Option<String>;
     fn get_complete_authorize_url(&self) -> Option<String>;
     fn get_is_moto(&self) -> Option<bool>;
+    fn get_ntid(&self) -> Option<String>;
     fn get_connector_mandate_id(&self) -> Option<String>;
     fn get_return_url_required(
         &self,
@@ -182,13 +183,18 @@ impl NuveiAuthorizePreprocessingCommon for SetupMandateRequestData {
         (self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
             && self.setup_future_usage == Some(FutureUsage::OffSession)
     }
+    fn get_ntid(&self) -> Option<String> {
+        None
+    }
 }
 
 impl NuveiAuthorizePreprocessingCommon for PaymentsAuthorizeData {
     fn get_browser_info(&self) -> Option<BrowserInformation> {
         self.browser_info.clone()
     }
-
+    fn get_ntid(&self) -> Option<String> {
+        self.get_optional_network_transaction_id()
+    }
     fn get_related_transaction_id(&self) -> Option<String> {
         self.related_transaction_id.clone()
     }
@@ -328,6 +334,10 @@ impl NuveiAuthorizePreprocessingCommon for PaymentsPreProcessingData {
     fn get_is_partial_approval(&self) -> Option<PartialApprovalFlag> {
         None
     }
+
+    fn get_ntid(&self) -> Option<String> {
+        None
+    }
 }
 
 #[derive(Debug, Serialize, Default, Deserialize)]
@@ -396,6 +406,7 @@ pub struct NuveiPaymentsRequest {
     pub url_details: Option<UrlDetails>,
     pub amount_details: Option<NuvieAmountDetails>,
     pub is_partial_approval: Option<PartialApprovalFlag>,
+    pub external_scheme_details: Option<ExternalSchemeDetails>,
 }
 
 #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
@@ -886,7 +897,12 @@ struct GooglePayInfoCamelCase {
     card_details: Secret<String>,
     assurance_details: Option<GooglePayAssuranceDetailsCamelCase>,
 }
-
+#[derive(Debug, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct ExternalSchemeDetails {
+    transaction_id: Secret<String>, // This is sensitive information
+    brand: Option<CardNetwork>,
+}
 #[derive(Serialize, Debug)]
 #[serde(rename_all = "camelCase")]
 struct GooglePayAssuranceDetailsCamelCase {
@@ -919,176 +935,203 @@ struct ApplePayPaymentMethodCamelCase {
     #[serde(rename = "type")]
     pm_type: Secret<String>,
 }
-
-impl TryFrom<GooglePayWalletData> for NuveiPaymentsRequest {
-    type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(gpay_data: GooglePayWalletData) -> Result<Self, Self::Error> {
-        match gpay_data.tokenization_data {
-            GpayTokenizationData::Decrypted(ref gpay_predecrypt_data) => Ok(Self {
-                payment_option: PaymentOption {
-                    card: Some(Card {
-                        brand: Some(gpay_data.info.card_network.clone()),
-                        card_number: Some(
-                            gpay_predecrypt_data
-                                .application_primary_account_number
-                                .clone(),
-                        ),
-                        last4_digits: Some(Secret::new(
-                            gpay_predecrypt_data
-                                .application_primary_account_number
-                                .clone()
-                                .get_last4(),
-                        )),
-                        expiration_month: Some(gpay_predecrypt_data.card_exp_month.clone()),
-                        expiration_year: Some(gpay_predecrypt_data.card_exp_year.clone()),
-                        external_token: Some(ExternalToken {
-                            external_token_provider: ExternalTokenProvider::GooglePay,
-                            mobile_token: None,
-                            cryptogram: gpay_predecrypt_data.cryptogram.clone(),
-                            eci_provider: gpay_predecrypt_data.eci_indicator.clone(),
-                        }),
-                        ..Default::default()
+fn get_googlepay_info<F, Req>(
+    item: &RouterData<F, Req, PaymentsResponseData>,
+    gpay_data: &GooglePayWalletData,
+) -> Result<NuveiPaymentsRequest, error_stack::Report<errors::ConnectorError>>
+where
+    Req: NuveiAuthorizePreprocessingCommon,
+{
+    let is_rebilling = if item.request.is_customer_initiated_mandate_payment() {
+        Some("0".to_string())
+    } else {
+        None
+    };
+    match gpay_data.tokenization_data {
+        GpayTokenizationData::Decrypted(ref gpay_predecrypt_data) => Ok(NuveiPaymentsRequest {
+            is_rebilling,
+            payment_option: PaymentOption {
+                card: Some(Card {
+                    brand: Some(gpay_data.info.card_network.clone()),
+                    card_number: Some(
+                        gpay_predecrypt_data
+                            .application_primary_account_number
+                            .clone(),
+                    ),
+                    last4_digits: Some(Secret::new(
+                        gpay_predecrypt_data
+                            .application_primary_account_number
+                            .clone()
+                            .get_last4(),
+                    )),
+                    expiration_month: Some(gpay_predecrypt_data.card_exp_month.clone()),
+                    expiration_year: Some(gpay_predecrypt_data.card_exp_year.clone()),
+                    external_token: Some(ExternalToken {
+                        external_token_provider: ExternalTokenProvider::GooglePay,
+                        mobile_token: None,
+                        cryptogram: gpay_predecrypt_data.cryptogram.clone(),
+                        eci_provider: gpay_predecrypt_data.eci_indicator.clone(),
                     }),
                     ..Default::default()
-                },
+                }),
                 ..Default::default()
-            }),
-            GpayTokenizationData::Encrypted(encrypted_data) => Ok(Self {
-                payment_option: PaymentOption {
-                    card: Some(Card {
-                        external_token: Some(ExternalToken {
-                            external_token_provider: ExternalTokenProvider::GooglePay,
-
-                            mobile_token: {
-                                let (token_type, token) = (
-                                    encrypted_data.token_type.clone(),
-                                    encrypted_data.token.clone(),
-                                );
-
-                                let google_pay: GooglePayCamelCase = GooglePayCamelCase {
-                                    pm_type: Secret::new(gpay_data.pm_type.clone()),
-                                    description: Secret::new(gpay_data.description.clone()),
-                                    info: GooglePayInfoCamelCase {
-                                        card_network: Secret::new(
-                                            gpay_data.info.card_network.clone(),
-                                        ),
-                                        card_details: Secret::new(
-                                            gpay_data.info.card_details.clone(),
-                                        ),
-                                        assurance_details: gpay_data
-                                            .info
-                                            .assurance_details
-                                            .as_ref()
-                                            .map(|details| GooglePayAssuranceDetailsCamelCase {
-                                                card_holder_authenticated: details
-                                                    .card_holder_authenticated,
-                                                account_verified: details.account_verified,
-                                            }),
-                                    },
-                                    tokenization_data: GooglePayTokenizationDataCamelCase {
-                                        token_type: token_type.into(),
-                                        token: token.into(),
-                                    },
-                                };
-                                Some(Secret::new(
-                                    google_pay.encode_to_string_of_json().change_context(
-                                        errors::ConnectorError::RequestEncodingFailed,
-                                    )?,
-                                ))
-                            },
-                            cryptogram: None,
-                            eci_provider: None,
-                        }),
-                        ..Default::default()
+            },
+            ..Default::default()
+        }),
+        GpayTokenizationData::Encrypted(ref encrypted_data) => Ok(NuveiPaymentsRequest {
+            is_rebilling,
+            payment_option: PaymentOption {
+                card: Some(Card {
+                    external_token: Some(ExternalToken {
+                        external_token_provider: ExternalTokenProvider::GooglePay,
+
+                        mobile_token: {
+                            let (token_type, token) = (
+                                encrypted_data.token_type.clone(),
+                                encrypted_data.token.clone(),
+                            );
+
+                            let google_pay: GooglePayCamelCase = GooglePayCamelCase {
+                                pm_type: Secret::new(gpay_data.pm_type.clone()),
+                                description: Secret::new(gpay_data.description.clone()),
+                                info: GooglePayInfoCamelCase {
+                                    card_network: Secret::new(gpay_data.info.card_network.clone()),
+                                    card_details: Secret::new(gpay_data.info.card_details.clone()),
+                                    assurance_details: gpay_data
+                                        .info
+                                        .assurance_details
+                                        .as_ref()
+                                        .map(|details| GooglePayAssuranceDetailsCamelCase {
+                                            card_holder_authenticated: details
+                                                .card_holder_authenticated,
+                                            account_verified: details.account_verified,
+                                        }),
+                                },
+                                tokenization_data: GooglePayTokenizationDataCamelCase {
+                                    token_type: token_type.into(),
+                                    token: token.into(),
+                                },
+                            };
+                            Some(Secret::new(
+                                google_pay.encode_to_string_of_json().change_context(
+                                    errors::ConnectorError::RequestEncodingFailed,
+                                )?,
+                            ))
+                        },
+                        cryptogram: None,
+                        eci_provider: None,
                     }),
                     ..Default::default()
-                },
+                }),
                 ..Default::default()
-            }),
-        }
+            },
+            ..Default::default()
+        }),
     }
 }
-impl TryFrom<ApplePayWalletData> for NuveiPaymentsRequest {
-    type Error = error_stack::Report<errors::ConnectorError>;
-    fn try_from(apple_pay_data: ApplePayWalletData) -> Result<Self, Self::Error> {
-        match apple_pay_data.payment_data {
-            ApplePayPaymentData::Decrypted(apple_pay_predecrypt_data) => Ok(Self {
-                payment_option: PaymentOption {
-                    card: Some(Card {
-                        brand:Some(apple_pay_data.payment_method.network.clone()),
-                        card_number: Some(
-                            apple_pay_predecrypt_data
-                                .application_primary_account_number
-                                .clone(),
-                        ),
-                        last4_digits: Some(Secret::new(
-                            apple_pay_predecrypt_data
-                                .application_primary_account_number
-                                .get_last4(),
-                        )),
-                        expiration_month: Some(
+
+fn get_applepay_info<F, Req>(
+    item: &RouterData<F, Req, PaymentsResponseData>,
+    apple_pay_data: &ApplePayWalletData,
+) -> Result<NuveiPaymentsRequest, error_stack::Report<errors::ConnectorError>>
+where
+    Req: NuveiAuthorizePreprocessingCommon,
+{
+    let is_rebilling = if item.request.is_customer_initiated_mandate_payment() {
+        Some("0".to_string())
+    } else {
+        None
+    };
+    match apple_pay_data.payment_data {
+        ApplePayPaymentData::Decrypted(ref apple_pay_predecrypt_data) => Ok(NuveiPaymentsRequest {
+           is_rebilling,
+            payment_option: PaymentOption {
+                card: Some(Card {
+                    brand: Some(apple_pay_data.payment_method.network.clone()),
+                    card_number: Some(
+                        apple_pay_predecrypt_data
+                            .application_primary_account_number
+                            .clone(),
+                    ),
+                    last4_digits: Some(Secret::new(
+                        apple_pay_predecrypt_data
+                            .application_primary_account_number
+                            .get_last4(),
+                    )),
+                    expiration_month: Some(
+                        apple_pay_predecrypt_data
+                            .application_expiration_month
+                            .clone(),
+                    ),
+                    expiration_year: Some(
+                        apple_pay_predecrypt_data
+                            .application_expiration_year
+                            .clone(),
+                    ),
+                    external_token: Some(ExternalToken {
+                        external_token_provider: ExternalTokenProvider::ApplePay,
+                        mobile_token: None,
+                        cryptogram: Some(
                             apple_pay_predecrypt_data
-                                .application_expiration_month
+                                .payment_data
+                                .online_payment_cryptogram
                                 .clone(),
                         ),
-                        expiration_year: Some(
+                        eci_provider: Some(
                             apple_pay_predecrypt_data
-                                .application_expiration_year
-                                .clone(),
+                                .payment_data
+                                .eci_indicator.clone()
+                                .ok_or_else(missing_field_err(
+                                "payment_method_data.wallet.apple_pay.payment_data.eci_indicator",
+                            ))?,
                         ),
-                        external_token: Some(ExternalToken {
-                            external_token_provider: ExternalTokenProvider::ApplePay,
-                            mobile_token: None,
-                            cryptogram: Some(
-                                apple_pay_predecrypt_data
-                                    .payment_data
-                                    .online_payment_cryptogram,
-                            ),
-                            eci_provider: Some(
-                                apple_pay_predecrypt_data
-                                    .payment_data
-                                    .eci_indicator
-                                    .ok_or_else(missing_field_err("payment_method_data.wallet.apple_pay.payment_data.eci_indicator"))?,
-                            ),
-                        }),
-                        ..Default::default()
                     }),
                     ..Default::default()
-                },
+                }),
                 ..Default::default()
-            }),
-            ApplePayPaymentData::Encrypted(encrypted_data) => Ok(Self {
-                payment_option: PaymentOption {
-                    card: Some(Card {
-                        external_token: Some(ExternalToken {
-                            external_token_provider: ExternalTokenProvider::ApplePay,
-                            mobile_token: {
-                                let apple_pay: ApplePayCamelCase = ApplePayCamelCase {
-                                     payment_data:encrypted_data.into(),
-                                     payment_method: ApplePayPaymentMethodCamelCase {
-                                         display_name: Secret::new(apple_pay_data.payment_method.display_name.clone()),
-                                         network: Secret::new(apple_pay_data.payment_method.network.clone()),
-                                         pm_type: Secret::new(apple_pay_data.payment_method.pm_type.clone()),
-                                     },
-                                     transaction_identifier: Secret::new(apple_pay_data.transaction_identifier.clone()),
-                                    };
-
-                                Some(Secret::new(
-                                    apple_pay.encode_to_string_of_json().change_context(
-                                        errors::ConnectorError::RequestEncodingFailed,
-                                    )?,
-                                ))
-                            },
-                            cryptogram: None,
-                            eci_provider: None,
-                        }),
-                        ..Default::default()
+            },
+            ..Default::default()
+        }),
+        ApplePayPaymentData::Encrypted(ref encrypted_data) => Ok(NuveiPaymentsRequest {
+           is_rebilling,
+            payment_option: PaymentOption {
+                card: Some(Card {
+                    external_token: Some(ExternalToken {
+                        external_token_provider: ExternalTokenProvider::ApplePay,
+                        mobile_token: {
+                            let apple_pay: ApplePayCamelCase = ApplePayCamelCase {
+                                payment_data: encrypted_data.to_string().into(),
+                                payment_method: ApplePayPaymentMethodCamelCase {
+                                    display_name: Secret::new(
+                                        apple_pay_data.payment_method.display_name.clone(),
+                                    ),
+                                    network: Secret::new(
+                                        apple_pay_data.payment_method.network.clone(),
+                                    ),
+                                    pm_type: Secret::new(
+                                        apple_pay_data.payment_method.pm_type.clone(),
+                                    ),
+                                },
+                                transaction_identifier: Secret::new(
+                                    apple_pay_data.transaction_identifier.clone(),
+                                ),
+                            };
+
+                            Some(Secret::new(
+                                apple_pay.encode_to_string_of_json().change_context(
+                                    errors::ConnectorError::RequestEncodingFailed,
+                                )?,
+                            ))
+                        },
+                        cryptogram: None,
+                        eci_provider: None,
                     }),
                     ..Default::default()
-                },
+                }),
                 ..Default::default()
-            }),
-        }
+            },
+            ..Default::default()
+        }),
     }
 }
 
@@ -1336,6 +1379,52 @@ where
     })
 }
 
+fn get_ntid_card_info<F, Req>(
+    router_data: &RouterData<F, Req, PaymentsResponseData>,
+    data: CardDetailsForNetworkTransactionId,
+) -> Result<NuveiPaymentsRequest, error_stack::Report<errors::ConnectorError>>
+where
+    Req: NuveiAuthorizePreprocessingCommon,
+{
+    let external_scheme_details = Some(ExternalSchemeDetails {
+        transaction_id: router_data
+            .request
+            .get_ntid()
+            .ok_or_else(missing_field_err("network_transaction_id"))
+            .attach_printable("Nuvei unable to find NTID for MIT")?
+            .into(),
+        brand: Some(
+            data.card_network
+                .ok_or_else(missing_field_err("recurring_details.data.card_network"))?,
+        ),
+    });
+    let payment_option: PaymentOption = PaymentOption {
+        card: Some(Card {
+            card_number: Some(data.card_number),
+            card_holder_name: data.card_holder_name,
+            expiration_month: Some(data.card_exp_month),
+            expiration_year: Some(data.card_exp_year),
+            ..Default::default() // CVV should be disabled by nuvei fo
+        }),
+        redirect_url: None,
+        user_payment_option_id: None,
+        alternative_payment_method: None,
+        billing_address: None,
+        shipping_address: None,
+    };
+    let is_rebilling = if router_data.request.is_customer_initiated_mandate_payment() {
+        Some("0".to_string())
+    } else {
+        None
+    };
+    Ok(NuveiPaymentsRequest {
+        external_scheme_details,
+        payment_option,
+        is_rebilling,
+        ..Default::default()
+    })
+}
+
 impl<F, Req> TryFrom<(&RouterData<F, Req, PaymentsResponseData>, String)> for NuveiPaymentsRequest
 where
     Req: NuveiAuthorizePreprocessingCommon,
@@ -1348,9 +1437,12 @@ where
         let request_data = match item.request.get_payment_method_data_required()?.clone() {
             PaymentMethodData::Card(card) => get_card_info(item, &card),
             PaymentMethodData::MandatePayment => Self::try_from(item),
+            PaymentMethodData::CardDetailsForNetworkTransactionId(data) => {
+                get_ntid_card_info(item, data)
+            }
             PaymentMethodData::Wallet(wallet) => match wallet {
-                WalletData::GooglePay(gpay_data) => Self::try_from(gpay_data),
-                WalletData::ApplePay(apple_pay_data) => Ok(Self::try_from(apple_pay_data)?),
+                WalletData::GooglePay(gpay_data) => get_googlepay_info(item, &gpay_data),
+                WalletData::ApplePay(apple_pay_data) => get_applepay_info(item, &apple_pay_data),
                 WalletData::PaypalRedirect(_) => Self::foreign_try_from((
                     AlternativePaymentMethodType::Expresscheckout,
                     None,
@@ -1463,13 +1555,10 @@ where
             | PaymentMethodData::GiftCard(_)
             | PaymentMethodData::OpenBanking(_)
             | PaymentMethodData::CardToken(_)
-            | PaymentMethodData::NetworkToken(_)
-            | PaymentMethodData::CardDetailsForNetworkTransactionId(_) => {
-                Err(errors::ConnectorError::NotImplemented(
-                    utils::get_unimplemented_payment_method_error_message("nuvei"),
-                )
-                .into())
-            }
+            | PaymentMethodData::NetworkToken(_) => Err(errors::ConnectorError::NotImplemented(
+                utils::get_unimplemented_payment_method_error_message("nuvei"),
+            )
+            .into()),
         }?;
         let currency = item.request.get_currency_required()?;
         let request = Self::try_from(NuveiPaymentRequestData {

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

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

## Description
<!-- Describe your changes in detail -->
1. Add NTID proxy support for nuvei. ( NOTE: Nuvei is not responding with NTID as of now hence we cant make ntid originated flow via nuvei to other connector. We are verifying NTID originated from other connector through nuvei. )
2. Extend mandate support for googlepay and applepay. ( decrypt flow only) 

## test 

### 1. NTID Proxy flow
1. Enable `is_connector_agnostic_mit_enabled` for business profile.

```sh
curl --location 'localhost:8080/account/merchant_1756365601/business_profile/pro_081OLMJnVwN9FKpv728n' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_DtdoS2OQrXtZtx2ORkcSVGmwPs6fnV73boCOqv3XkXZa4RdYAxu8MEEIzIVplGQi' \
--data '{
 "is_connector_agnostic_mit_enabled":true
}'
```

<details>
<summary> Make a mandate payment via cybersource to get ntid </summary>
## Request

```json
{
    "amount": 0,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "singh",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "connector": [
        "cybersource"
    ],
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "setup_future_usage": "off_session",
    "payment_type": "setup_mandate",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "127.0.0.1",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "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": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "125.0.0.1"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {},
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 0,
            "account_name": "transaction_processing"
        }
    ]
}
```

## response

```json
{
    "payment_id": "pay_xmji3uvqkwBFMjMBxRAZ",
    "merchant_id": "merchant_1756365601",
    "status": "processing",
    "amount": 0,
    "net_amount": 0,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "cybersource",
    "client_secret": "pay_xmji3uvqkwBFMjMBxRAZ_secret_LyBJlTjcQFbIqyIviNiG",
    "created": "2025-08-29T04:10:34.820Z",
    "currency": "USD",
    "customer_id": "singh",
    "customer": {
        "id": "singh",
        "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": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "avs_response": {
                    "code": "Y",
                    "codeRaw": "Y"
                },
                "card_verification": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_B4GiWHRdxg3g3BjsvoWY",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "sku": null,
            "upc": null,
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "description": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "total_amount": null,
            "commodity_code": null,
            "unit_of_measure": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null,
            "unit_discount_amount": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.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": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "singh",
        "created_at": 1756440634,
        "expires": 1756444234,
        "secret": "epk_7eb79d3657f24ff285bd9a532dc966f3"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7564406363016111504807",
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pay_xmji3uvqkwBFMjMBxRAZ_1",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_iXmGyeq1jo6FcvXLsQ78",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T04:25:34.819Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_DIW13s8bZ8neb24aSnov",
    "network_transaction_id": "016150703802094",
    "payment_method_status": "inactive",
    "updated": "2025-08-29T04:10:37.227Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```


</details>

<details>
<summary> Make a proxy call with nuvei with cybersource obtained ntid </summary>
##  Request

```json
{
    "amount": 10023,
    "currency": "EUR",
    "confirm": true,
    "customer_id": "nithxxinn",
    "return_url": "https://www.google.com",
    "capture_method": "automatic",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "country": "US",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    },
    "email": "hello@gmail.com",

 
    "payment_method": "card",
    "payment_method_type": "credit",
    "off_session": true,
    "recurring_details": {
        "type": "network_transaction_id_and_card_details",
        "data": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_network":"VISA",
            "network_transaction_id": "016150703802094"
        }
    }


}
```

## Response

```json
{
    "payment_id": "pay_75VJuP2CMXo3Z43zThif",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 10023,
    "net_amount": 10023,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 10023,
    "connector": "nuvei",
    "client_secret": "pay_75VJuP2CMXo3Z43zThif_secret_rHK1wcFimQTTTjwb6A72",
    "created": "2025-08-29T04:17:33.772Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "US",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://www.google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": null,
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "nithxxinn",
        "created_at": 1756441053,
        "expires": 1756444653,
        "secret": "epk_9107d76964ea44bb821a5a44eeabf189"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016800600",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "8321086111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T04:32:33.772Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-08-29T04:17:35.842Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```

</details>



### 2. NTID confirm via nuvei using payment token

<details>
<summary>  Create a on session payment via cybersource</summary>

## Request

```json
{
    "amount": 390,
    "currency": "USD",
    "confirm": false,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "singh",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "connector": [
        "cybersource"
    ],
    "payment_method_data": {
        "card": {
            "card_number": "4242424242424242",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "setup_future_usage": "on_session",
    "payment_type": "setup_mandate",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "127.0.0.1",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "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": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "125.0.0.1"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {},
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 0,
            "account_name": "transaction_processing"
        }
    ]
}
```

## Response

```json
{
    "payment_id": "pay_1ImanuhWyquBc95H6hns",
    "merchant_id": "merchant_1756365601",
    "status": "requires_confirmation",
    "amount": 390,
    "net_amount": 390,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": null,
    "client_secret": "pay_1ImanuhWyquBc95H6hns_secret_llGkXJVaZI2TYZHvHI7v",
    "created": "2025-08-29T05:48:04.092Z",
    "currency": "USD",
    "customer_id": "singh",
    "customer": {
        "id": "singh",
        "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": null,
    "mandate_data": null,
    "setup_future_usage": "on_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_oq7VkgN5Ao3OAXnX190c",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "sku": null,
            "upc": null,
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "description": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "total_amount": null,
            "commodity_code": null,
            "unit_of_measure": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null,
            "unit_discount_amount": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.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": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "singh",
        "created_at": 1756446484,
        "expires": 1756450084,
        "secret": "epk_607f5a2355114e88b1e75523be174604"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": null,
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:03:04.092Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-08-29T05:48:04.118Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```
</details>

 
<details>
<summary> Confirm via nuvei passing the payment token </summary>
## Request

```sh
curl --location --globoff '{{baseUrl}}/payments/{{payment_id}}/confirm' \
--header 'api-key: api-key' \
--header 'Content-Type: application/json' \
--data '{
    "payment_method": "card",
    "routing": {
        "type": "single",
        "data": {
            "connector": "nuvei",
            "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc"
        }
    },
    "payment_token": "token_dWdH51U5LEGh7XA1qntS"
    
}'
```

## Response

```json
{
    "payment_id": "pay_1ImanuhWyquBc95H6hns",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 390,
    "net_amount": 390,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 390,
    "connector": "nuvei",
    "client_secret": "pay_1ImanuhWyquBc95H6hns_secret_llGkXJVaZI2TYZHvHI7v",
    "created": "2025-08-29T05:48:04.092Z",
    "currency": "USD",
    "customer_id": "singh",
    "customer": {
        "id": "singh",
        "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": null,
    "mandate_data": null,
    "setup_future_usage": "on_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "4242",
            "card_type": "CREDIT",
            "card_network": "Visa",
            "card_issuer": "STRIPE PAYMENTS UK LIMITED",
            "card_issuing_country": "UNITEDKINGDOM",
            "card_isin": "424242",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "avs_description": null,
                "avs_result_code": "",
                "cvv_2_reply_code": "",
                "cvv_2_description": null,
                "merchant_advice_code": "",
                "merchant_advice_code_description": null
            },
            "authentication_data": {
                "challengePreferenceReason": "12"
            }
        },
        "billing": null
    },
    "payment_token": "token_oq7VkgN5Ao3OAXnX190c",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": [
        {
            "sku": null,
            "upc": null,
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "description": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "total_amount": null,
            "commodity_code": null,
            "unit_of_measure": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null,
            "unit_discount_amount": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.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": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016803027",
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "8321797111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:03:04.092Z",
    "fingerprint": null,
    "browser_info": {
        "os_type": null,
        "language": null,
        "time_zone": null,
        "ip_address": "::1",
        "os_version": null,
        "user_agent": null,
        "color_depth": null,
        "device_model": null,
        "java_enabled": null,
        "screen_width": null,
        "accept_header": null,
        "screen_height": null,
        "accept_language": "en",
        "java_script_enabled": null
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2025-08-29T05:48:19.225Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```

</details>

### 3. Google pay mandates

<details>
<summary>Google pay Mandates </summary>

## Googlepay Mandate Request

```json
{
    "amount": 12,
    "currency": "EUR",
    "confirm": true,
    "customer_id": "nithxxinn",
    "return_url": "https://www.google.com",
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_type": "google_pay",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
        "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    // "order_tax_amount": 100,
    "setup_future_usage": "off_session",
    "billing": {
        "address": {
            "zip": "560095",
            "country": "UA",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        },
        "email":"test@gmail.com"
    },
    "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    },
    "email": "hello@gmail.com",
    "payment_method_data": {
        "wallet": {
            "google_pay": {
                "type": "CARD",
                "tokenization_data": {
                    "application_primary_account_number": "4761*********1390",
                    "card_exp_month": "12",
                    "card_exp_year": "25",
                    "cryptogram": "ejJ******************U=",
                    "eci_indicator": "5"
                },
                "info": {
                    "card_details": "Discover 9319",
                    "card_network": "VISA"
                },
                "description": "something"
            }
        }
    }
}
```

## Response

```json
{
    "payment_id": "pay_iywIHCV5A8QA4mtOWyGt",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 0,
    "net_amount": 0,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 0,
    "connector": "nuvei",
    "client_secret": "pay_iywIHCV5A8QA4mtOWyGt_secret_p1YwZ5CEGkcNI5Gb07m1",
    "created": "2025-08-29T05:53:15.386Z",
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "customer": {
        "id": "nithxxinn",
        "name": null,
        "email": "hello@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {
            "google_pay": {
                "last4": "Discover 9319",
                "card_network": "VISA",
                "type": "CARD"
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "UA",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": "test@gmail.com"
    },
    "order_details": null,
    "email": "hello@gmail.com",
    "name": null,
    "phone": null,
    "return_url": "https://www.google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "google_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "nithxxinn",
        "created_at": 1756446795,
        "expires": 1756450395,
        "secret": "epk_56c83dfed43e4766bdc0b4de08459f5b"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016803203",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "8321860111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:08:15.386Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_jovQAOvn8XLwQg9OunFi",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-08-29T05:53:17.641Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "2117920111",
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```
 ## Mandate request using payment_method_id

```json
{
    "amount": 333,
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "confirm": true,
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "{{payment_method_id}}"//pass the payment method id here
    },
       "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    }
}
```

## Mandate Response 

```JSON
{
    "payment_id": "pay_QuQhI84yF81WPOAlV0LU",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "nuvei",
    "client_secret": "pay_QuQhI84yF81WPOAlV0LU_secret_wtlIXP9sC20TnmhOQPUv",
    "created": "2025-08-29T05:54:22.157Z",
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "customer": {
        "id": "nithxxinn",
        "name": null,
        "email": "hello@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": null,
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {
            "google_pay": {
                "last4": "Discover 9319",
                "card_network": "VISA",
                "type": "CARD"
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "hello@gmail.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "google_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "nithxxinn",
        "created_at": 1756446862,
        "expires": 1756450462,
        "secret": "epk_ed76e2ce25ec45c5959e2219bfc2c686"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016803225",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "8321866111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:09:22.157Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_jovQAOvn8XLwQg9OunFi",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-08-29T05:54:24.044Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "2117920111",
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```


</details>

### 4. Applepay mandate

<details>
<summary> Apple pay mandates </summary>

## applepay mandate request

```json
{
    "amount": 1,
    "currency": "EUR",
    "confirm": true,
    // "order_tax_amount": 100,
    // "setup_future_usage": "off_session",
    // "payment_type":"setup_mandate",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    // "order_tax_amount": 100,
    "setup_future_usage": "off_session",
    "customer_id": "nithxxinn",
    "return_url": "https://www.google.com",
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_type": "apple_pay",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "billing": {
        "address": {
            "zip": "560095",
            "country": "US",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        },
        "email": "nithingowdan77@gmail.com"
    },
    "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    },
    "email": "hello@gmail.com",
    "payment_method_data": {
        "wallet": {
            "apple_pay": {
                "payment_data": {
                    "application_primary_account_number": "42*****2",
                    "application_expiration_month": "09",
                    "application_expiration_year": "30",
                    "application_brand": "VISA",
                    "payment_data": {
                        "online_payment_cryptogram": "Ar******A",
                        "eci_indicator": "7"
                    }
                },
                "payment_method": {
                    "display_name": "Discover 9319",
                    "network": "VISA",
                    "type": "debit"
                },
                "transaction_identifier": "c635c5b3af900d*******ee65ec7afd988a678194751"
            }
        }
    }
}

```

## Response

```json
{
    "payment_id": "pay_m3H9lmnjHemVrTDl86Ra",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 1,
    "net_amount": 1,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1,
    "connector": "nuvei",
    "client_secret": "pay_m3H9lmnjHemVrTDl86Ra_secret_0nQUY9G0znF1u8ZghnO0",
    "created": "2025-08-29T05:59:23.232Z",
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "customer": {
        "id": "nithxxinn",
        "name": null,
        "email": "hello@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": "hellow world",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {
            "apple_pay": {
                "last4": "9319",
                "card_network": "VISA",
                "type": "debit"
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "US",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak",
            "origin_zip": null
        },
        "phone": null,
        "email": "nithingowdan77@gmail.com"
    },
    "order_details": null,
    "email": "hello@gmail.com",
    "name": null,
    "phone": null,
    "return_url": "https://www.google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "apple_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "nithxxinn",
        "created_at": 1756447163,
        "expires": 1756450763,
        "secret": "epk_ff4001bc18034075a9ea2c1cea803978"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016803352",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "8321903111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:14:23.232Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_ojHZfjBQMQscy9fSih5M",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-08-29T05:59:29.451Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "2109690111",
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```

## MIT using payment method id
### Request

```json
{
    "amount": 333,
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "confirm": true,
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "{{payment_method_id}}"//pass the payment method id here
    },
       "browser_info": {
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "ip_address": "192.168.1.1",
        "java_enabled": false,
        "java_script_enabled": true,
        "language": "en-US",
        "color_depth": 24,
        "screen_height": 1080,
        "screen_width": 1920,
        "time_zone": 330,
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
    }
}
```

### Response

```json
{
    "payment_id": "pay_V80VZo4t4Cimc1AjRECd",
    "merchant_id": "merchant_1756365601",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "nuvei",
    "client_secret": "pay_V80VZo4t4Cimc1AjRECd_secret_8H3jqd3Fl0Wa6qVrxocf",
    "created": "2025-08-29T06:01:47.718Z",
    "currency": "EUR",
    "customer_id": "nithxxinn",
    "customer": {
        "id": "nithxxinn",
        "name": null,
        "email": "hello@gmail.com",
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": null,
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {
            "apple_pay": {
                "last4": "9319",
                "card_network": "VISA",
                "type": "debit"
            }
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "hello@gmail.com",
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "apple_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "nithxxinn",
        "created_at": 1756447307,
        "expires": 1756450907,
        "secret": "epk_fcc84a432dec4a869b1cac1e7a034147"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7110000000016803458",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "8321949111",
    "payment_link": null,
    "profile_id": "pro_Gb5wEfhtfFlPj8H5vses",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_RFiJ87uP0hCqNImMBrZc",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-29T06:16:47.718Z",
    "fingerprint": null,
    "browser_info": {
        "language": "en-US",
        "time_zone": 330,
        "ip_address": "192.168.1.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "color_depth": 24,
        "java_enabled": false,
        "screen_width": 1920,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "screen_height": 1080,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_ojHZfjBQMQscy9fSih5M",
    "network_transaction_id": null,
    "payment_method_status": "active",
    "updated": "2025-08-29T06:01:52.065Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "2109690111",
    "card_discovery": null,
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null
}
```

</details>

