#commonsense - confirmPayment
1 messages · Page 1 of 1 (latest)
Hello! Pulling all the context into this thread:
or rather not server side but client side
Sometimes, the webhook is laggy
Hi!
Not really, no, but can you tell me why you want to do that? I may be able to suggest an alternative.
Sometimes the webhook event doesn't come through as quickly
Or does it always go through?
It should always go through (we retry if needed), but it might be delayed. Can you tell me more about why that delay is causing issues for you?
Gotcha. So you can do that by fetching the Payment Intent and checking its status. You don't need to wait for the event.
You can do this client-side with stripe.retrievePaymentIntent: https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
Got it, where should I place it on the checkout page?
Is there a best practice for checkout?
That's entirely up to you. You're using the Payment Element as part of your own custom payment experience, so it's your call how all this works.
Are there any good examples
For best practice python + javascript
Stripe implementations
We have sample code for Python in several places, such as the quickstart builder: https://stripe.com/docs/payments/quickstart