Capture additional Stripe webhook events
Instead of using checkout.session.completed
, we should probably use the following:
-
payment_intent.canceled
: Occurs when a PaymentIntent is canceled. -
payment_intent.payment_failed
: Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. -
payment_intent.succeeded
: Occurs when a PaymentIntent has successfully completed payment.
This way, we capture all the relevant activities of a payment in our system.