#0xL34N

1 messages · Page 1 of 1 (latest)

uncut domeBOT
fresh lantern
#

Hi!

#

What's your question?

oak wigeon
#

Hi! I need to get all of products with their corresponding list of prices

#

But i only recibe the default price

fresh lantern
#

How are you currently listing your Products/Prices?

oak wigeon
#

this.stripe.products.list()

#

I use Node

#

But in each product i have 2 differnts prices

fresh lantern
oak wigeon
#

Does this mean that there is no way to get all the prices when searching for products?

#

i should be call first at list of prices and then at list of products and concat the 2 lists..

fresh lantern
#

You can list your Products and then loop through them to list all Prices for that Product

oak wigeon
#

Oka, i understand, i dont like that solutions, i think i could find the better way

#

Can you think of a better way to avoid making so many calls?

fresh lantern
#

No, but this really shouldn't be that many calls unless you have thousands of products

#

That said, if you are planning on doing this regularly then you shouldn't

oak wigeon
#

Thats true

fresh lantern
#

You should store this data in your database

#

And then query that

oak wigeon
#

Thanks for your time 🙂