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
fix(connector): [JPMorgan] Configure JWT OAuth credentials for UCS (#14808)
Vani Gupta0b53577a5b31
diff --git a/Cargo.lock b/Cargo.lockindex 2ffa8dc819..449bdc9888 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2319,7 +2319,7 @@ dependencies = [[[package]]name = "config_patch_derive"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["proc-macro2","quote",@@ -4333,7 +4333,7 @@ checksum = "32619942b8be646939eaf3db0602b39f5229b74575b67efc897811ded1db4e57"[[package]]name = "grpc-api-types"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["axum 0.8.4","bytes 1.10.1",@@ -8700,7 +8700,7 @@ dependencies = [[[package]]name = "rust-grpc-client"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["grpc-api-types",]@@ -11653,7 +11653,7 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"[[package]]name = "ucs_cards"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["bytes 1.10.1","error-stack 0.4.1",@@ -11669,7 +11669,7 @@ dependencies = [[[package]]name = "ucs_common_enums"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["serde","strum 0.26.3",@@ -11680,7 +11680,7 @@ dependencies = [[[package]]name = "ucs_common_utils"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.10.09.0#11f50032a292f16bd5e0a18db4b3555e2f27567b"+source = "git+https://github.com/juspay/connector-service?tag=2026.10.21.1#1a5f0de424e9505ee97a0a8c3a0f1f31ce7ba816"dependencies = ["anyhow","base64 0.21.7",diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.tomlindex 24fb859420..9d4541d67e 100644--- a/crates/connector_configs/toml/development.toml+++ b/crates/connector_configs/toml/development.toml@@ -3141,9 +3141,12 @@ key2="Certificate Key"payment_method_type = "UnionPay"[[jpmorgan.debit]]payment_method_type = "Visa"-[jpmorgan.connector_auth.BodyKey]+[jpmorgan.connector_auth.MultiAuthKey]api_key="Client ID"-key1="Client Secret"+key1="Certificate Thumbprint"+api_secret="Private Key (Base64 encoded)"+key2="Resource ID"+[jpmorgan.metadata.company_name]name = "company_name"label = "Company Name"diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.tomlindex 6be4e8283e..533e68a64e 100644--- a/crates/connector_configs/toml/production.toml+++ b/crates/connector_configs/toml/production.toml@@ -2762,9 +2762,11 @@ payment_method_type = "Discover"payment_method_type = "UnionPay"[[jpmorgan.debit]]payment_method_type = "Visa"-[jpmorgan.connector_auth.BodyKey]-api_key = "Access Token"-key1 = "Client Secret"+[jpmorgan.connector_auth.MultiAuthKey]+api_key = "Client ID"+key1 = "Certificate Thumbprint"+api_secret = "Private Key (Base64 encoded)"+key2 = "Resource ID"[jpmorgan.metadata.company_name]name = "company_name"label = "Company Name"diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.tomlindex cea6ee4f6c..7caabfcb37 100644--- a/crates/connector_configs/toml/sandbox.toml+++ b/crates/connector_configs/toml/sandbox.toml@@ -3118,9 +3118,11 @@ payment_method_type = "Discover"payment_method_type = "UnionPay"[[jpmorgan.debit]]payment_method_type = "Visa"-[jpmorgan.connector_auth.BodyKey]-api_key = "Access Token"-key1 = "Client Secret"+[jpmorgan.connector_auth.MultiAuthKey]+api_key = "Client ID"+key1 = "Certificate Thumbprint"+api_secret = "Private Key (Base64 encoded)"+key2 = "Resource ID"[jpmorgan.metadata.company_name]name = "company_name"label = "Company Name"diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.tomlindex 015805234c..af1374fc46 100644--- a/crates/external_services/Cargo.toml+++ b/crates/external_services/Cargo.toml@@ -86,7 +86,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.10.09.0", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.21.1", package = "rust-grpc-client" }open-feature = { version = "0.2.5", optional = true }bytes = { version = "1.10.1", optional = true }futures = { version = "0.3.31", optional = true }diff --git a/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs b/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rsindex 564a3e2178..11b71212e4 100644--- a/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs@@ -246,6 +246,8 @@ impl TryFrom<&JpmorganRouterData<&PaymentsAuthorizeRouterData>> for JpmorganPaympub struct JpmorganAuthType {pub(super) _api_key: Secret<String>,pub(super) _key1: Secret<String>,+ pub(super) _api_secret: Option<Secret<String>>,+ pub(super) _key2: Option<Secret<String>>,}impl TryFrom<&ConnectorAuthType> for JpmorganAuthType {@@ -255,6 +257,19 @@ impl TryFrom<&ConnectorAuthType> for JpmorganAuthType {ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self {_api_key: api_key.to_owned(),_key1: key1.to_owned(),+ _api_secret: None,+ _key2: None,+ }),+ ConnectorAuthType::MultiAuthKey {+ api_key,+ key1,+ api_secret,+ key2,+ } => Ok(Self {+ _api_key: api_key.to_owned(),+ _key1: key1.to_owned(),+ _api_secret: Some(api_secret.to_owned()),+ _key2: Some(key2.to_owned()),}),_ => Err(errors::ConnectorError::FailedToObtainAuthType.into()),}diff --git a/crates/hyperswitch_interfaces/Cargo.toml b/crates/hyperswitch_interfaces/Cargo.tomlindex 234e0a8238..2e4d4cae72 100644--- a/crates/hyperswitch_interfaces/Cargo.toml+++ b/crates/hyperswitch_interfaces/Cargo.toml@@ -35,7 +35,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.10.09.0", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.21.1", package = "rust-grpc-client" }tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }# First party cratesdiff --git a/crates/router/Cargo.toml b/crates/router/Cargo.tomlindex ccc6c5e8c9..be015955cb 100644--- a/crates/router/Cargo.toml+++ b/crates/router/Cargo.toml@@ -252,8 +252,8 @@ rust_decimal = { version = "1.37.1", features = [] }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.10.09.0",package = "rust-grpc-client" }-unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.10.09.0", package = "ucs_cards" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.10.21.1",package = "rust-grpc-client" }+unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.10.21.1", package = "ucs_cards" }rustc-hash = "1.1.0"rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs",diff --git a/crates/router/src/core/unified_connector_service/connector_config.rs b/crates/router/src/core/unified_connector_service/connector_config.rsindex 67cb624ce1..4fa69518eb 100644--- a/crates/router/src/core/unified_connector_service/connector_config.rs+++ b/crates/router/src/core/unified_connector_service/connector_config.rs@@ -694,7 +694,9 @@ pub enum ConnectorSpecificConfig {/// Jpmorgan connector configurationJpmorgan {client_id: Secret<String>,- client_secret: Secret<String>,+ thumbprint: Secret<String>,+ private_key: Secret<String>,+ resource_id: Secret<String>,#[serde(skip_serializing_if = "Option::is_none")]company_name: Option<Secret<String>>,#[serde(skip_serializing_if = "Option::is_none")]@@ -1193,25 +1195,38 @@ impl ForeignTryFrom<(Connector, &ConnectorAuthType, Option<&serde_json::Value>)>}),_ => Err(err("Hipay requires BodyKey auth type")),},- Connector::Jpmorgan => match auth {- ConnectorAuthType::BodyKey { api_key, key1 } => {- let jpm_meta = metadata- .map(|m| {- m.clone()- .parse_value::<JpmorganMetadata>("JpmorganMetadata")- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Invalid Jpmorgan metadata format")- })- .transpose()?;- Ok(Self::Jpmorgan {- client_id: api_key.clone(),- client_secret: key1.clone(),- company_name: jpm_meta.as_ref().map(|m| m.company_name.clone()),- product_name: jpm_meta.as_ref().map(|m| m.product_name.clone()),+ Connector::Jpmorgan => {+ let (client_id, thumbprint, private_key, resource_id) = match auth {+ ConnectorAuthType::MultiAuthKey {+ api_key,+ key1,+ api_secret,+ key2,+ } => (+ api_key.clone(),+ key1.clone(),+ api_secret.clone(),+ key2.clone(),+ ),+ _ => return Err(err("Jpmorgan requires MultiAuthKey auth type")),+ };+ let jpm_meta = metadata+ .map(|m| {+ m.clone()+ .parse_value::<JpmorganMetadata>("JpmorganMetadata")+ .change_context(errors::ApiErrorResponse::InternalServerError)+ .attach_printable("Invalid Jpmorgan metadata format")})- }- _ => Err(err("Jpmorgan requires BodyKey auth type")),- },+ .transpose()?;+ Ok(Self::Jpmorgan {+ client_id,+ thumbprint,+ private_key,+ resource_id,+ company_name: jpm_meta.as_ref().map(|m| m.company_name.clone()),+ product_name: jpm_meta.as_ref().map(|m| m.product_name.clone()),+ })+ }Connector::Loonio => match auth {ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Loonio {merchant_id: api_key.clone(),diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rsindex 3315827e27..68fe608504 100644--- a/crates/router/src/core/unified_connector_service/transformers.rs+++ b/crates/router/src/core/unified_connector_service/transformers.rs@@ -1673,6 +1673,12 @@ implcapture_method: capture_method.map(|capture_method| capture_method.into()),webhook_url: router_data.request.webhook_url.clone(),domain_data: None,+ setup_future_usage: None,+ customer_acceptance: None,+ enable_partial_authorization: None,+ payment_channel: None,+ billing_descriptor: None,+ l2_l3_data: None,})}}@@ -1797,6 +1803,12 @@ implcapture_method: capture_method.map(|capture_method| capture_method.into()),webhook_url: router_data.request.webhook_url.clone(),domain_data: None,+ setup_future_usage: None,+ customer_acceptance: None,+ enable_partial_authorization: None,+ payment_channel: None,+ billing_descriptor: None,+ l2_l3_data: None,})}}@@ -2123,6 +2135,7 @@ impl// below silently leaves the field None and the connector rejects the session.connector_order_id: router_data.request.order_id.clone(),test_mode: router_data.test_mode,+ session_token: None,})}}@@ -2232,6 +2245,7 @@ impl// hosted-payment-page 3DS opens its payment session against that Order resource.connector_order_id: router_data.request.order_id.clone(),test_mode: router_data.test_mode,+ session_token: None,})}}@@ -3363,6 +3377,7 @@ implis_account_funding_transaction: None,recipient_details: None,additional_connector_details: None,+ session_token: None,})}}@@ -3683,6 +3698,7 @@ impl.connector_intent_metadata.as_ref().map(payments_grpc::AdditionalConnectorDetails::foreign_from),+ session_token: None,})}}@@ -3800,6 +3816,8 @@ impl}),connector_transaction_id: router_data.request.connector_transaction_id.clone(),merchant_authorization_id: Some(router_data.connector_request_reference_id.clone()),+ additional_amount: None,+ network_transaction_id: None,reason: router_data.request.reason.clone(),connector_feature_data: router_data.request