Stripe webhooks: checkout.session.completed for asynchronous payments?

So I have been using checkout.session.completed webhook to make changes after successful payment. I have enabled card and p24 (local payment processor - asynchronous payments)

Now haven’t had the chance to observe live results for now but the test mode after successful confirmation from p24 method the webhook fires immediately.

My question to all of you who are using Stripe checkout which method are you using: is it checkout.session.completed or payment_intent.succeeded?

I have setup both methods but I’m not sure which one I should use and if there is any difference when I’m only using Stripe Checkout :thinking:

Resources on the differences between those two are scarce

You can just listen for the checkout.session.completed event and then the checkout.session.async_payment_succeeded event to handle any async payment completions.

You could listen for the payment_intent.succeeded event but it’s not necessary if you’re using Stripe Checkout and listening for the checkout related events.

If a Checkout session has been completed with an async payment method you will see that it’s payment_status will be “unpaid” and not “paid”. That lets you know that while the Checkout completed successfully, the payment is not yet completed. The payment will eventually succeed or fail. So you can listen for both the success and failure events and handle things accordingly: