You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `onClose` | `() => void` | Once, when the buyer dismisses the sheet without a terminal error. |
612
+
| `onFail` | `(error: CheckoutException) => void` | Once, when the checkout terminates with an error. |
613
+
| `onGeolocationRequest` | `(event: GeolocationRequestEvent) => void` | Android only. Fired each time the webview requests geolocation permissions. See [Opting out of the default behavior](#opting-out-of-the-default-behavior). |
644
614
645
-
On the rare occasion that you want to remove all event listeners for a given
646
-
`eventName`, you can use the `removeEventListeners(eventName)` method.
615
+
`onClose` and `onFail` are mutually exclusive — exactly one of them fires
616
+
per `present(...)` call, after which both handles are released.
617
+
618
+
> Protocol-level callbacks (`start`, `complete`, `error` on the protocol
619
+
> client) are not part of this section and will land in a follow-up release
620
+
> alongside a `<CheckoutSheet>` component. Checkout completion is not
621
+
> currently surfaced through the per-call callbacks.
647
622
648
623
## Identity & customer accounts
649
624
@@ -756,15 +731,16 @@ Android differs to iOS in that permission requests must be handled in two places
When opting out, you'll need to implement your own permission handling logic and communicate the result back to the checkout sheet. This can be useful if you want to:
795
+
Custom permission handling lets you:
796
796
797
797
- Customize the permission request UI/UX
798
798
- Coordinate location permissions with other app features
799
799
- Implement custom fallback behavior when permissions are denied
800
800
801
-
The steps here to implement your own logic are to:
802
-
803
-
1. Listen for the `geolocationRequest`
804
-
2. Request the desired permissions
805
-
3. Invoke the native callback by calling `initiateGeolocationRequest` with the permission status
Copy file name to clipboardExpand all lines: platforms/react-native/modules/@shopify/checkout-kit-react-native/android/src/main/java/com/shopify/reactnative/checkoutkit/CustomCheckoutEventProcessor.java
+31-12Lines changed: 31 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,8 @@ of this software and associated documentation files (the "Software"), to deal
Copy file name to clipboardExpand all lines: platforms/react-native/modules/@shopify/checkout-kit-react-native/android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ of this software and associated documentation files (the "Software"), to deal
Copy file name to clipboardExpand all lines: platforms/react-native/modules/@shopify/checkout-kit-react-native/ios/ShopifyCheckoutKit-Bridging-Header.h
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SO
0 commit comments