#jacobfinn

1 messages · Page 1 of 1 (latest)

tender irisBOT
livid yoke
#

Hello - can you give me some more specifics? How are you integrating with stripe? Are you using Checkout?

solemn crow
#

Yea a checkout session

livid yoke
#

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

solemn crow
#

Yea it's in there

#

How do I get it from the webhook event

livid yoke
#

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

solemn crow
#

How do I get the checkout session id

livid yoke
#

It'll be in the webhook event

solemn crow
#

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

livid yoke
#

It's because you're using expand wrong - you need to do expand=['line_items']