#Jack of spades
1 messages · Page 1 of 1 (latest)
Hi
Yes, that was changed. You'll have a PaymentIntent once the Checkout Session is completed.
I see, because right now when a user enters the checkout session, we store the 'payment_intent' and when we receive webhook, we compare the 'stripe_session_id' with the previously stored 'payment_intent'. Is there another way we can do something similar?
that is verify the incoming webhook with a previous stripe checkout session?
we only focus on Event::PAYMENT_INTENT_SUCCEEDED webhook
we compare the 'stripe_session_id' with the previously stored 'payment_intent'. Is there another way we can do something similar?
You can add metadata to the Checkout Session and then compare it
You should be listening to checkout.session.completed event:
https://stripe.com/docs/api/events/types#event_types-checkout.session.completed
but we want to make sure the payment is completed
i am afraid even though checkout.session.completed, the payment has failed
Why it can be failed ?
or am i wrong? and that checkout.session.completed does mean payment has succeded
sorry i am just guessing
You can cover checkout.session.async_payment_succeeded event too for async payments:
https://stripe.com/docs/api/events/types#event_types-checkout.session.async_payment_succeeded
Then you'll cover all success payments.
i see! thank you very much for the help!