#swcooke - Checkout Session
1 messages · Page 1 of 1 (latest)
You will need to retrieve the Checkout Session by its ID and look at its line_items or you can make the call to retrieve the line items directly
https://stripe.com/docs/api/checkout/sessions/retrieve
https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Unfortunately as you have seen, that info isn't in the original event. So you need to make at least one GET call unless you already stored that info on your side
What about the payment_link property. Is that strictly associated with a product? If so, I could store that on my db. Thoughts?
That comes in the webhook
Yes, that is a great ID. Sessions from a Payment Link will always have the same products so you can just associate the ID with those products for when your session completes https://stripe.com/docs/api/payment_links/payment_links/object#payment_link_object-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.