Skip to content

v1.0.8-preview.6

@tomber tomber tagged this 18 Apr 15:39
Stripe's Payment Element requires elements.submit() to be called
immediately on user click (before any async work) prior to
stripe.confirmPayment(). Without it, Stripe throws an IntegrationError
and the payment never reaches the confirm step — this blocked 100% of
card subscriptions via CheckoutLayout / PaymentForm on preview builds.

Add an unconditional elements.submit() call in both sites that confirm
a PaymentElement:

- utils/confirmPayment.ts (used by PaymentForm primitive + CheckoutLayout)
- primitives/TopupForm.tsx inline submit handler

Calling submit() unconditionally is safe for both clientSecret-mounted
and deferred-intent Elements — it validates the form and is a no-op
otherwise. Surface any submitError via the existing error UI and skip
confirmPayment when submit fails.

Ref: https://stripe.com/docs/payments/accept-a-payment-deferred
Made-with: Cursor
Assets 2
Loading