#Andreas
1 messages · Page 1 of 1 (latest)
To do that you can list all checkout sessions and filter by that payment intent's ID 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.
That will return a list of 1 session, the session that created that intent
If you want to avoid the API call it may make more sense to listen for checkout.session.succeeded events
Yes thought about this as well but then I have to make one for the payment_intent.
Gotcha, yeah if you need both full objects then you will need to make at least one API call
The only thing is that I have the webhooks captured by a microservice to be sent to nats and consumed by the web app.
It would be brilliant if the payment_intent had some kind of prop like "origin"
Agreed, will file some feedback to expose this. I definitely ran in to this myself when integrating with Checkout
ok thanks