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

feat(connector): Implement UCS based default implementation for Truelayer (#11308)

Vani Gupta7215097fec50
diff --git a/config/config.example.toml b/config/config.example.toml
index 42554806d9..b34d1a29ca 100644
--- a/config/config.example.toml
+++ b/config/config.example.toml
@@ -1313,7 +1313,7 @@ url = "http://localhost:8080" # Open Router URL
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
[grpc_client.recovery_decider_client] # Revenue recovery client base url
diff --git a/config/deployments/env_specific.toml b/config/deployments/env_specific.toml
index e5e74d07bd..ee742aa1b3 100644
--- a/config/deployments/env_specific.toml
+++ b/config/deployments/env_specific.toml
@@ -406,7 +406,7 @@ connector_names = "connector_names" # Comma-separated list of allowed connec
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000" # Unified Connector Service Base URL
connection_timeout = 10 # Connection Timeout Duration in Seconds
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
[revenue_recovery]
diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.toml
index 92bab54d03..7d9f922bf0 100644
--- a/config/deployments/integration_test.toml
+++ b/config/deployments/integration_test.toml
@@ -988,7 +988,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/deployments/production.toml b/config/deployments/production.toml
index 148959915e..81675a4aaf 100644
--- a/config/deployments/production.toml
+++ b/config/deployments/production.toml
@@ -993,7 +993,7 @@ click_to_pay = {connector_list = "adyen, cybersource, trustpay"}
connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.toml
index 92eb75eba6..c8cbd7046d 100644
--- a/config/deployments/sandbox.toml
+++ b/config/deployments/sandbox.toml
@@ -1003,7 +1003,7 @@ connector_list = "juspaythreedsserver, ctp_mastercard, ctp_visa"
connector_list = "worldpayvantiv"
[grpc_client.unified_connector_service]
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
# Merchant Advice Code Configuration
diff --git a/config/development.toml b/config/development.toml
index 9124712b77..a40b32f261 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -1443,7 +1443,7 @@ enabled = "true"
[grpc_client.unified_connector_service]
base_url = "http://localhost:8000"
connection_timeout = 10
-ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3" # Comma-separated list of connectors that use UCS only
+ucs_only_connectors = "paytm, phonepe, hyperpg, revolv3, truelayer" # Comma-separated list of connectors that use UCS only
ucs_psync_disabled_connectors = "cashtocode" # Comma-separated list of connectors to disable UCS PSync call
[revenue_recovery]
diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml
index b2a654dbf5..ded4f1108e 100644
--- a/crates/connector_configs/toml/development.toml
+++ b/crates/connector_configs/toml/development.toml
@@ -7749,6 +7749,38 @@ payment_method_type = "Maestro"
[finix.connector_webhook_details]
merchant_secret="Source verification key"
+[truelayer]
+[truelayer.connector_auth.BodyKey]
+api_key = "Client ID"
+key1 = "Client Secret"
+[[truelayer.bank_redirect]]
+payment_method_type = "open_banking_uk"
+
+[truelayer.metadata.kid]
+name = "kid"
+label = "KID"
+placeholder = "Enter your KID"
+required = true
+type = "Text"
+[truelayer.metadata.merchant_account_id]
+name = "merchant_account_id"
+label = "Merchant Account ID"
+placeholder = "Enter your Merchant Account ID"
+required = true
+type = "Text"
+[truelayer.metadata.account_holder_name]
+name = "account_holder_name"
+label = "Account Holder Name"
+placeholder = "Enter your Account Holder Name"
+required = true
+type = "Text"
+[truelayer.metadata.private_key]
+name = "private_key"
+label = "Private Key (Base64 encoded)"
+placeholder = "Enter your Private Key(Base64 encoded)"
+required = true
+type = "Text"
+
[loonio]
[loonio.connector_auth.BodyKey]
api_key = "Merchant ID"
diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml
index 1b288c28ed..32f0fe3483 100644
--- a/crates/connector_configs/toml/production.toml
+++ b/crates/connector_configs/toml/production.toml
@@ -7046,6 +7046,38 @@ placeholder = "Enter your Private Key(Base64 encoded)"
required = true
type = "Text"
+[truelayer]
+[truelayer.connector_auth.BodyKey]
+api_key = "Client ID"
+key1 = "Client Secret"
+[[truelayer.bank_redirect]]
+payment_method_type = "open_banking_uk"
+
+[truelayer.metadata.kid]
+name = "kid"
+label = "KID"
+placeholder = "Enter your KID"
+required = true
+type = "Text"
+[truelayer.metadata.merchant_account_id]
+name = "merchant_account_id"
+label = "Merchant Account ID"
+placeholder = "Enter your Merchant Account ID"
+required = true
+type = "Text"
+[truelayer.metadata.account_holder_name]
+name = "account_holder_name"
+label = "Account Holder Name"
+placeholder = "Enter your Account Holder Name"
+required = true
+type = "Text"
+[truelayer.metadata.private_key]
+name = "private_key"
+label = "Private Key (Base64 encoded)"
+placeholder = "Enter your Private Key(Base64 encoded)"
+required = true
+type = "Text"
+
[revolv3]
[[revolv3.credit]]
payment_method_type = "Mastercard"
diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml
index 629dab5804..cecc899a9a 100644
--- a/crates/connector_configs/toml/sandbox.toml
+++ b/crates/connector_configs/toml/sandbox.toml
@@ -8137,6 +8137,38 @@ placeholder = "Enter your Private Key(Base64 encoded)"
required = true
type = "Text"
+[truelayer]
+[truelayer.connector_auth.BodyKey]
+api_key = "Client ID"
+key1 = "Client Secret"
+[[truelayer.bank_redirect]]
+payment_method_type = "open_banking_uk"
+
+[truelayer.metadata.kid]
+name = "kid"
+label = "KID"
+placeholder = "Enter your KID"
+required = true
+type = "Text"
+[truelayer.metadata.merchant_account_id]
+name = "merchant_account_id"
+label = "Merchant Account ID"
+placeholder = "Enter your Merchant Account ID"
+required = true
+type = "Text"
+[truelayer.metadata.account_holder_name]
+name = "account_holder_name"
+label = "Account Holder Name"
+placeholder = "Enter your Account Holder Name"
+required = true
+type = "Text"
+[truelayer.metadata.private_key]
+name = "private_key"
+label = "Private Key (Base64 encoded)"
+placeholder = "Enter your Private Key(Base64 encoded)"
+required = true
+type = "Text"
+
[revolv3]
[[revolv3.credit]]
payment_method_type = "Mastercard"
diff --git a/crates/hyperswitch_connectors/src/connectors/truelayer.rs b/crates/hyperswitch_connectors/src/connectors/truelayer.rs
index 3960c8b3d5..10bf8bca0b 100644
--- a/crates/hyperswitch_connectors/src/connectors/truelayer.rs
+++ b/crates/hyperswitch_connectors/src/connectors/truelayer.rs
@@ -1066,4 +1066,14 @@ impl ConnectorSpecifications for Truelayer {
fn get_supported_webhook_flows(&self) -> Option<&'static [enums::EventClass]> {
Some(&TRUELAYER_SUPPORTED_WEBHOOK_FLOWS)
}
+
+ #[cfg(feature = "v1")]
+ fn generate_connector_customer_id(
+ &self,
+ _customer_id: &Option<common_utils::id_type::CustomerId>,
+ _merchant_id: &common_utils::id_type::MerchantId,
+ ) -> Option<String> {
+ let connector_customer_id = uuid::Uuid::new_v4().to_string();
+ Some(connector_customer_id)
+ }
}