Skip to content

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

fix(ucs): align Superposition keys and merchant dimension (#15233)

Amitsingh Tanwar70c1fb2c47c1
diff --git a/config/superposition_seed.toml b/config/superposition_seed.toml
index b039b70d60..47e0aeef81 100644
--- a/config/superposition_seed.toml
+++ b/config/superposition_seed.toml
@@ -2728,10 +2728,10 @@ pt_mapping_outgoing_connector_webhooks = { value = { default_mapping = { frequen
], type = "string" }, description = "Controls whether payment processing continues when an applicable pre-FRM check fails", change_reason = "Initial setup" }
-ucs_enabled = { value = "enabled", schema = { type = "string", enum = ["disabled", "enabled", "shadow_disabled"] }, description = "UCS mode: disabled (off), enabled (on with shadow allowed), shadow_disabled (on but shadow traffic stopped)", change_reason = "Initial setup" }
-ucs_rollout_config = { value = { rollout_percent = 0.0, execution_mode = "shadow", kill_switch_enabled = false, kill_switch_threshold = 1 }, schema = { type = "object" }, description = "UCS rollout configuration controlling traffic routing percentage to Unified Connector Service", change_reason = "Initial setup" }
+"ucs.enabled" = { value = "enabled", schema = { type = "string", enum = ["disabled", "enabled", "shadow_disabled"] }, description = "UCS mode: disabled (off), enabled (on with shadow allowed), shadow_disabled (on but shadow traffic stopped)", change_reason = "Initial setup" }
+"ucs.rollout_config" = { value = { rollout_percent = 0.0, execution_mode = "shadow", kill_switch_enabled = false, kill_switch_threshold = 1 }, schema = { type = "object" }, description = "UCS rollout configuration controlling traffic routing percentage to Unified Connector Service", change_reason = "Initial setup" }
-ucs_shadow_kill_switch_threshold = { value = 1, schema = { type = "integer", minimum = 1, maximum = 9223372036854775807 }, description = "Global shadow request-failure count at which UCS shadow proxying stops; shadow_disabled also stops shadow traffic independently", change_reason = "UCS shadow kill switch threshold" }
+"ucs.shadow_kill_switch_threshold" = { value = 1, schema = { type = "integer", minimum = 1, maximum = 9223372036854775807 }, description = "Global shadow request-failure count at which UCS shadow proxying stops; shadow_disabled also stops shadow traffic independently", change_reason = "UCS shadow kill switch threshold" }
[dimensions]
flow_name = { position = 21, schema = { type = "string" }, type = "REGULAR", description = "Payment flow name (e.g. Authorize, PSync, Execute, RSync, Webhooks)", change_reason = "Initial setup" }
diff --git a/crates/router/src/consts.rs b/crates/router/src/consts.rs
index cd6e491ef6..4222f625cb 100644
--- a/crates/router/src/consts.rs
+++ b/crates/router/src/consts.rs
@@ -610,11 +610,11 @@ pub mod superposition {
/// save wallet decrypted data in locker
pub const SAVE_WALLET_DECRYPTED_DATA: &str = "vaulting.save_wallet_decrypted_data";
/// UCS rollout configuration key (contains RolloutConfig with percentage, URLs, etc.)
- pub const UCS_ROLLOUT_CONFIG: &str = "ucs_rollout_config";
+ pub const UCS_ROLLOUT_CONFIG: &str = "ucs.rollout_config";
/// Global request-failure threshold for the UCS shadow kill switch.
- pub const UCS_SHADOW_KILL_SWITCH_THRESHOLD: &str = "ucs_shadow_kill_switch_threshold";
+ pub const UCS_SHADOW_KILL_SWITCH_THRESHOLD: &str = "ucs.shadow_kill_switch_threshold";
/// UCS enabled configuration key (controls UCS mode: disabled, enabled, shadow_disabled)
- pub const UCS_ENABLED: &str = "ucs_enabled";
+ pub const UCS_ENABLED: &str = "ucs.enabled";
/// checkout sdk configuration
pub const CHECKOUT_SDK: &str = "checkout_sdk";
/// Pre-FRM failure handling mode
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rs
index 60e395b89b..cb97a0bc83 100644
--- a/crates/router/src/core/unified_connector_service.rs
+++ b/crates/router/src/core/unified_connector_service.rs
@@ -1705,7 +1705,7 @@ fn build_rollout_keys_and_context(
// Build base context (common for all flows)
let mut context = superposition::ConfigContext::new()
.with("organization_id", org_id)
- .with("provider_merchant_id", merchant_id)
+ .with("processor_merchant_id", merchant_id)
.with("connector", connector_name)
.with("flow_name", flow_name);
@@ -1782,7 +1782,7 @@ fn build_rollout_keys_and_context_for_payouts(
.unwrap_or_else(|| "unknown".to_string());
let context = superposition::ConfigContext::new()
- .with("provider_merchant_id", merchant_id)
+ .with("processor_merchant_id", merchant_id)
.with("connector", connector_name)
.with("flow_name", flow_name)
.with("payment_method_type", &pmt);