Replies: 1 comment
|
These are two separate conditions. For the wallet buttons, an embedded Facebook/Instagram WebView may not satisfy the browser/platform requirements for Apple Pay or Google Pay. You cannot make that WebView wallet-capable from Stripe.js. The robust flow is:
For the “Unhandled ... confirm event” error, first make sure the Express Checkout Element is not being remounted between render and confirm (changing If those are stable and it occurs only while the WebView is being torn down, it is likely an SDK/WebView race rather than an error your handler can catch. Capture Stripe.js version, iOS/FB version, UA, and a minimal reproduction and report it to Stripe support; a global |
Uh oh!
There was an error while loading. Please reload this page.
Hi all - looking for the recommended pattern, and to confirm whether one error is expected behavior. This is a client-side Elements question (
@stripe/stripe-js/@stripe/react-stripe-js); posting here sincestripe-jsdiscussions are disabled - happy to move it if there's a better home.Setup
@stripe/react-stripe-js@6.2.0,@stripe/stripe-js@9.2.0, Next.js 15.5, React 19ExpressCheckoutElement(Apple Pay / Google Pay / Link) with aPaymentElementcard form as fallbackstripe.confirmPayment({ elements, confirmParams: { return_url }, redirect: "if_required" })Problem 1 - wallets don't render in the in-app browser
Inside the FB/IG in-app browser, the Apple Pay / Google Pay buttons don't appear at all (consistent with stripe-payments-demo#84). Users fall back to typing card details, which hurts conversion on a flow that should be one-tap.
onAvailablePaymentMethodsChange(hide the element whenpaymentMethodsisnull) the correct way to avoid an empty/dead wallet region? Any edge cases?Problem 2 - "Unhandled expressCheckout Element confirm event" despite a registered handler
We see this reported to Sentry, originating inside
stripe.js, from Facebook iOS in-app browser sessions:We do register
onConfirmand wrapconfirmPaymentin try/catch. Our read is that in a slow/torn-down WebView, Stripe.js emits this as a global unhandled rejection from its own confirm dispatch, so our try/catch can't intercept it. Simplified handler:event.paymentFailed({ reason: "fail" })only beforeconfirmPayment(to avoid "Unexpected call to paymentFailed()") the correct contract?Thanks!
All reactions