Bug: [FEATURE] Googlepay , applepay and partial authorization integration for nuvei



### Feature Description

Add nuvie features

### Possible Implementation

Add and fix the following features in nuvie

    Google pay decrypt flow
    Apple pay decrypt flow
    Google pay direct
    Partial Authorization
    Send shipping address for nuvei (previously not sent)


### 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/crates/hyperswitch_connectors/src/connectors/nuvei.rs b/crates/hyperswitch_connectors/src/connectors/nuvei.rs
index 3701a814103..7943479730d 100644
--- a/crates/hyperswitch_connectors/src/connectors/nuvei.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nuvei.rs
@@ -1,5 +1,5 @@
 pub mod transformers;
-use std::{fmt::Debug, sync::LazyLock};
+use std::sync::LazyLock;
 
 use api_models::{payments::PaymentIdType, webhooks::IncomingWebhookEvent};
 use common_enums::{enums, CallConnectorAction, PaymentAction};
@@ -9,6 +9,7 @@ use common_utils::{
     ext_traits::{ByteSliceExt, BytesExt, ValueExt},
     id_type,
     request::{Method, Request, RequestBuilder, RequestContent},
+    types::{AmountConvertor, StringMajorUnit, StringMajorUnitForConnector},
 };
 use error_stack::ResultExt;
 use hyperswitch_domain_models::{
@@ -57,8 +58,17 @@ use crate::{
     utils::{self, is_mandate_supported, PaymentMethodDataType, RouterData as _},
 };
 
-#[derive(Debug, Clone)]
-pub struct Nuvei;
+#[derive(Clone)]
+pub struct Nuvei {
+    pub amount_convertor: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
+}
+impl Nuvei {
+    pub fn new() -> &'static Self {
+        &Self {
+            amount_convertor: &StringMajorUnitForConnector,
+        }
+    }
+}
 
 impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for Nuvei
 where
@@ -592,6 +602,7 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
         _connectors: &Connectors,
     ) -> CustomResult<RequestContent, errors::ConnectorError> {
         let connector_req = nuvei::NuveiPaymentsRequest::try_from((req, req.get_session_token()?))?;
+
         Ok(RequestContent::Json(Box::new(connector_req)))
     }
 
@@ -629,7 +640,6 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
             .switch()?;
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
-
         RouterData::try_from(ResponseRouterData {
             response,
             data: data.clone(),
diff --git a/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs b/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
index c20b97d78a2..2280bbb707c 100644
--- a/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
@@ -1,4 +1,5 @@
 use common_enums::{enums, CaptureMethod, PaymentChannel};
+use common_types::payments::{ApplePayPaymentData, GpayTokenizationData};
 use common_utils::{
     crypto::{self, GenerateDigest},
     date_time,
@@ -7,9 +8,11 @@ use common_utils::{
     id_type::CustomerId,
     pii::{Email, IpAddress},
     request::Method,
+    types::{MinorUnit, StringMajorUnit, StringMajorUnitForConnector},
 };
 use error_stack::ResultExt;
 use hyperswitch_domain_models::{
+    address::Address,
     mandates::{MandateData, MandateDataType},
     payment_method_data::{
         self, ApplePayWalletData, BankRedirectData, GooglePayWalletData, PayLaterData,
@@ -34,7 +37,7 @@ use hyperswitch_domain_models::{
 };
 use hyperswitch_interfaces::{
     consts::{NO_ERROR_CODE, NO_ERROR_MESSAGE},
-    errors,
+    errors::{self},
 };
 use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Serialize};
@@ -45,12 +48,14 @@ use crate::{
         PaymentsPreprocessingResponseRouterData, RefundsResponseRouterData, ResponseRouterData,
     },
     utils::{
-        self, missing_field_err, AddressDetailsData, BrowserInformationData, ForeignTryFrom,
-        PaymentsAuthorizeRequestData, PaymentsCancelRequestData, PaymentsPreProcessingRequestData,
-        RouterData as _,
+        self, convert_amount, missing_field_err, AddressData, AddressDetailsData,
+        BrowserInformationData, ForeignTryFrom, PaymentsAuthorizeRequestData,
+        PaymentsCancelRequestData, PaymentsPreProcessingRequestData, RouterData as _,
     },
 };
 
+pub static NUVEI_AMOUNT_CONVERTOR: &StringMajorUnitForConnector = &StringMajorUnitForConnector;
+
 fn to_boolean(string: String) -> bool {
     let str = string.as_str();
     match str {
@@ -78,7 +83,9 @@ trait NuveiAuthorizePreprocessingCommon {
         &self,
     ) -> Result<String, error_stack::Report<errors::ConnectorError>>;
     fn get_capture_method(&self) -> Option<CaptureMethod>;
-    fn get_amount_required(&self) -> Result<i64, error_stack::Report<errors::ConnectorError>>;
+    fn get_minor_amount_required(
+        &self,
+    ) -> Result<MinorUnit, error_stack::Report<errors::ConnectorError>>;
     fn get_customer_id_required(&self) -> Option<CustomerId>;
     fn get_email_required(&self) -> Result<Email, error_stack::Report<errors::ConnectorError>>;
     fn get_currency_required(
@@ -87,9 +94,10 @@ trait NuveiAuthorizePreprocessingCommon {
     fn get_payment_method_data_required(
         &self,
     ) -> Result<PaymentMethodData, error_stack::Report<errors::ConnectorError>>;
+    fn get_is_partial_approval(&self) -> Option<PartialApprovalFlag>;
     fn get_order_tax_amount(
         &self,
-    ) -> Result<Option<i64>, error_stack::Report<errors::ConnectorError>>;
+    ) -> Result<Option<MinorUnit>, error_stack::Report<errors::ConnectorError>>;
 }
 
 impl NuveiAuthorizePreprocessingCommon for PaymentsAuthorizeData {
@@ -133,8 +141,10 @@ impl NuveiAuthorizePreprocessingCommon for PaymentsAuthorizeData {
         self.capture_method
     }
 
-    fn get_amount_required(&self) -> Result<i64, error_stack::Report<errors::ConnectorError>> {
-        Ok(self.amount)
+    fn get_minor_amount_required(
+        &self,
+    ) -> Result<MinorUnit, error_stack::Report<errors::ConnectorError>> {
+        Ok(self.minor_amount)
     }
 
     fn get_currency_required(
@@ -149,13 +159,18 @@ impl NuveiAuthorizePreprocessingCommon for PaymentsAuthorizeData {
     }
     fn get_order_tax_amount(
         &self,
-    ) -> Result<Option<i64>, error_stack::Report<errors::ConnectorError>> {
-        Ok(self.order_tax_amount.map(|tax| tax.get_amount_as_i64()))
+    ) -> Result<Option<MinorUnit>, error_stack::Report<errors::ConnectorError>> {
+        Ok(self.order_tax_amount)
     }
 
     fn get_email_required(&self) -> Result<Email, error_stack::Report<errors::ConnectorError>> {
         self.get_email()
     }
+
+    fn get_is_partial_approval(&self) -> Option<PartialApprovalFlag> {
+        self.enable_partial_authorization
+            .map(PartialApprovalFlag::from)
+    }
 }
 
 impl NuveiAuthorizePreprocessingCommon for PaymentsPreProcessingData {
@@ -199,8 +214,10 @@ impl NuveiAuthorizePreprocessingCommon for PaymentsPreProcessingData {
         self.capture_method
     }
 
-    fn get_amount_required(&self) -> Result<i64, error_stack::Report<errors::ConnectorError>> {
-        self.get_amount()
+    fn get_minor_amount_required(
+        &self,
+    ) -> Result<MinorUnit, error_stack::Report<errors::ConnectorError>> {
+        self.get_minor_amount()
     }
 
     fn get_currency_required(
@@ -220,9 +237,13 @@ impl NuveiAuthorizePreprocessingCommon for PaymentsPreProcessingData {
     }
     fn get_order_tax_amount(
         &self,
-    ) -> Result<Option<i64>, error_stack::Report<errors::ConnectorError>> {
+    ) -> Result<Option<MinorUnit>, error_stack::Report<errors::ConnectorError>> {
         Ok(None)
     }
+
+    fn get_is_partial_approval(&self) -> Option<PartialApprovalFlag> {
+        None
+    }
 }
 
 #[derive(Debug, Serialize, Default, Deserialize)]
@@ -262,7 +283,7 @@ pub struct NuveiSessionResponse {
 #[derive(Debug, Serialize, Default)]
 #[serde(rename_all = "camelCase")]
 pub struct NuvieAmountDetails {
-    total_tax: Option<String>,
+    total_tax: Option<StringMajorUnit>,
 }
 #[serde_with::skip_serializing_none]
 #[derive(Debug, Serialize, Default)]
@@ -273,7 +294,7 @@ pub struct NuveiPaymentsRequest {
     pub merchant_id: Secret<String>,
     pub merchant_site_id: Secret<String>,
     pub client_request_id: Secret<String>,
-    pub amount: String,
+    pub amount: StringMajorUnit,
     pub currency: enums::Currency,
     /// This ID uniquely identifies your consumer/user in your system.
     pub user_token_id: Option<CustomerId>,
@@ -286,9 +307,30 @@ pub struct NuveiPaymentsRequest {
     pub device_details: DeviceDetails,
     pub checksum: Secret<String>,
     pub billing_address: Option<BillingAddress>,
+    pub shipping_address: Option<ShippingAddress>,
     pub related_transaction_id: Option<String>,
     pub url_details: Option<UrlDetails>,
     pub amount_details: Option<NuvieAmountDetails>,
+    pub is_partial_approval: Option<PartialApprovalFlag>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[serde(rename_all = "UPPERCASE")]
+pub enum PartialApprovalFlag {
+    #[serde(rename = "1")]
+    Enabled,
+    #[serde(rename = "0")]
+    Disabled,
+}
+
+impl From<bool> for PartialApprovalFlag {
+    fn from(value: bool) -> Self {
+        if value {
+            Self::Enabled
+        } else {
+            Self::Disabled
+        }
+    }
 }
 
 #[derive(Debug, Serialize, Default)]
@@ -305,7 +347,7 @@ pub struct NuveiInitPaymentRequest {
     pub merchant_id: Secret<String>,
     pub merchant_site_id: Secret<String>,
     pub client_request_id: String,
-    pub amount: String,
+    pub amount: StringMajorUnit,
     pub currency: String,
     pub payment_option: PaymentOption,
     pub checksum: Secret<String>,
@@ -319,7 +361,7 @@ pub struct NuveiPaymentFlowRequest {
     pub merchant_id: Secret<String>,
     pub merchant_site_id: Secret<String>,
     pub client_request_id: String,
-    pub amount: String,
+    pub amount: StringMajorUnit,
     pub currency: enums::Currency,
     pub related_transaction_id: Option<String>,
     pub checksum: Secret<String>,
@@ -347,6 +389,7 @@ pub struct PaymentOption {
     pub user_payment_option_id: Option<String>,
     pub alternative_payment_method: Option<AlternativePaymentMethod>,
     pub billing_address: Option<BillingAddress>,
+    pub shipping_address: Option<BillingAddress>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
@@ -413,8 +456,104 @@ pub struct BillingAddress {
     pub first_name: Option<Secret<String>>,
     pub last_name: Option<Secret<String>>,
     pub country: api_models::enums::CountryAlpha2,
+    pub phone: Option<Secret<String>>,
+    pub city: Option<Secret<String>>,
+    pub address: Option<Secret<String>>,
+    pub street_number: Option<Secret<String>>,
+    pub zip: Option<Secret<String>>,
+    pub state: Option<Secret<String>>,
+    pub cell: Option<Secret<String>>,
+    pub address_match: Option<Secret<String>>,
+    pub address_line2: Option<Secret<String>>,
+    pub address_line3: Option<Secret<String>>,
+    pub home_phone: Option<Secret<String>>,
+    pub work_phone: Option<Secret<String>>,
+}
+
+#[serde_with::skip_serializing_none]
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct ShippingAddress {
+    pub salutation: Option<Secret<String>>,
+    pub first_name: Option<Secret<String>>,
+    pub last_name: Option<Secret<String>>,
+    pub address: Option<Secret<String>>,
+    pub cell: Option<Secret<String>>,
+    pub phone: Option<Secret<String>>,
+    pub zip: Option<Secret<String>>,
+    pub city: Option<Secret<String>>,
+    pub country: api_models::enums::CountryAlpha2,
+    pub state: Option<Secret<String>>,
+    pub email: Email,
+    pub county: Option<Secret<String>>,
+    pub address_line2: Option<Secret<String>>,
+    pub address_line3: Option<Secret<String>>,
+    pub street_number: Option<Secret<String>>,
+    pub company_name: Option<Secret<String>>,
+    pub care_of: Option<Secret<String>>,
 }
 
+impl From<&Address> for BillingAddress {
+    fn from(address: &Address) -> Self {
+        let address_details = address.address.as_ref();
+        Self {
+            email: address.email.clone().unwrap_or_default(),
+            first_name: address.get_optional_first_name(),
+            last_name: address_details.and_then(|address| address.get_optional_last_name()),
+            country: address_details
+                .and_then(|address| address.get_optional_country())
+                .unwrap_or_default(),
+            phone: address
+                .phone
+                .as_ref()
+                .and_then(|phone| phone.number.clone()),
+            city: address_details
+                .and_then(|address| address.get_optional_city().map(|city| city.into())),
+            address: address_details.and_then(|address| address.get_optional_line1()),
+            street_number: None,
+            zip: address_details.and_then(|details| details.get_optional_zip()),
+            state: None,
+            cell: None,
+            address_match: None,
+            address_line2: address_details.and_then(|address| address.get_optional_line2()),
+            address_line3: address_details.and_then(|address| address.get_optional_line3()),
+            home_phone: None,
+            work_phone: None,
+        }
+    }
+}
+
+impl From<&Address> for ShippingAddress {
+    fn from(address: &Address) -> Self {
+        let address_details = address.address.as_ref();
+
+        Self {
+            email: address.email.clone().unwrap_or_default(),
+            first_name: address_details.and_then(|details| details.get_optional_first_name()),
+            last_name: address_details.and_then(|details| details.get_optional_last_name()),
+            country: address_details
+                .and_then(|details| details.get_optional_country())
+                .unwrap_or_default(),
+            phone: address
+                .phone
+                .as_ref()
+                .and_then(|phone| phone.number.clone()),
+            city: address_details
+                .and_then(|details| details.get_optional_city().map(|city| city.into())),
+            address: address_details.and_then(|details| details.get_optional_line1()),
+            street_number: None,
+            zip: address_details.and_then(|details| details.get_optional_zip()),
+            state: None,
+            cell: None,
+            address_line2: address_details.and_then(|details| details.get_optional_line2()),
+            address_line3: address_details.and_then(|details| details.get_optional_line3()),
+            county: None,
+            company_name: None,
+            care_of: None,
+            salutation: None,
+        }
+    }
+}
 #[serde_with::skip_serializing_none]
 #[derive(Debug, Clone, Default, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
@@ -435,7 +574,7 @@ pub struct Card {
     pub cvv2_reply: Option<String>,
     pub avs_code: Option<String>,
     pub card_type: Option<String>,
-    pub card_brand: Option<String>,
+    pub brand: Option<String>,
     pub issuer_bank_name: Option<String>,
     pub issuer_country: Option<String>,
     pub is_prepaid: Option<String>,
@@ -446,7 +585,9 @@ pub struct Card {
 #[serde(rename_all = "camelCase")]
 pub struct ExternalToken {
     pub external_token_provider: ExternalTokenProvider,
-    pub mobile_token: Secret<String>,
+    pub mobile_token: Option<Secret<String>>,
+    pub cryptogram: Option<Secret<String>>,
+    pub eci_provider: Option<String>,
 }
 
 #[derive(Debug, Clone, Default, Serialize, Deserialize)]
@@ -644,53 +785,226 @@ pub struct NuveiCardDetails {
     card_holder_name: Option<Secret<String>>,
 }
 
+// Define new structs with camelCase serialization
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct GooglePayCamelCase {
+    pm_type: Secret<String>,
+    description: Secret<String>,
+    info: GooglePayInfoCamelCase,
+    tokenization_data: GooglePayTokenizationDataCamelCase,
+}
+
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct GooglePayInfoCamelCase {
+    card_network: Secret<String>,
+    card_details: Secret<String>,
+    assurance_details: Option<GooglePayAssuranceDetailsCamelCase>,
+}
+
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct GooglePayAssuranceDetailsCamelCase {
+    card_holder_authenticated: bool,
+    account_verified: bool,
+}
+
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct GooglePayTokenizationDataCamelCase {
+    #[serde(rename = "type")]
+    token_type: Secret<String>,
+    token: Secret<String>,
+}
+
+// Define ApplePay structs with camelCase serialization
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct ApplePayCamelCase {
+    payment_data: Secret<String>,
+    payment_method: ApplePayPaymentMethodCamelCase,
+    transaction_identifier: Secret<String>,
+}
+
+#[derive(Serialize, Debug)]
+#[serde(rename_all = "camelCase")]
+struct ApplePayPaymentMethodCamelCase {
+    display_name: Secret<String>,
+    network: Secret<String>,
+    #[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> {
-        Ok(Self {
-            payment_option: PaymentOption {
-                card: Some(Card {
-                    external_token: Some(ExternalToken {
-                        external_token_provider: ExternalTokenProvider::GooglePay,
-                        mobile_token: Secret::new(
-                            utils::GooglePayWalletData::try_from(gpay_data)
-                                .change_context(errors::ConnectorError::InvalidDataFormat {
-                                    field_name: "google_pay_data",
-                                })?
-                                .encode_to_string_of_json()
-                                .change_context(errors::ConnectorError::RequestEncodingFailed)?,
+        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()
                     }),
                     ..Default::default()
-                }),
+                },
                 ..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()
+                },
+                ..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> {
-        let apple_pay_encrypted_data = apple_pay_data
-            .payment_data
-            .get_encrypted_apple_pay_payment_data_mandatory()
-            .change_context(errors::ConnectorError::MissingRequiredField {
-                field_name: "Apple pay encrypted data",
-            })?;
-        Ok(Self {
-            payment_option: PaymentOption {
-                card: Some(Card {
-                    external_token: Some(ExternalToken {
-                        external_token_provider: ExternalTokenProvider::ApplePay,
-                        mobile_token: Secret::new(apple_pay_encrypted_data.clone()),
+        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(
+                            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
+                                    .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()
-            },
-            ..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()
+                },
+                ..Default::default()
+            }),
+        }
     }
 }
 
@@ -869,58 +1183,32 @@ where
         ),
     ) -> Result<Self, Self::Error> {
         let (payment_method, redirect, item) = data;
-        let (billing_address, bank_id) = match (&payment_method, redirect) {
-            (AlternativePaymentMethodType::Expresscheckout, _) => (
-                Some(BillingAddress {
-                    email: item.request.get_email_required()?,
-                    country: item.get_billing_country()?,
-                    ..Default::default()
-                }),
-                None,
-            ),
-            (AlternativePaymentMethodType::Giropay, _) => (
-                Some(BillingAddress {
-                    email: item.request.get_email_required()?,
-                    country: item.get_billing_country()?,
-                    ..Default::default()
-                }),
-                None,
-            ),
+        let bank_id = match (&payment_method, redirect) {
+            (AlternativePaymentMethodType::Expresscheckout, _) => None,
+            (AlternativePaymentMethodType::Giropay, _) => None,
             (AlternativePaymentMethodType::Sofort, _) | (AlternativePaymentMethodType::Eps, _) => {
                 let address = item.get_billing_address()?;
-                let first_name = address.get_first_name()?;
-                (
-                    Some(BillingAddress {
-                        first_name: Some(first_name.clone()),
-                        last_name: Some(address.get_last_name().unwrap_or(first_name).clone()),
-                        email: item.request.get_email_required()?,
-                        country: item.get_billing_country()?,
-                    }),
-                    None,
-                )
+                address.get_first_name()?;
+                item.request.get_email_required()?;
+                item.get_billing_country()?;
+                None
             }
             (
                 AlternativePaymentMethodType::Ideal,
                 Some(BankRedirectData::Ideal { bank_name, .. }),
             ) => {
                 let address = item.get_billing_address()?;
-                let first_name = address.get_first_name()?.clone();
-                (
-                    Some(BillingAddress {
-                        first_name: Some(first_name.clone()),
-                        last_name: Some(
-                            address.get_last_name().ok().unwrap_or(&first_name).clone(),
-                        ),
-                        email: item.request.get_email_required()?,
-                        country: item.get_billing_country()?,
-                    }),
-                    bank_name.map(NuveiBIC::try_from).transpose()?,
-                )
+                address.get_first_name()?;
+                item.request.get_email_required()?;
+                item.get_billing_country()?;
+                bank_name.map(NuveiBIC::try_from).transpose()?
             }
             _ => Err(errors::ConnectorError::NotImplemented(
                 utils::get_unimplemented_payment_method_error_message("Nuvei"),
             ))?,
         };
+        let billing_address: Option<BillingAddress> =
+            item.get_billing().ok().map(|billing| billing.into());
         Ok(Self {
             payment_option: PaymentOption {
                 alternative_payment_method: Some(AlternativePaymentMethod {
@@ -947,20 +1235,17 @@ where
         .address
         .as_ref()
         .ok_or_else(missing_field_err("billing.address"))?;
-    let first_name = address.get_first_name()?;
+    address.get_first_name()?;
     let payment_method = payment_method_type;
+    address.get_country()?; //country is necessary check
+    item.request.get_email_required()?;
     Ok(NuveiPaymentsRequest {
         payment_option: PaymentOption {
             alternative_payment_method: Some(AlternativePaymentMethod {
                 payment_method,
                 ..Default::default()
             }),
-            billing_address: Some(BillingAddress {
-                email: item.request.get_email_required()?,
-                first_name: Some(first_name.clone()),
-                last_name: Some(address.get_last_name().unwrap_or(first_name).clone()),
-                country: address.get_country()?.to_owned(),
-            }),
+            billing_address: item.get_billing().ok().map(|billing| billing.into()),
             ..Default::default()
         },
         ..Default::default()
@@ -1104,36 +1389,64 @@ where
         }?;
         let currency = item.request.get_currency_required()?;
         let request = Self::try_from(NuveiPaymentRequestData {
-            amount: utils::to_currency_base_unit(item.request.get_amount_required()?, currency)?,
+            amount: convert_amount(
+                NUVEI_AMOUNT_CONVERTOR,
+                item.request.get_minor_amount_required()?,
+                currency,
+            )?,
             currency,
             connector_auth_type: item.connector_auth_type.clone(),
             client_request_id: item.connector_request_reference_id.clone(),
             session_token: Secret::new(data.1),
             capture_method: item.request.get_capture_method(),
+
             ..Default::default()
         })?;
         let return_url = item.request.get_return_url_required()?;
 
         let amount_details = match item.request.get_order_tax_amount()? {
             Some(tax) => Some(NuvieAmountDetails {
-                total_tax: Some(utils::to_currency_base_unit(tax, currency)?),
+                total_tax: Some(convert_amount(NUVEI_AMOUNT_CONVERTOR, tax, currency)?),
             }),
             None => None,
         };
+        let address = {
+            if let Some(billing_address) = item.get_optional_billing() {
+                let mut billing_address = billing_address.clone();
+                item.get_billing_first_name()?;
+                billing_address.email = match item.get_billing_email() {
+                    Ok(email) => Some(email),
+                    Err(_) => Some(item.request.get_email_required()?),
+                };
+                item.get_billing_country()?;
+
+                Some(billing_address)
+            } else {
+                None
+            }
+        };
+
+        let shipping_address: Option<ShippingAddress> =
+            item.get_optional_shipping().map(|address| address.into());
+
+        let billing_address: Option<BillingAddress> = address.map(|ref address| address.into());
         Ok(Self {
             is_rebilling: request_data.is_rebilling,
             user_token_id: item.customer_id.clone(),
             related_transaction_id: request_data.related_transaction_id,
             payment_option: request_data.payment_option,
-            billing_address: request_data.billing_address,
-            device_details: request_data.device_details,
+            billing_address,
+            shipping_address,
+            device_details: DeviceDetails::foreign_try_from(
+                &item.request.get_browser_info().clone(),
+            )?,
             url_details: Some(UrlDetails {
                 success_url: return_url.clone(),
                 failure_url: return_url.clone(),
                 pending_url: return_url.clone(),
             }),
             amount_details,
-
+            is_partial_approval: item.request.get_is_partial_approval(),
             ..request
         })
     }
@@ -1157,18 +1470,13 @@ where
         .get_optional_billing()
         .and_then(|billing_details| billing_details.address.as_ref());
 
-    let billing_address = match address {
-        Some(address) => {
-            let first_name = address.get_first_name()?.clone();
-            Some(BillingAddress {
-                first_name: Some(first_name.clone()),
-                last_name: Some(address.get_last_name().ok().unwrap_or(&first_name).clone()),
-                email: item.request.get_email_required()?,
-                country: item.get_billing_country()?,
-            })
-        }
-        None => None,
-    };
+    if let Some(address) = address {
+        // mandatory feilds check
+        address.get_first_name()?;
+        item.request.get_email_required()?;
+        item.get_billing_country()?;
+    }
+
     let (is_rebilling, additional_params, user_token_id) =
         match item.request.get_setup_mandate_details().clone() {
             Some(mandate_data) => {
@@ -1262,7 +1570,7 @@ where
             three_d,
             card_holder_name: item.get_optional_billing_full_name(),
         }),
-        billing_address,
+
         is_moto,
         ..Default::default()
     })
@@ -1329,7 +1637,11 @@ impl TryFrom<(&types::PaymentsCompleteAuthorizeRouterData, Secret<String>)>
             )),
         }?;
         let request = Self::try_from(NuveiPaymentRequestData {
-            amount: utils::to_currency_base_unit(item.request.amount, item.request.currency)?,
+            amount: convert_amount(
+                NUVEI_AMOUNT_CONVERTOR,
+                item.request.minor_amount,
+                item.request.currency,
+            )?,
             currency: item.request.currency,
             connector_auth_type: item.connector_auth_type.clone(),
             client_request_id: item.connector_request_reference_id.clone(),
@@ -1363,7 +1675,7 @@ impl TryFrom<NuveiPaymentRequestData> for NuveiPaymentsRequest {
         let merchant_secret = connector_meta.merchant_secret;
         let transaction_type = TransactionType::get_from_capture_method_and_amount_string(
             request.capture_method.unwrap_or_default(),
-            &request.amount,
+            &request.amount.get_amount_as_string(),
         );
         Ok(Self {
             merchant_id: merchant_id.clone(),
@@ -1376,7 +1688,7 @@ impl TryFrom<NuveiPaymentRequestData> for NuveiPaymentsRequest {
                 merchant_id.peek(),
                 merchant_site_id.peek(),
                 &client_request_id,
-                &request.amount.clone(),
+                &request.amount.get_amount_as_string(),
                 &request.currency.to_string(),
                 &time_stamp,
                 merchant_secret.peek(),
@@ -1409,7 +1721,7 @@ impl TryFrom<NuveiPaymentRequestData> for NuveiPaymentFlowRequest {
                 merchant_id.peek(),
                 merchant_site_id.peek(),
                 &client_request_id,
-                &request.amount.clone(),
+                &request.amount.get_amount_as_string(),
                 &request.currency.to_string(),
                 &request.related_transaction_id.clone().unwrap_or_default(),
                 &time_stamp,
@@ -1424,7 +1736,7 @@ impl TryFrom<NuveiPaymentRequestData> for NuveiPaymentFlowRequest {
 
 #[derive(Debug, Clone, Default)]
 pub struct NuveiPaymentRequestData {
-    pub amount: String,
+    pub amount: StringMajorUnit,
     pub currency: enums::Currency,
     pub related_transaction_id: Option<String>,
     pub client_request_id: String,
@@ -1439,8 +1751,9 @@ impl TryFrom<&types::PaymentsCaptureRouterData> for NuveiPaymentFlowRequest {
         Self::try_from(NuveiPaymentRequestData {
             client_request_id: item.connector_request_reference_id.clone(),
             connector_auth_type: item.connector_auth_type.clone(),
-            amount: utils::to_currency_base_unit(
-                item.request.amount_to_capture,
+            amount: convert_amount(
+                NUVEI_AMOUNT_CONVERTOR,
+                item.request.minor_amount_to_capture,
                 item.request.currency,
             )?,
             currency: item.request.currency,
@@ -1455,8 +1768,9 @@ impl TryFrom<&types::RefundExecuteRouterData> for NuveiPaymentFlowRequest {
         Self::try_from(NuveiPaymentRequestData {
             client_request_id: item.connector_request_reference_id.clone(),
             connector_auth_type: item.connector_auth_type.clone(),
-            amount: utils::to_currency_base_unit(
-                item.request.refund_amount,
+            amount: convert_amount(
+                NUVEI_AMOUNT_CONVERTOR,
+                item.request.minor_refund_amount,
                 item.request.currency,
             )?,
             currency: item.request.currency,
@@ -1533,8 +1847,11 @@ impl TryFrom<&types::PaymentsCancelRouterData> for NuveiPaymentFlowRequest {
         Self::try_from(NuveiPaymentRequestData {
             client_request_id: item.connector_request_reference_id.clone(),
             connector_auth_type: item.connector_auth_type.clone(),
-            amount: utils::to_currency_base_unit(
-                item.request.get_amount()?,
+            amount: convert_amount(
+                NUVEI_AMOUNT_CONVERTOR,
+                item.request
+                    .minor_amount
+                    .ok_or_else(missing_field_err("amount"))?,
                 item.request.get_currency()?,
             )?,
             currency: item.request.get_currency()?,
@@ -1603,6 +1920,15 @@ impl From<NuveiTransactionStatus> for enums::AttemptStatus {
     }
 }
 
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct NuveiPartialApproval {
+    pub requested_amount: StringMajorUnit,
+    pub requested_currency: enums::Currency,
+    pub processed_amount: StringMajorUnit,
+    pub processed_currency: enums::Currency,
+}
+
 #[derive(Debug, Clone, Default, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct NuveiPaymentsResponse {
@@ -1623,6 +1949,7 @@ pub struct NuveiPaymentsResponse {
     pub fraud_details: Option<FraudDetails>,
     pub external_scheme_transaction_id: Option<Secret<String>>,
     pub session_token: Option<Secret<String>>,
+    pub partial_approval: Option<NuveiPartialApproval>,
     //The ID of the transaction in the merchant’s system.
     pub client_unique_id: Option<String>,
     pub internal_request_id: Option<i64>,
@@ -1635,6 +1962,37 @@ pub struct NuveiPaymentsResponse {
     pub client_request_id: Option<String>,
     pub merchant_advice_code: Option<String>,
 }
+impl NuveiPaymentsResponse {
+    /// returns amount_captured and minor_amount_capturable
+    pub fn get_amount_captured(
+        &self,
+    ) -> Result<(Option<i64>, Option<MinorUnit>), error_stack::Report<errors::ConnectorError>> {
+        match &self.partial_approval {
+            Some(partial_approval) => {
+                let amount = utils::convert_back_amount_to_minor_units(
+                    NUVEI_AMOUNT_CONVERTOR,
+                    partial_approval.processed_amount.clone(),
+                    partial_approval.processed_currency,
+                )?;
+                match self.transaction_type {
+                    None => Ok((None, None)),
+                    Some(NuveiTransactionType::Sale) => {
+                        Ok((Some(MinorUnit::get_amount_as_i64(amount)), None))
+                    }
+                    Some(NuveiTransactionType::Auth) => Ok((None, Some(amount))),
+                    Some(NuveiTransactionType::Auth3D) => {
+                        Ok((Some(MinorUnit::get_amount_as_i64(amount)), None))
+                    }
+                    Some(NuveiTransactionType::InitAuth3D) => Ok((None, Some(amount))),
+                    Some(NuveiTransactionType::Credit) => Ok((None, None)),
+                    Some(NuveiTransactionType::Void) => Ok((None, None)),
+                    Some(NuveiTransactionType::Settle) => Ok((None, None)),
+                }
+            }
+            None => Ok((None, None)),
+        }
+    }
+}
 
 #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
 pub enum NuveiTransactionType {
@@ -1708,36 +2066,27 @@ fn get_payment_status(
     }
 }
 
-fn build_error_response<T>(
-    response: &NuveiPaymentsResponse,
-    http_code: u16,
-) -> Option<Result<T, error_stack::Report<errors::ConnectorError>>> {
+fn build_error_response(response: &NuveiPaymentsResponse, http_code: u16) -> Option<ErrorResponse> {
     match response.status {
-        NuveiPaymentStatus::Error => Some(
-            get_error_response(
-                response.err_code,
-                &response.reason,
+        NuveiPaymentStatus::Error => Some(get_error_response(
+            response.err_code,
+            &response.reason,
+            http_code,
+            &response.merchant_advice_code,
+            &response.gw_error_code.map(|e| e.to_string()),
+            &response.gw_error_reason,
+        )),
+
+        _ => {
+            let err = Some(get_error_response(
+                response.gw_error_code,
+                &response.gw_error_reason,
                 http_code,
                 &response.merchant_advice_code,
                 &response.gw_error_code.map(|e| e.to_string()),
                 &response.gw_error_reason,
-            )
-            .map_err(|_err| error_stack::report!(errors::ConnectorError::ResponseHandlingFailed)),
-        ),
-        _ => {
-            let err = Some(
-                get_error_response(
-                    response.gw_error_code,
-                    &response.gw_error_reason,
-                    http_code,
-                    &response.merchant_advice_code,
-                    &response.gw_error_code.map(|e| e.to_string()),
-                    &response.gw_error_reason,
-                )
-                .map_err(|_err| {
-                    error_stack::report!(errors::ConnectorError::ResponseHandlingFailed)
-                }),
-            );
+            ));
+
             match response.transaction_status {
                 Some(NuveiTransactionStatus::Error) | Some(NuveiTransactionStatus::Declined) => err,
                 _ => match response
@@ -1798,7 +2147,6 @@ where
                 form_fields: std::collections::HashMap::from([("creq".to_string(), creq.expose())]),
             }),
     };
-
     let connector_response_data =
         convert_to_additional_payment_method_connector_response(&item.response)
             .map(ConnectorResponseData::with_additional_payment_method_data);
@@ -1812,12 +2160,7 @@ where
 fn create_transaction_response(
     response: &NuveiPaymentsResponse,
     redirection_data: Option<RedirectForm>,
-    http_code: u16,
 ) -> Result<PaymentsResponseData, error_stack::Report<errors::ConnectorError>> {
-    if let Some(err) = build_error_response(response, http_code) {
-        return err;
-    }
-
     Ok(PaymentsResponseData::TransactionResponse {
         resource_id: response
             .transaction_id
@@ -1882,13 +2225,19 @@ impl
         let (status, redirection_data, connector_response_data) =
             process_nuvei_payment_response(&item, amount)?;
 
+        let (amount_captured, minor_amount_capturable) = item.response.get_amount_captured()?;
         Ok(Self {
             status,
-            response: Ok(create_transaction_response(
-                &item.response,
-                redirection_data,
-                item.http_code,
-            )?),
+            response: if let Some(err) = build_error_response(&item.response, item.http_code) {
+                Err(err)
+            } else {
+                Ok(create_transaction_response(
+                    &item.response,
+                    redirection_data,
+                )?)
+            },
+            amount_captured,
+            minor_amount_capturable,
             connector_response: connector_response_data,
             ..item.data
         })
@@ -1915,13 +2264,19 @@ where
         let (status, redirection_data, connector_response_data) =
             process_nuvei_payment_response(&item, amount)?;
 
+        let (amount_captured, minor_amount_capturable) = item.response.get_amount_captured()?;
         Ok(Self {
             status,
-            response: Ok(create_transaction_response(
-                &item.response,
-                redirection_data,
-                item.http_code,
-            )?),
+            response: if let Some(err) = build_error_response(&item.response, item.http_code) {
+                Err(err)
+            } else {
+                Ok(create_transaction_response(
+                    &item.response,
+                    redirection_data,
+                )?)
+            },
+            amount_captured,
+            minor_amount_capturable,
             connector_response: connector_response_data,
             ..item.data
         })
@@ -1982,10 +2337,10 @@ impl TryFrom<RefundsResponseRouterData<Execute, NuveiPaymentsResponse>>
             .ok_or(errors::ConnectorError::MissingConnectorTransactionID)?;
 
         let refund_response =
-            get_refund_response(item.response.clone(), item.http_code, transaction_id)?;
+            get_refund_response(item.response.clone(), item.http_code, transaction_id);
 
         Ok(Self {
-            response: Ok(refund_response),
+            response: refund_response.map_err(|err| *err),
             ..item.data
         })
     }
@@ -2005,10 +2360,10 @@ impl TryFrom<RefundsResponseRouterData<RSync, NuveiPaymentsResponse>>
             .ok_or(errors::ConnectorError::MissingConnectorTransactionID)?;
 
         let refund_response =
-            get_refund_response(item.response.clone(), item.http_code, transaction_id)?;
+            get_refund_response(item.response.clone(), item.http_code, transaction_id);
 
         Ok(Self {
-            response: Ok(refund_response),
+            response: refund_response.map_err(|err| *err),
             ..item.data
         })
     }
@@ -2032,6 +2387,7 @@ where
             } else {
                 None
             };
+
             Ok(Self {
                 related_transaction_id,
                 device_details: DeviceDetails::foreign_try_from(
@@ -2065,32 +2421,30 @@ fn get_refund_response(
     response: NuveiPaymentsResponse,
     http_code: u16,
     txn_id: String,
-) -> Result<RefundsResponseData, error_stack::Report<errors::ConnectorError>> {
+) -> Result<RefundsResponseData, Box<ErrorResponse>> {
     let refund_status = response
         .transaction_status
         .clone()
         .map(enums::RefundStatus::from)
         .unwrap_or(enums::RefundStatus::Failure);
     match response.status {
-        NuveiPaymentStatus::Error => get_error_response(
+        NuveiPaymentStatus::Error => Err(Box::new(get_error_response(
             response.err_code,
             &response.reason,
             http_code,
             &response.merchant_advice_code,
             &response.gw_error_code.map(|e| e.to_string()),
             &response.gw_error_reason,
-        )
-        .map_err(|_err| error_stack::report!(errors::ConnectorError::ResponseHandlingFailed)),
+        ))),
         _ => match response.transaction_status {
-            Some(NuveiTransactionStatus::Error) => get_error_response(
+            Some(NuveiTransactionStatus::Error) => Err(Box::new(get_error_response(
                 response.err_code,
                 &response.reason,
                 http_code,
                 &response.merchant_advice_code,
                 &response.gw_error_code.map(|e| e.to_string()),
                 &response.gw_error_reason,
-            )
-            .map_err(|_err| error_stack::report!(errors::ConnectorError::ResponseHandlingFailed)),
+            ))),
             _ => Ok(RefundsResponseData {
                 connector_refund_id: txn_id,
                 refund_status,
@@ -2099,15 +2453,15 @@ fn get_refund_response(
     }
 }
 
-fn get_error_response<T>(
+fn get_error_response(
     error_code: Option<i64>,
     error_msg: &Option<String>,
     http_code: u16,
     network_advice_code: &Option<String>,
     network_decline_code: &Option<String>,
     network_error_message: &Option<String>,
-) -> Result<T, Box<ErrorResponse>> {
-    Err(Box::new(ErrorResponse {
+) -> ErrorResponse {
+    ErrorResponse {
         code: error_code
             .map(|c| c.to_string())
             .unwrap_or_else(|| NO_ERROR_CODE.to_string()),
@@ -2122,7 +2476,7 @@ fn get_error_response<T>(
         network_decline_code: network_decline_code.clone(),
         network_error_message: network_error_message.clone(),
         connector_metadata: None,
-    }))
+    }
 }
 
 /// Represents any possible webhook notification from Nuvei.
@@ -2394,7 +2748,7 @@ fn convert_to_additional_payment_method_connector_response(
         "merchant_advice_code_description": merchant_advice_description
     });
 
-    let card_network = card.card_brand.clone();
+    let card_network = card.brand.clone();
     let three_ds_data = card
         .three_d
         .clone()
diff --git a/crates/router/src/types/api/connector_mapping.rs b/crates/router/src/types/api/connector_mapping.rs
index c184c9db8dd..29f14f79432 100644
--- a/crates/router/src/types/api/connector_mapping.rs
+++ b/crates/router/src/types/api/connector_mapping.rs
@@ -322,7 +322,9 @@ impl ConnectorData {
                 enums::Connector::Novalnet => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Novalnet::new())))
                 }
-                enums::Connector::Nuvei => Ok(ConnectorEnum::Old(Box::new(&connector::Nuvei))),
+                enums::Connector::Nuvei => {
+                    Ok(ConnectorEnum::Old(Box::new(connector::Nuvei::new())))
+                }
                 enums::Connector::Opennode => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Opennode::new())))
                 }
diff --git a/crates/router/src/types/api/feature_matrix.rs b/crates/router/src/types/api/feature_matrix.rs
index ac7754faa30..d7307e7ab68 100644
--- a/crates/router/src/types/api/feature_matrix.rs
+++ b/crates/router/src/types/api/feature_matrix.rs
@@ -239,7 +239,9 @@ impl FeatureMatrixConnectorData {
                 enums::Connector::Novalnet => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Novalnet::new())))
                 }
-                enums::Connector::Nuvei => Ok(ConnectorEnum::Old(Box::new(&connector::Nuvei))),
+                enums::Connector::Nuvei => {
+                    Ok(ConnectorEnum::Old(Box::new(connector::Nuvei::new())))
+                }
                 enums::Connector::Opennode => {
                     Ok(ConnectorEnum::Old(Box::new(connector::Opennode::new())))
                 }
diff --git a/crates/router/tests/connectors/nuvei.rs b/crates/router/tests/connectors/nuvei.rs
index f2db3c94a4d..395ad1d1ea9 100644
--- a/crates/router/tests/connectors/nuvei.rs
+++ b/crates/router/tests/connectors/nuvei.rs
@@ -16,7 +16,7 @@ impl utils::Connector for NuveiTest {
     fn get_data(&self) -> types::api::ConnectorData {
         use router::connector::Nuvei;
         utils::construct_connector_data_old(
-            Box::new(&Nuvei),
+            Box::new(Nuvei::new()),
             types::Connector::Nuvei,
             types::api::GetToken::Connector,
             None,

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

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

## Description
<!-- Describe your changes in detail -->
Add the following features in nuvie
1. Google pay decrypt flow S2S
2. Apple pay decrypt flow S2S
3. Google pay encrypt flow
4. Partial Authorization
5. Send shipping address for nuvei (previously not sent)

## Test attachment





<details>
<summary> <b>APPLE PAY DECRYPT FLOW </b> </summary>

# Request

```json
{
    "amount": 1,
    "currency": "EUR",
    "confirm": true,
    // "order_tax_amount": 100,
    "setup_future_usage": "off_session",
    // "payment_type":"setup_mandate",
    "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": "4242424242424242",
                    "application_expiration_month": "09",
                    "application_expiration_year": "30",
                    "application_brand":"VISA",
                    "payment_data": {
                        "online_payment_cryptogram": "ArSx8**************************",
                        "eci_indicator": "7"
                    }
                },
                "payment_method": {
                    "display_name": "Discover 9319",
                    "network": "VISA",
                    "type": "debit"
                },
                "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751"
            }
        }
    }
}

```

# Response

```json
{
    "payment_id": "pay_MgXkheRylOHLMUllc1Mw",
    "merchant_id": "merchant_1755589543",
    "status": "succeeded",
    "amount": 1,
    "net_amount": 1,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1,
    "connector": "nuvei",
    "client_secret": "pay_MgXkheRylOHLMUllc1Mw_secret_swUebKaDNEsP4Qo5BMxe",
    "created": "2025-08-19T08:05:14.847Z",
    "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": "on_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": "nithin*****@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": 1755590714,
        "expires": 1755594314,
        "secret": "epk_ad5c941cff3a4404ab38dee084e575d0"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "8110000000012650848",
    "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": "8027431111",
    "payment_link": null,
    "profile_id": "pro_o6xLMNfkFwAWH1U1zimF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_8DFDwR4GryN3qQQOh8bq",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-19T08:20:14.847Z",
    "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-19T08:05:17.249Z",
    "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>
 Google pay Decrypt 
</summary>

## Request

```json
{
    "amount": 1,
    "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",
    "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": "4761344136141390",
                    "card_exp_month": "12",
                    "card_exp_year": "25",
                    "cryptogram": "ejJR********************U=",
                    "eci_indicator": "5"
                },
                "info": {
                    "card_details": "Discover 9319",
                    "card_network": "VISA"
                },
                "description": "something"
            }
        }
    }
}
```
Response

```json
{
    "payment_id": "pay_0i5TBkizYCY8JIwAPB1H",
    "merchant_id": "merchant_1755589543",
    "status": "succeeded",
    "amount": 1,
    "net_amount": 1,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1,
    "connector": "nuvei",
    "client_secret": "pay_0i5TBkizYCY8JIwAPB1H_secret_7O5zdgMiNJxFdZolSjIJ",
    "created": "2025-08-19T08:07:18.648Z",
    "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": null,
    "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": 1755590838,
        "expires": 1755594438,
        "secret": "epk_8d9994d7f5594c2a8fb10ebf6c3fdc27"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "8110000000012650994",
    "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": "8027476111",
    "payment_link": null,
    "profile_id": "pro_o6xLMNfkFwAWH1U1zimF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_8DFDwR4GryN3qQQOh8bq",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-19T08:22:18.648Z",
    "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-19T08:07:21.259Z",
    "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> GOOGLE PAY DIRECT </summary> 

```js
const tokenizationSpecification = {
  type: "PAYMENT_GATEWAY",
  parameters: {
    "gateway": "nuveidigital",
    "gatewayMerchantId": "googletest"
  }
};
```
## Request

```json
{
    "amount": 1,
    "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",
    "billing": {
        "address": {
            "zip": "560095",
            "country": "UA",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        },
        "email":"nithin@test.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": {
  "description": "SG Visa Success: Visa •••• 1390",
  "info": {
    "assuranceDetails": {
      "account_verified": true,
      "card_holder_authenticated": false
    },
    "card_details": "1390",
    "card_network": "VISA"
  },
  "tokenization_data": {
    "token": "{\"signature\":\"MEUCIG7saL2k07Szf8ezokemD5jAJTwpcWwpy+ajTJot7u+nAiEAzvcuwAoj47r8oMh3a6eUKeZB2lFyDLEzZt2R2lpezo0\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9ByUUgcs6d9rtJA3svCKaGZQjfsbMQAAwWZ6YNIpJkg/NR9HAkMT1sdhkKMRxtcFp1k5y01dr/JpEU2Pj3XyYw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1756245691797\\\"}\",\"signatures\":[\"MEQCIFAS8NBh7J4rz00iRDjScYizAfRV+pVnCfsmsFgrehMVAiBpxHFUu6wG3UVNhDMmudb6sZeZHXDJonLkkKOWgzN4TA\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"hJxayhOT/y4ekX9Ub14X6nl7Xm0h3b1nu8FKv7WDulloondBA+kk9sYnNomQx+ZPANrGES4CBGbmptqW5gR6TjdvENXbSUrTjzU8k++Klw/AwAJBcID+dL+EgyIvgmqIYesLyKzITkZr9zSxtd0zuB9ewcta8gHgBzlZmJSWmdvanv4xiBQgjriKolnw4IiOXXAzN+X0GGXkPqcQnlLIrUzjn/9oCgwhFDltl1EJjkUH8Ji2Rzx62FUexxY6RHHrkoq3pCoirc+KNRXPu3+gC06iloRTR48gmmayFKH5s3Kyw0j9Oypu7fx/AgSqrFKkFzVUmCV0yLwGQSI2vyVdKOFLgLay8dDbEHKvF5X+ZP7diunVh0QwZUTT7yRmgyQUaZAbQhd+uRHrev6SYXcmWdSu8E+8H6A7jtITaZN2eHI7u9ciW82/AcIx3gPkTocKGyXdYRB07+GaFIqyWwxT+9TwLW49oq7hbj978APK1vy4f8x6v2h1tCj6StH6md7xJpn+U47n8rKmJhQiXqRyzfKFcCekndvs0YpgEVbcoZEKKl0E\\\",\\\"ephemeralPublicKey\\\":\\\"BKvkUFUZmpa0BgifTbr2ZTNBK7D74Fg8RMsk2Txta+Vf+vX1/BZLUaITfjpgJ5Xqt3rz+AmrkFe+XRvT5E4R7nc\\\\u003d\\\",\\\"tag\\\":\\\"cGNVu61W/PvTC89JXVMUcsKaZIOpt92oexc+aztsKqw\\\\u003d\\\"}\"}",
    "type": "PAYMENT_GATEWAY"
  },
  "type": "CARD"
}
    }}
}

```

## response

```json
{
    "payment_id": "pay_UGldGh1QW8CTJJJ22CMJ",
    "merchant_id": "merchant_1755589543",
    "status": "succeeded",
    "amount": 1,
    "net_amount": 1,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1,
    "connector": "nuvei",
    "client_secret": "pay_UGldGh1QW8CTJJJ22CMJ_secret_nKqyqNJ02RgcaMsBBz51",
    "created": "2025-08-19T09:08:25.037Z",
    "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": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "wallet": {
            "google_pay": {
                "last4": "1390",
                "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": "nithin@test.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": 1755594505,
        "expires": 1755598105,
        "secret": "epk_d3dbd5a8b4c04958b6fb4c959cbc67a1"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "8110000000012655452",
    "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": "8029357111",
    "payment_link": null,
    "profile_id": "pro_o6xLMNfkFwAWH1U1zimF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_8DFDwR4GryN3qQQOh8bq",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-19T09:23:25.037Z",
    "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-19T09:08:29.510Z",
    "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>Partial auth </summary>

## Request

```json
{
    "amount": 300,
    "currency": "EUR",
    "confirm": true,
    "customer_id": "nithxxinn",
    "return_url": "https://www.google.com",
    "capture_method": "automatic",
    "enable_partial_authorization":true,
    "payment_method": "card",
    "payment_method_type": "credit",
    "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":"nithin@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": {
        "card": {
            "card_number": "4531739335817394",
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "card_cvc": "100"
        }
    }
}
```


## Response

```json
{
    "payment_id": "pay_hieZ9MkK4v1qbqiXKEor",
    "merchant_id": "merchant_1755589543",
    "status": "partially_captured",
    "amount": 300,
    "net_amount": 300,
    "shipping_cost": null,
    "amount_capturable": 300,
    "amount_received": 150,
    "connector": "nuvei",
    "client_secret": "pay_hieZ9MkK4v1qbqiXKEor_secret_KN9DE1LjGlbxEIDGpzFT",
    "created": "2025-08-19T09:21:17.091Z",
    "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": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "7394",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "453173",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "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_7PrpuuSVcta1g2qFHYtC",
    "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": "nithin@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": "credit",
    "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": 1755595277,
        "expires": 1755598877,
        "secret": "epk_8003507abbdb427788e1fa089e75c59c"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "8110000000012656330",
    "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": "8029726111",
    "payment_link": null,
    "profile_id": "pro_o6xLMNfkFwAWH1U1zimF",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_8DFDwR4GryN3qQQOh8bq",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-19T09:36:17.091Z",
    "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-19T09:21:19.648Z",
    "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": true
}
```

## partial-auth manual payment response

```json
{
    "payment_id": "pay_t82V58k4cohYq87gBvGL",
    "merchant_id": "merchant_1755675958",
    "status": "partially_authorized_and_requires_capture",
    "amount": 300,
    "net_amount": 300,
    "shipping_cost": null,
    "amount_capturable": 150,
    "amount_received": null,
    "connector": "nuvei",
    "client_secret": "pay_t82V58k4cohYq87gBvGL_secret_CHN75ZbLuZWVBKYTITqg",
    "created": "2025-08-21T08:37:13.180Z",
    "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": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "7394",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "453173",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "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_yUVtqVsfxyKqmAM4fl1H",
    "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": "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": "credit",
    "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": 1755765433,
        "expires": 1755769033,
        "secret": "epk_c7ea65af285e4db69a3bd6fbcb553bf4"
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "8110000000012833076",
    "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": "8101170111",
    "payment_link": null,
    "profile_id": "pro_8OqPL5PekR8mRXU8WZZs",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_48b4pLXImpTC9wJALk91",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-21T08:52:13.180Z",
    "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-21T08:37:15.983Z",
    "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": true
}
```
### capture partial 

```json
{
    "payment_id": "pay_t82V58k4cohYq87gBvGL",
    "merchant_id": "merchant_1755675958",
    "status": "partially_captured",
    "amount": 300,
    "net_amount": 300,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 150,
    "connector": "nuvei",
    "client_secret": "pay_t82V58k4cohYq87gBvGL_secret_CHN75ZbLuZWVBKYTITqg",
    "created": "2025-08-21T08:37:13.180Z",
    "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": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "7394",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "453173",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "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_yUVtqVsfxyKqmAM4fl1H",
    "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": "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": "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": "8110000000012833218",
    "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": "8101170111",
    "payment_link": null,
    "profile_id": "pro_8OqPL5PekR8mRXU8WZZs",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_48b4pLXImpTC9wJALk91",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-08-21T08:52:13.180Z",
    "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-21T08:37:57.428Z",
    "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": true
}
```

</details>




### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables






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