Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(ucs): UCS shadow-diff parity fixes (#12610)
Tushar Shukla0bcd5e88ca14
diff --git a/Cargo.lock b/Cargo.lockindex d41625842c..897e2b4099 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1550,7 +1550,7 @@ dependencies = ["bitflags 2.9.0","cexpr","clang-sys",- "itertools 0.13.0",+ "itertools 0.10.5","log 0.4.27","prettyplease","proc-macro2",@@ -2264,7 +2264,7 @@ dependencies = [[[package]]name = "config_patch_derive"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["proc-macro2","quote",@@ -3981,7 +3981,7 @@ checksum = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57"[[package]]name = "grpc-api-types"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["axum 0.8.4","bytes 1.10.1",@@ -5077,15 +5077,6 @@ dependencies = ["either",]-[[package]]-name = "itertools"-version = "0.13.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"-dependencies = [- "either",-]-[[package]]name = "itoa"version = "1.0.15"@@ -6844,7 +6835,7 @@ dependencies = ["regex-cache","serde","serde_derive",- "strum 0.26.3",+ "strum 0.25.0","thiserror 1.0.69",]@@ -7165,8 +7156,8 @@ version = "0.14.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7"dependencies = [- "heck 0.5.0",- "itertools 0.13.0",+ "heck 0.4.1",+ "itertools 0.10.5","log 0.4.27","multimap","petgraph",@@ -7187,7 +7178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"dependencies = ["anyhow",- "itertools 0.13.0",+ "itertools 0.10.5","proc-macro2","quote","syn 2.0.101",@@ -7200,7 +7191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b"dependencies = ["anyhow",- "itertools 0.13.0",+ "itertools 0.10.5","proc-macro2","quote","syn 2.0.101",@@ -8184,7 +8175,7 @@ dependencies = [[[package]]name = "rust-grpc-client"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["grpc-api-types",]@@ -11018,7 +11009,7 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"[[package]]name = "ucs_cards"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["bytes 1.10.1","error-stack 0.4.1",@@ -11034,7 +11025,7 @@ dependencies = [[[package]]name = "ucs_common_enums"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["serde","strum 0.26.3",@@ -11045,7 +11036,7 @@ dependencies = [[[package]]name = "ucs_common_utils"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.05.25.0#7707061b2d360f943ff59d169ed605ca91a99fc6"+source = "git+https://github.com/juspay/connector-service?tag=2026.06.08.1#e4d6fadca056982c4e89f4c3d595c2631dfa2be6"dependencies = ["anyhow","base64 0.21.7",diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.tomlindex 942791cce5..d041c3dabd 100644--- a/crates/external_services/Cargo.toml+++ b/crates/external_services/Cargo.toml@@ -74,7 +74,7 @@ http = "0.2.12"url = { version = "2.5.4", features = ["serde"] }quick-xml = { version = "0.31.0", features = ["serialize"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.05.25.0", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.06.08.1", package = "rust-grpc-client" }open-feature = { version = "0.2.5", optional = true }superposition_provider = { version = "0.102.0", optional = true}superposition_types = "0.102.0"diff --git a/crates/hyperswitch_interfaces/Cargo.toml b/crates/hyperswitch_interfaces/Cargo.tomlindex 8399fc4366..67f5c5325d 100644--- a/crates/hyperswitch_interfaces/Cargo.toml+++ b/crates/hyperswitch_interfaces/Cargo.toml@@ -33,7 +33,7 @@ time = "0.3.41"tonic = "0.14"url = { version = "2.5.4", features = ["serde"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.05.25.0", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.06.08.1", package = "rust-grpc-client" }tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }# First party cratesdiff --git a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rsindex 0986dd7f82..b23b122e23 100644--- a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs+++ b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs@@ -328,7 +328,7 @@ impl ForeignTryFrom<(payments_grpc::PaymentServiceGetResponse, AttemptStatus)>mandate_reference: Box::new(response.mandate_reference.map(hyperswitch_domain_models::router_response_types::MandateReference::foreign_try_from).transpose()?),connector_metadata: None,network_txn_id: response.network_transaction_id.clone(),- network_txn_link_id: None,+ network_txn_link_id: response.network_txn_link_id.clone(),connector_response_reference_id: response.merchant_transaction_id,incremental_authorization_allowed: response.incremental_authorization_allowed,authentication_data: None,@@ -835,7 +835,11 @@ impl ForeignTryFrom<payments_grpc::RedirectForm> for RedirectForm {}.attach_printable("Failed to parse currency from UCS Nmi redirect form")?;Ok(Self::Nmi {- amount: amount_money.minor_amount.to_string(),+ amount: common_utils::types::MinorUnit::new(amount_money.minor_amount)+ .to_major_unit_as_f64(currency)+ .change_context(UnifiedConnectorServiceError::ParsingFailed)?+ .get_amount_as_f64()+ .to_string(),currency,public_key: hyperswitch_masking::Secret::new(nmi.public_keydiff --git a/crates/router/Cargo.toml b/crates/router/Cargo.tomlindex bb9a2c600e..ac6934456c 100644--- a/crates/router/Cargo.toml+++ b/crates/router/Cargo.toml@@ -91,8 +91,8 @@ ring = "0.17.14"rust_decimal = { version = "1.37.1", features = ["serde-with-float", "serde-with-str"] }rust-i18n = { git = "https://github.com/kashif-m/rust-i18n", rev = "f2d8096aaaff7a87a847c35a5394c269f75e077a" }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.05.25.0", package = "rust-grpc-client" }-unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.05.25.0", package = "ucs_cards" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.06.08.1", package = "rust-grpc-client" }+unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.06.08.1", package = "ucs_cards" }rustc-hash = "1.1.0"rustls = "0.22"rustls-pemfile = "2"diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rsindex 027810c4a1..80ef196477 100644--- a/crates/router/src/core/unified_connector_service.rs+++ b/crates/router/src/core/unified_connector_service.rs@@ -1603,6 +1603,7 @@ pub fn build_unified_connector_service_payment_method(social_security_number: boleto_data.social_security_number.map(|ssn| ssn.expose()),+ expiration_date: boleto_data.due_date.clone(),},)),})diff --git a/crates/router/src/core/unified_connector_service/connector_config.rs b/crates/router/src/core/unified_connector_service/connector_config.rsindex 65f4bba908..daf5a3494f 100644--- a/crates/router/src/core/unified_connector_service/connector_config.rs+++ b/crates/router/src/core/unified_connector_service/connector_config.rs@@ -47,6 +47,14 @@ pub struct CybersourceMetadata {pub struct BraintreeMetadata {merchant_account_id: Secret<String>,merchant_config_currency: String,+ #[serde(default)]+ apple_pay_supported_networks: Vec<String>,+ #[serde(default)]+ apple_pay_merchant_capabilities: Vec<String>,+ #[serde(default)]+ gpay_allowed_auth_methods: Vec<String>,+ #[serde(default)]+ gpay_allowed_card_networks: Vec<String>,}#[derive(Debug, serde::Deserialize)]@@ -122,6 +130,10 @@ pub enum ConnectorSpecificConfig {private_key: Secret<String>,merchant_account_id: Secret<String>,merchant_config_currency: Option<String>,+ apple_pay_supported_networks: Vec<String>,+ apple_pay_merchant_capabilities: Vec<String>,+ gpay_allowed_auth_methods: Vec<String>,+ gpay_allowed_card_networks: Vec<String>,},/// Cybersource connector configurationCybersource {@@ -625,6 +637,11 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>private_key: api_secret.clone(),merchant_account_id: braintree_meta.merchant_account_id,merchant_config_currency: Some(braintree_meta.merchant_config_currency),+ apple_pay_supported_networks: braintree_meta.apple_pay_supported_networks,+ apple_pay_merchant_capabilities: braintree_meta+ .apple_pay_merchant_capabilities,+ gpay_allowed_auth_methods: braintree_meta.gpay_allowed_auth_methods,+ gpay_allowed_card_networks: braintree_meta.gpay_allowed_card_networks,})}_ => Err(err("Braintree requires SignatureKey auth type")),@@ -1333,8 +1350,8 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>} => Ok(Self::Finix {finix_user_name: api_key.clone(),finix_password: api_secret.clone(),- merchant_identity_id: key1.clone(),- merchant_id: key2.clone(),+ merchant_identity_id: key2.clone(),+ merchant_id: key1.clone(),}),_ => Err(err("Finix requires MultiAuthKey auth type")),},diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rsindex 15fb45752d..ed985bc2e8 100644--- a/crates/router/src/core/unified_connector_service/transformers.rs+++ b/crates/router/src/core/unified_connector_service/transformers.rs@@ -172,6 +172,7 @@ implphone_number: None,phone_country_code: None,}),+ state: None,})}}@@ -724,6 +725,14 @@ impl transformers::ForeignTryFrom<&RouterData<PSync, PaymentsSyncData, PaymentsR.map(payments_grpc::PaymentExperience::foreign_from).map(Into::into),merchant_request_id: None,+ // Send the payment method type so connectors that need it on sync+ // (e.g. Adyen, to build connector_response) can populate it.+ payment_method_type: router_data+ .request+ .payment_method_type+ .map(payments_grpc::PaymentMethodType::foreign_try_from)+ .transpose()?+ .map(|payment_method_type| payment_method_type.into()),})}}@@ -2189,7 +2198,21 @@ implresource_id: connector_transaction_id,redirection_data: Box::new(redirection_data),mandate_reference: Box::new(None),- connector_metadata: None,+ connector_metadata: response.connector_feature_data.clone().and_then(+ |secret| {+ let exposed = secret.expose();+ serde_json::from_str(&exposed)+ .map_err(|e| {+ tracing::warn!(+ serialization_error = ?e,+ metadata = ?response.connector_feature_data,+ "Failed to parse connector_metadata as JSON value"+ );+ e+ })+ .ok()+ },+ ),network_txn_id: response.network_transaction_id.clone(),network_txn_link_id: None,connector_response_reference_id: response.merchant_order_id.clone(),@@ -2632,7 +2655,10 @@ implstatus_code,attempt_status,connector_transaction_id: connector_transaction_id.get_optional_response_id(),- connector_response_reference_id: None,+ connector_response_reference_id: Some(+ response.merchant_recurring_payment_id.clone(),+ )+ .filter(|s| !s.is_empty()),network_decline_code: error_info.issuer_details.as_ref().and_then(|id| {id.network_details.as_ref()@@ -2682,7 +2708,7 @@ implconnector_metadata,network_txn_id: response.network_transaction_id,network_txn_link_id: None,- connector_response_reference_id: None,+ connector_response_reference_id: Some(response.merchant_recurring_payment_id.clone()),incremental_authorization_allowed: response.incremental_authorization_allowed,authentication_data: None,charges: None,@@ -5281,7 +5307,19 @@ impl)}_ => (- None,+ response.connector_feature_data.clone().and_then(|secret| {+ let exposed = secret.expose();+ serde_json::from_str(&exposed)+ .map_err(|e| {+ tracing::warn!(+ serialization_error = ?e,+ metadata = ?response.connector_feature_data,+ "Failed to parse connector_metadata as JSON value"+ );+ e+ })+ .ok()+ }),Some(RedirectForm::foreign_try_from(redirection_data)).transpose()?,),},@@ -5895,7 +5933,10 @@ impl transformers::ForeignTryFrom<payments_grpc::RefundResponse>.and_then(|cd| cd.reason.clone()),status_code,attempt_status: None,- connector_transaction_id: None,+ connector_transaction_id: error_info+ .connector_details+ .as_ref()+ .and_then(|cd| cd.connector_transaction_id.clone()),connector_response_reference_id: None,network_decline_code: error_info.issuer_details.as_ref().and_then(|id| {id.network_details