#spudz000-checkout-product-price
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Give me a moment to catch up
So once the session is complete, you'd want retrieve it again and expand the line_items field on it
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
https://stripe.com/docs/api/expanding_objects
which should get you the prices or product you're creating the session for
You are talking about the checkout session? Does that link to the charge?
The checkout session, yes.
Just so that I'm on the same page, when you say charge, what are you referring to exactly? can you give me an example?
If I see a charge like this...
ch_3L2g3WIdEUkjGFyg0FfViLsB
I can't tell how to get the line_items or checkout session
Okay so on a charge, you'd fine a PaymentIntent ID which you can use to retrieve all checkout sessions
https://stripe.com/docs/api/checkout/sessions/list
And once you find the checkout session, you can find its line_items
https://stripe.com/docs/api/checkout/sessions/line_items
There isn't a direct connection to line_items from the charge itself unfortunately
Awesome! Thank you for this!
NP! ๐ Happy to help