Migrate Accelerated Checkout to Storefront API 2025-07; unify cart completion errors & prepare-stage handling#538
Merged
kieran-osgood-shopify merged 1 commit intomainfrom Mar 27, 2026
Conversation
Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/SchemaMetadata.graphql.swift
Show resolved
Hide resolved
...egration/MobileBuyIntegration.xcodeproj/xcshareddata/xcschemes/MobileBuyIntegration.xcscheme
Outdated
Show resolved
Hide resolved
Samples/MobileBuyIntegration/MobileBuyIntegration.xcodeproj/project.pbxproj
Outdated
Show resolved
Hide resolved
4b6378a to
d47ce44
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
71cede9 to
9967300
Compare
9967300 to
524ce92
Compare
524ce92 to
37a7c0e
Compare
78098e2 to
ff03083
Compare
cf8ce1b to
ac8be1b
Compare
ff03083 to
5123e02
Compare
ac8be1b to
ace8ef8
Compare
5123e02 to
8269be8
Compare
8269be8 to
ba372a1
Compare
ace8ef8 to
5c0c208
Compare
5c0c208 to
248488f
Compare
This was referenced Mar 25, 2026
...allets/ApplePay/ApplePayAuthorizationDelegate/ApplePayAuthorizationDelegate+Controller.swift
Outdated
Show resolved
Hide resolved
| // If the only error is paymentsUnacceptablePaymentAmount, return it | ||
| // MARK: - Helpers | ||
|
|
||
| private static let applePayResolvableViolationCodes: Set<StorefrontAPI.CartCompletionErrorCode> = [ |
Contributor
Author
There was a problem hiding this comment.
This feels like something we should maintain and share in collab on the backend with wallets on web
markmur
reviewed
Mar 26, 2026
| let result = try await controller.storefront.cartPrepareForCompletion(id: id) | ||
| try setCart(to: result.cart) | ||
| return result.cart | ||
| } catch let error as StorefrontAPI.Errors { |
Contributor
There was a problem hiding this comment.
Do we need to catch non-response errors? i.e network timeouts, decode failures etc
Contributor
Author
There was a problem hiding this comment.
Any other error will follow the existing error handling which will be caught and handled in the callsite (those indicate an unexpected error and will abort to checkout kit)
markmur
approved these changes
Mar 26, 2026
6e79928 to
187eb31
Compare
187eb31 to
37178a2
Compare
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.

Summary
Why
Storefront API 2025-04 is deprecated next months
Traffic will then re-route to 2025-07
2025-07 contains breaking changes in behaviour, where 'userErrors' previously surfaced in
cartSubitForCompletion, duringdidAuthorizethey will now surface duringcartPrepareForCompletionHow
cartPrepareForCompletionso that it would no longer throw a generic error when userErrors are returned.ErrorHandlerto handle prepare for completion responsesErrorHandler.filterApplePayResolvableViolations- I intend to refactor this area in future to make it clearer but the intent here is that violations that can be resolved in the sheet will not cause an action.interrupt.