#real_.md
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
Why are you placing the metadata on the Product object, exactly?
I also see you're trying to access it on the Price object instead (item.price?.metadata?.id).
This answer is correct: https://stackoverflow.com/a/77775959/20339932
To access the Product objects and their metadata you need to expand them:
await stripe.checkout.sessions.listLineItems(checkoutSessionCompleted.id, {
expand: ['data.price.product']
})