#d_j_p_3
1 messages ยท Page 1 of 1 (latest)
Hello
hi
That property isn't returned by default
You need to retrieve the Checkout Session and expand line_items to receive it
See: https://docs.stripe.com/expand which discusses how expansion works
okay let me take a look.
Okay thanks... This is what I ended up needing in python:
foo = stripe.checkout.Session.list_line_items(session_id)
๐
That works
Or you can just retrieve the Session and expand
Either way is fine
ahhh... I see. Are those aliases for the same operation or is one more efficient or something?
stripe.checkout.Session.retrieve(
'{{SESSION_ID}}',
expand=["customer"],
)
vs
stripe.checkout.Session.list_line_items(session_id)
One only gives you the line items
One gives you the whole Checkout Session object and the line items
So it just depends on what data you are looking for really
I see, but both require an API call right?
great. so I'll just grab the line-items since the basic checkout session is the payload of the webhook
Yep that works here just fine
๐