#pedrofumero
1 messages · Page 1 of 1 (latest)
Hey there, which events are you referring to?
I don't see any event id's discussed, can you share an example?
Normally you'd want to listen for checkout.session.completed for complete checkout sessions
Yes, that's correct, I want to listen to checkout.session.completed and that that case is covered correctly, but also set a state of payment failed on my DB when I get: charge.failed, or payment_intent.payment_failed. The response @tarzan gives me sounds great, but my issue is related to how to obtain the checkout session id when I receive this events: charge.failed, or payment_intent.payment_failed 🤔
Gotcha, then for that use case you should be able to List the checkout sessions using the payment_intent param and the intent ID you got on your failed event: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.