#RON-Checkout

1 messages · Page 1 of 1 (latest)

austere vale
#

Hi there! Yep, that's the hook you want to listen for!

whole garden
#

And if a customer uses an async payment method, the checkout complete event won't fire until after this successful too?

austere vale
#

Great question. No the event will fire immediately when the session is completed. If your customers are using async paymentmethods then you will want to listen for charge.succeeded which will fire once the async paymentmethod's charge has finished processing.

whole garden
#

hmm, so checkout.session.completed and
checkout.session.async_payment_succeeded are both indicators that the payment is complete?

#

I'm confused which one I should use to then fulfil

austere vale
#

Ah I apologize, moving too quickly and forgot about checkout.session.async_payment-succeeded!

whole garden
#

no worries. I'm just confused, if I use checkout.session.complete as an indicator to fulfil, but then the async method fails it's not complete

#

if I'm making sense

austere vale
#

You are correct, for synchronous paymentmethods you can rely on the checkout.session.completed event. However, if it is a delayed method (meaning the session's payment_status is not paid ) then you will wait for the checkout.session.async_payment_succeeded event.