Add base url prefix to Frames SDK for multi-region#552
Merged
ehab-al-cko merged 8 commits intomainfrom Mar 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for an optional baseURLPrefix to enable multi-region API routing by constructing prefixed API hosts (e.g. msdd.api.checkout.com) and plumbing that option through Frames UI components down into the core Checkout networking layer.
Changes:
- Introduces
baseURLPrefixinto Frames configuration/models and forwards it intoCheckoutAPIService. - Adds
EnvironmentURLProviderto build prefixed base URLs (with trimming + fallback behavior) and updates request building to use it. - Updates Risk SDK dependency/imports to
RiskSDK(and updates resolved package versions accordingly).
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/Mocks/StubCheckoutAPIService.swift | Updates mock initializer signature to match new API surface. |
| Source/UI/SecurityCodeComponent/SecurityCodeComponentConfiguration.swift | Adds baseURLPrefix to Security Code component configuration and documents behavior. |
| Source/UI/SecurityCodeComponent/SecurityCodeComponent.swift | Passes baseURLPrefix into CheckoutAPIService creation. |
| Source/UI/PaymentForm/Model/PaymentFormConfiguration.swift | Adds baseURLPrefix to payment form configuration and forwards it for API calls. |
| Source/UI/PaymentForm/Factory/PaymentFormFactory.swift | Wires baseURLPrefix into CheckoutAPIService for payment form flows. |
| Source/Core/CheckoutAPIService.swift | Extends Frames-layer CheckoutAPIService initializer/protocol to accept baseURLPrefix. |
| Package.swift | Bumps checkout-risk-sdk-ios dependency version. |
| Package.resolved | Updates locked revisions/versions for Risk SDK (and related resolved packages). |
| CheckoutTests/Stubs/StubRisk.swift | Updates test import to RiskSDK. |
| CheckoutTests/Stubs/StubBaseURLProvider.swift | Adjusts stub to conform to updated BaseURLProviding optional URL. |
| CheckoutTests/Model/EnvironmentTests.swift | Adds unit tests for prefixed/trimmed base URL generation. |
| Checkout/Source/Tokenisation/CheckoutAPIService.swift | Adds baseURLPrefix to initializer and uses EnvironmentURLProvider for request construction. |
| Checkout/Source/Network/RequestFactory.swift | Updates URL creation to handle optional base URL provider output. |
| Checkout/Source/Model/Environment.swift | Adds EnvironmentURLProvider and host-building logic for prefixed base URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5702d15 to
62a508f
Compare
tinashe-makuti-cko
approved these changes
Mar 5, 2026
...PM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Show resolved
Hide resolved
tinashe-makuti-cko
approved these changes
Mar 5, 2026
ali-farhadi-cko
previously approved these changes
Mar 5, 2026
1ef3cbc to
23f998e
Compare
23f998e to
103dcc1
Compare
tinashe-makuti-cko
previously approved these changes
Mar 6, 2026
ali-farhadi-cko
previously approved these changes
Mar 6, 2026
b06386b to
2e58ed6
Compare
2e58ed6 to
40976a9
Compare
ali-farhadi-cko
previously approved these changes
Mar 6, 2026
23410a0
tinashe-makuti-cko
approved these changes
Mar 6, 2026
ali-farhadi-cko
approved these changes
Mar 6, 2026
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.
Issue
PIMOB-4370
Proposed changes
Adds support for an optional baseURLPrefix to enable multi-region API routing by constructing prefixed API hosts (e.g. msdd.api.checkout.com) and plumbing that option through Frames UI components down into the core Checkout networking layer.
Changes:
Introduces baseURLPrefix into Frames configuration/models and forwards it into CheckoutAPIService.
Adds EnvironmentURLProvider to build prefixed base URLs (with trimming + fallback behavior) and updates request building to use it.
Updates Risk SDK dependency/imports to RiskSDK (and updates resolved package versions accordingly).