#Mike.7189-checkout

1 messages ยท Page 1 of 1 (latest)

rigid vigil
inland mauve
#

something like that?

    const session = await stripe.checkout.sessions.retrieve(
        req.query.session_id,
        { expand: ["line_items.object"] }
    );
#

it's node.js with express

rigid vigil
#

I think just "line_items"

inland mauve
#

it was {expand: ['line_items.data']}. Got the object now ๐Ÿ™‚ Thanks

rigid vigil
#

ah nice!

inland mauve
#
StripeInvalidRequestError: This property cannot be expanded (line_items.object). You may want to try expanding 'line_items.data.object' instead.

Had this error, thankfully stripe gives nice errors and so I can figure out what's wrong ๐Ÿ˜„

#

That's it. Thanks for you Sunday time ๐Ÿ˜‰

rigid vigil
#

just "line_items" should work also, fwiw