#jacobfinn
1 messages · Page 1 of 1 (latest)
Hello - can you give me some more specifics? How are you integrating with stripe? Are you using Checkout?
Yea a checkout session
Gotcha - then you can listen for the checkout.session.completed event, re-retrieve the Checkout Session with line_items expanded, and get all the price/product information from there
You can't get it from the webhook event - you need to re-retrieve the Checkout Session with line_items expanded because we don't expand it by default
How do I get the checkout session id
It'll be in the webhook event
Tried doing that:
checkout_session = stripe.checkout.Session.retrieve(event_data['id'], expand=True)
and got this error: stripe.error.InvalidRequestError: Request req_Jh7f79hzKYGphP: Invalid array
It's because you're using expand wrong - you need to do expand=['line_items']