#mr_pablo_85

1 messages ยท Page 1 of 1 (latest)

wintry hazelBOT
crimson walrus
#

The line_items field, which includes production info, is expandable by default and therefore not included in the webhook event

#

You'll need to do a follow-up API request to retrieve them

marble dew
#

Is there any way to add the product ID into the event?

#

I'm not seeing line_items either

crimson walrus
# marble dew I'm not seeing `line_items` either
marble dew
#

oh sorry, i thought you meant line items was there and I needed to do another call to get more info

crimson walrus
#

Yeah, that is what you'll need to do

marble dew
#

so just from the checkout.session.complete webhook event, there is no way to see the product ID?

#

It requires API calls, correct?

crimson walrus
#

LIne 34:

const sessionWithLineItems = await stripe.checkout.sessions.retrieve(
      event.data.object.id,
      {
        expand: ['line_items'],
      }
    );
marble dew
#

๐Ÿ‘