Skip to content

feat(core): Added mandate_id flow support in HS<>UCS#10399

Merged
likhinbopanna merged 5 commits intomainfrom
ucs-setup-mandate
Nov 27, 2025
Merged

feat(core): Added mandate_id flow support in HS<>UCS#10399
likhinbopanna merged 5 commits intomainfrom
ucs-setup-mandate

Conversation

@Saptak88
Copy link
Contributor

@Saptak88 Saptak88 commented Nov 21, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR introduces enhancements to the HS<>UCS setup_mandate flow, along with a new Cypress test for ZeroAuthMandate.

Changes Included:

  • In crates/hyperswitch_domain_models/src/router_request_types.rs, the customer's name is now passed to the ConnectorCustomerData during the setup mandate flow matching the Authorize flow.

  • In setup_mandate_flow the field connector_response from unified connector service is added to router_data.

  • The UcsSetupMandateResponseData struct in crates/router/src/types.rs has been updated to include the connector_response.

  • The handle_unified_connector_service_response_for_payment_register function in crates/router/src/core/unified_connector_service.rs now extracts and returns the connector_response.

  • In crates/router/src/core/unified_connector_service/transformers.rs, the logic for determining customer_acceptance has been modified to handle both legacy mandate_id and current pm_id flows.

  • Minor variable renaming in crates/router/src/core/payments/flows/authorize_flow.rs for better clarity.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Tested via HS<>UCS with diff checker
cypress 00015-ZeroAuthMandate.cy.js
Screenshot 2025-11-27 at 6 50 32 PM

Screenshot 2025-11-21 at 7 29 31 PM Screenshot 2025-11-21 at 7 30 12 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@Saptak88 Saptak88 requested review from a team as code owners November 21, 2025 13:09
@semanticdiff-com
Copy link

semanticdiff-com bot commented Nov 21, 2025

@Saptak88 Saptak88 self-assigned this Nov 21, 2025
@Saptak88 Saptak88 changed the title feat(core): Add mandate_id flow support in HS<>UCS feat(core): Added mandate_id flow support in HS<>UCS Nov 21, 2025
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@fc26034). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...src/core/unified_connector_service/transformers.rs 0.00% 13 Missing ⚠️
...uter/src/core/payments/flows/setup_mandate_flow.rs 0.00% 3 Missing ⚠️
...rates/router/src/core/unified_connector_service.rs 0.00% 3 Missing ⚠️
...s/router/src/core/payments/flows/authorize_flow.rs 0.00% 2 Missing ⚠️
...erswitch_domain_models/src/router_request_types.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10399   +/-   ##
=======================================
  Coverage        ?    6.47%           
=======================================
  Files           ?     1249           
  Lines           ?   310672           
  Branches        ?        0           
=======================================
  Hits            ?    20106           
  Misses          ?   290566           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AmitsinghTanwar007
Copy link
Contributor

LGTM
not reviewed the cypress part

jarnura
jarnura previously approved these changes Nov 24, 2025
@Saptak88 Saptak88 dismissed stale reviews from jarnura and AmitsinghTanwar007 via eec0cce November 24, 2025 10:04
@Saptak88 Saptak88 removed the request for review from a team November 25, 2025 09:02
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit 7bd663d Nov 27, 2025
33 of 35 checks passed
@likhinbopanna likhinbopanna deleted the ucs-setup-mandate branch November 27, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for mandate_id based ZeroAuthMandate flow in Hyperswitch<>UCS

4 participants