#wintercounter

1 messages ยท Page 1 of 1 (latest)

proven crystalBOT
charred needle
#

Let's chat here

#

Can you give me a quick summary if your issue?

fluid cove
#

as suggested, I'm making a call to get line items

#

but I cannot expand

#
const lineItems = await stripe.checkout.sessions.listLineItems(checkoutSession.id, {
                expand: ['line_items.data.price.product']
            })
charred needle
#

Are you seeing an error?

fluid cove
#

Error: This property cannot be expanded (line_items). You may want to try expanding 'data.line_items' instead.

charred needle
#

ah if you put data then I believe it'll complain about the expand being too deep right?

#
                expand: ['data.line_items.data.price.product']
            })```
fluid cove
#

hmm, i just tried moving .data the to the front ๐Ÿ˜„

#

let me try having then both places

charred needle
#

you can only expand upto 4 levels

fluid cove
#

i still got Error: This property cannot be expanded (data.line_items). anyway

charred needle
#

I think the issue is that you're already getting the line items with listLineItems

#

What happens if you just keep data.price.product

fluid cove
#

checking

#

nice, working ๐Ÿ™‚

#

i finally have my metadata ๐Ÿ˜„

#

thanks for the assistance