#jack-checkout

1 messages · Page 1 of 1 (latest)

flint python
#

hi! well checkout.session.async_payment_succeeded won't get fired for cards.

What you probably want to do is listen for both. In the .completed event, check the type of payment method used. If it was card, then you can fulfill the order. It if was something else, then do nothing for now(or just update your database etc). In the .async_payment_succeeded event, you can fulfill the order always.

https://stripe.com/docs/payments/checkout/fulfill-orders#delayed-notification

upbeat elk
#

That's simple enough, thank you.
Just wanted to check that i had to do both rather than handling it with one single event

#

i'm currently firing it on payment_intent.succeeded which is likely wrong as i was previously using payment intents/elements.

I'll want to remove that and listen for these instead yeah?

flint python
#

yes, I would use the Checkout specific events, they're more consistent

upbeat elk
#

Do you have an example anywhere of checking if the payment method was card or bacs?
I assume its attached to the data sent in the event but cant find the page on the docs with it

flint python