#meterrel-embedded_checkout-errors
1 messages ยท Page 1 of 1 (latest)
Hello! That's... a good question! Let me see...
Thanks! And again, I can probably avoid giving checkout a bad secret, but I'm concerned there might be other similar conditions.
I think the best approach would be to check the status and expires_at values of the Checkout Session on your server before you provide the client secret to the frontend. If either of those has a problematic value (like a status of expired, or an expires_at in the near future) you can create a new Checkout Session instead.
That said, this does seem like a gap in Stripe.js. There should be some kind of callback or something. I'll flag this internally and see what we can do to improve the situation.
Hi @half sleet I'm taking over this thread
Ok, I can probably manage that.
Just for more context for the checkout team, in my case, this is caused by the user hitting the back button, where the client secret remains in the app state. So while it's definitely possible to handle this case, the naive implementation by a dev is somewhat likely to have this problem.
๐