feat(ucs): Add UCS authentication and post-authentication flows for payment processing#9959
Merged
bernard-eugine merged 62 commits intomainfrom Oct 30, 2025
Merged
Conversation
…low in direct connector flows
…tion from ConnectorSpecification trait
…introduce-new-decide-flow-complete-authorize
…flow-complete-authorize
…-ucs-for-auth-post-auth-in-completeauthorize
…entication-in-authorize
…-ucs-for-auth-post-auth-in-completeauthorize
Base automatically changed from
call-ucs-for-pre-authentication-in-authorize
to
main
October 29, 2025 05:17
jarnura
approved these changes
Oct 29, 2025
sai-harsha-vardhan
approved these changes
Oct 30, 2025
aadityaguptaa
pushed a commit
that referenced
this pull request
Nov 10, 2025
…ayment processing (#9959) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
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 introduces comprehensive support for Unified Connector Service (UCS) authentication and post-authentication flows in the payment processing pipeline. The changes enable seamless integration with UCS for handling payment authentication workflows, particularly for connectors like Cybersource that require multi-step authentication processes.
Key Changes:
New gRPC Client Methods:
payment_authenticate()method inUnifiedConnectorServiceClientpayment_post_authenticate()method inUnifiedConnectorServiceClientAuthentication Flow Implementation:
call_unified_connector_service_authenticate()function for handling authentication requestscall_unified_connector_service_post_authenticate()function for handling post-authentication requestsComplete Authorize Flow Enhancement:
handle_preprocessing_through_unified_connector_service()to support Authenticate and PostAuthenticate flowsData Structure Updates:
PaymentsPostAuthenticateDatato remove redundant fields and improve type safetyClonederive toLineageIdsstruct for better handling in async contextsResponse Transformation:
CybersourceAuthSetupandCybersourceConsumerAuthredirect form typesUCS Integration:
Additional Changes
Motivation and Context
This change is required to enable proper integration with the Unified Connector Service for payment authentication workflows. Many modern payment processors, particularly Cybersource, require multi-step authentication processes that involve:
The existing UCS integration only supported pre-authentication and authorization flows, leaving a gap in handling the complete authentication lifecycle. This PR fills that gap by providing:
This enables merchants to use connectors with complex authentication requirements while maintaining a consistent interface through the UCS abstraction layer.
How did you test it?
The changes were tested through:
Cannot be tested end to end since UCS changes are still pending.
Checklist
cargo +nightly fmt --allcargo clippy