feat(ucs): Add profile ID to lineage tracking in Unified Connector Service#9559
Merged
likhinbopanna merged 8 commits intomainfrom Sep 30, 2025
Merged
feat(ucs): Add profile ID to lineage tracking in Unified Connector Service#9559likhinbopanna merged 8 commits intomainfrom
likhinbopanna merged 8 commits intomainfrom
Conversation
Changed Files
|
jarnura
requested changes
Sep 25, 2025
| use common_utils::id_type::ProfileId; | ||
|
|
||
| pub use crate::{ | ||
| business_profile::Profile, merchant_account::MerchantAccount, |
Member
There was a problem hiding this comment.
Suggested change
| business_profile::Profile, merchant_account::MerchantAccount, | |
| business_profile, merchant_account, |
|
|
||
| pub use crate::{ | ||
| business_profile::Profile, merchant_account::MerchantAccount, | ||
| merchant_key_store::MerchantKeyStore, |
Member
There was a problem hiding this comment.
Suggested change
| merchant_key_store::MerchantKeyStore, | |
| merchant_key_store, |
| @@ -1,4 +1,9 @@ | |||
| pub use crate::{merchant_account::MerchantAccount, merchant_key_store::MerchantKeyStore}; | |||
| use common_utils::id_type::ProfileId; | |||
Member
There was a problem hiding this comment.
Suggested change
| use common_utils::id_type::ProfileId; | |
| use common_utils::id_type; |
2 tasks
sai-harsha-vardhan
approved these changes
Sep 26, 2025
jarnura
approved these changes
Sep 26, 2025
2 tasks
pixincreate
added a commit
that referenced
this pull request
Sep 30, 2025
…pay-new-field * 'main' of github.com:juspay/hyperswitch: (21 commits) feat(payments): add tokenization action handling to payment flow for braintree (#9506) feat(connector): [Loonio] Add template code (#9586) fix(connector): [paysafe] make `eci_indicator` field optional (#9591) fix(core): add should_call_connector_customer function to connector specification (#9569) feat(ucs): Add profile ID to lineage tracking in Unified Connector Service (#9559) feat(core): Add support for partial auth in proxy payments [V2] (#9503) chore(version): 2025.09.30.0 fix(authorizedotnet): refund via ucs missing connector_metadata (#9581) feat(auth): add new authentication to communicate between microservices (#9547) Fix: Ideal Giropay Country Currency Config (#9552) feat(connector): [ACI] cypress added (#9502) feat(connector): Add Peachpayments Cypress (#9573) chore(version): 2025.09.29.0 feat(finix): template code (#9557) feat(cypress): add cypress test-cases for manual retry (#9505) feat(core): update additional payment method data in psync response (#9519) feat(connector): [Checkout] Add Google Pay Predecrypt Flow (#9130) feat(framework): Added smithy, smithy-core and smithy-generator crates (#9249) fix(core): add request_extended_authorization in the payment attempt and populate it in the payment response (#9492) chore(version): 2025.09.26.0 ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR enhances the Unified Connector Service (UCS) by adding profile ID tracking to the lineage system. Previously, the lineage tracking only included merchant IDs, but now it includes both merchant ID and profile ID to provide better traceability and context for payment operations.
Key Changes:
Enhanced LineageIds Structure: Updated the
LineageIdsstruct incrates/external_services/src/grpc_client.rsto include bothmerchant_idandprofile_idfields.Updated UCS Header Builder: Modified the gRPC header builder types to include lineage IDs at the intermediate stage, ensuring profile IDs are properly propagated through the system.
Payment Flow Integration: Updated multiple payment flow functions in
crates/router/src/core/payments.rsto create and pass lineage IDs containing both merchant and profile information when calling UCS.Flow Trait Updates: Enhanced the payment flow traits in
crates/router/src/core/payments/flows.rsto accept and handle lineage IDs in UCS calls.Constants Addition: Added a new constant
PROFILE_ID_UNAVAILABLEincrates/router/src/consts.rsfor handling cases where profile ID is not available.Additional Changes
Files Modified:
crates/external_services/src/grpc_client.rs- LineageIds structure and gRPC header buildercrates/router/src/consts.rs- Added PROFILE_ID_UNAVAILABLE constantcrates/router/src/core/payments.rs- Updated UCS calls to include lineage IDscrates/router/src/core/payments/flows.rs- Flow trait updates for lineage ID supportcrates/router/src/core/payments/flows/authorize_flow.rs- Authorize flow lineage ID integrationMotivation and Context
The enhancement is required to improve traceability and debugging capabilities in the Unified Connector Service. By including profile ID in the lineage tracking, we can:
This change supports the broader initiative to improve the observability and traceability of payment operations throughout the Hyperswitch system.
How did you test it?
unit test cases result:

The changes have been tested by:
Checklist
cargo +nightly fmt --allcargo clippy