#Shaun - Product names

1 messages · Page 1 of 1 (latest)

visual linden
#

Hi there!

winter olive
#

I think I figured it out 🤦‍♂️ stripe.product.retrieve(it.product)

#

I was trying stripe.products for way too long

#

Is that correct?

#

hmm don't think that worked

visual linden
#

No, I don't think this is possible. Could you share more details on what you're trying to achieve?

winter olive
#
const price = await stripe.prices.retrieve(priceID)
const product = // .... ?
console.log(`Product name ${product.name}`)
#

I need to retrieve a prices product (fill in line #2)

visual linden
#

Just to clarify, are you using the Node SDK?

#

I think this is what you're looking for:

  limit: 3,
});```
winter olive
#

I don't want to list products

#

I have a price, and I want to retrieve the price's product.

#

This works, but it gives compiler warnings, but it will suffice.

const product = await stripe.products.retrieve(it.product)
        return {id: it.id, name: product.name, price: it.unit_amount}
indigo sedge
#

what warning are you getting, what it.product exactly?