#cece_51221
1 messages · Page 1 of 1 (latest)
Hello there
Are you integrating Stripe Checkout specifically here?
Or you asking in a more general sense?
we are exploring options. We are considering Checkout vs. Stripe Elements
Gotcha, well with Checkout there is nothing client-side that your code could react to since it is a checkout page hosted by Stripe. You could listen for payment_intent.payment_failed to know a customer was on the Checkout Session page and had failed an attempt. But nothing you can really do at that point.
With Elements, you call confirmPayment() and then the promise will resolve in an error if the payment fails and you handle displaying whatever you want to the customer from there.
I see. How would Checkout handle error? Will it show any error to the user if there is a invalid payment method or a payment declined?
Yep it shows an error to the user in the hosted UI
You can test this out with our test cards (https://stripe.com/docs/testing#declined-payments)
Gotcha. Would all errors be thrown instantly? Will there be any error that happen async and we have to wait for event of status changes? For example, would the card declines instantly or could there be delay more than a couple of secs?
All synchronous payment method types like cards would error ~instantly. Async payment method types, like bank debits, can "error" (fail) days later.
thank you! this is very helpful!
👍