Repository navigation
[RN][Bug]: Forward accelerated checkout dismissal callbacks - #757
Draft
kieran-osgood-shopify wants to merge 3 commits into
Draft
kieran-osgood-shopify wants to merge 3 commits into
kieran-osgood-shopify wants to merge 3 commits into
Conversation
kieran-osgood-shopify
force-pushed
the
swift-accelerated-checkout-dismissals
branch
from
September 11, 2026 09:24
df56213 to
5cc9fde
Compare
kieran-osgood-shopify
added this pull request to stack #763
September 11, 2026 09:24
kieran-osgood-shopify
force-pushed
the
swift-accelerated-checkout-dismissals
branch
from
September 11, 2026 14:51
8450ac7 to
97a1662
Compare
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
Assisted-By: devx/3f0e7f93-212d-45d8-b056-138b2da8389f
2 of 11 tasks
Checkout completion resets the Apple Pay state machine to idle before the buyer closes the confirmation page. The later dismissal attempted idle -> completed and logged InvalidStateTransitionError. Assisted-By: omp
kieran-osgood-shopify
force-pushed
the
swift-accelerated-checkout-dismissals
branch
from
October 7, 2026 11:52
97a1662 to
b02476a
Compare
Bundle Size Budgets
Bundle and package sizeWeb bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.
How sizes are measuredMeasured from the PR base SHA and PR head SHA. Web bundle rows sum shipped |
2 of 11 tasks
kieran-osgood-shopify
removed this pull request from stack #763
October 7, 2026 11:54
kieran-osgood-shopify
added this pull request to stack #933
October 7, 2026 11:54
This branch has not been deployed
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.
What changes are you making?
Forward accelerated checkout lifecycle events from every presentation layer to the existing
EventHandlerscallbacks.CheckoutDelegatewhen Shop Pay or Apple Pay presents Checkout Kit.checkoutDidDismisswhen the buyer closes the native Apple Pay sheet before authorizing payment.Accelerated Checkouts first shipped in v3.4. Through the end of v3, the behavior was:
onCancelcalledonCancelcalledonCancelnot calledThe first two paths were lost when the v4 presentation API stopped attaching a
CheckoutDelegate, so restoring them repairs a v3 regression. Native Apple Pay usedpaymentAuthorizationControllerDidFinish(_:)to close its sheet but never forwarded that transition to the accelerated checkout callback.That gap is now appropriate to close because v4 uses dismissal semantics rather than cancellation semantics.
checkoutDidDismissreports only that the buyer-facing accelerated checkout presentation has closed. It does not claim that a payment was cancelled, failed, or completed. When Apple Pay continues into a Checkout Kit fallback or thank-you page, dismissal is reported only after that final presentation closes.How to test
GIVEN the Swift Accelerated Checkouts sample is configured with a test storefront, contains a cart item, and displays Shop Pay
WHEN the reviewer opens Shop Pay and closes or swipes down the Checkout Sheet
THEN the Xcode console should log
🚫 Checkout dismissedexactly once without logging a checkout failureGIVEN the Swift Accelerated Checkouts sample is running on a physical iOS device with Apple Pay configured and contains an Apple Pay-eligible cart item
WHEN the reviewer opens the native Apple Pay sheet and taps Cancel before authorizing payment
THEN the Xcode console should log
🚫 Checkout dismissedexactly once without reporting payment completion or checkout failureGIVEN the Swift Accelerated Checkouts sample is running on a physical iOS device with Apple Pay configured and Apple Pay continues into a Checkout Kit fallback or thank-you page
WHEN the reviewer closes that Checkout Kit presentation
THEN the Xcode console should log
🚫 Checkout dismissedexactly once when the final presentation closesSimulator verification
Verified with the Swift sample (
CheckoutKitSwiftDemo) on an iPhone Air simulator (iOS 26.2), with this PR and #932 applied. Debug-only instrumentation, not part of this stack, logs each SDK dismissal path and shows an alert naming theonDismisscallsite that fired.onDismisscallsitecloseButton→ShopPayViewController.checkoutDidDismissAcceleratedCheckoutButtons.onDismissinteractiveSwipe→ShopPayViewController.checkoutDidDismissAcceleratedCheckoutButtons.onDismiss.sheet→ close buttoncloseButtonShopifyCheckout.onDismiss.sheet→ swipe downpresent→ close buttoncloseButtonCheckoutDelegate.checkoutDidDismisspresent→ swipe downinteractiveSwipeCheckoutDelegate.checkoutDidDismissEach passing case reported exactly one dismissal.⚠️ Swiping down a
ShopifyCheckouthosted in a SwiftUI.sheetcloses checkout without any callback: the SDK sets the interactive-dismiss delegate on its own controller, but SwiftUI presents a hosting container. That code is unchanged by this stack and needs a separate fix.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.