#Wheaty

1 messages ยท Page 1 of 1 (latest)

tame lynxBOT
bold grove
#

Hi there!

warped trench
#

๐Ÿ‘‹

bold grove
#

Can you share the product ID (prod_xxx)?

warped trench
#

Sure

#

prod_NS3ihDPLxayAok

bold grove
warped trench
#

Is it possible to run a query with said ids, and return both inactive and active products at the same time?

bold grove
#

You would need to call the list endpoint twice, once with active: false and active: true

warped trench
#

Ah, unfortunate but manageable.

#

Still not getting any returns when active is set to false however -

jade shell
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

warped trench
#

No problem. ๐Ÿ™‚

warped trench
#

Hi @jade shell - do you have any additional insight on this?

Does not appear products.list returns anything when active is set to false and no ids are passed either.

#

Is this the proper way to retrieve the product object of one-time items for one-time invoices?

jade shell
#

still looking into this

bleak grotto
#

Can you paste those prod_xxx IDs here they're you're expecting to see returned please

#

Is prod_NS3ihDPLxayAok one?

warped trench
#
prod_NS3ihDPLxayAok
prod_N69XSOusOme6rn```
#

prod_NS3ihDPLxayAok - One-time item via one-time invoice. Returns fine via Stripe.products.retrieve, however not via Stripe.products.list.

prod_N69XSOusOme6rn - Standard stripe product.

bleak grotto
#

I suspect in the case of prod_NS3ihDPLxayAok it's because it's an 'inline' object (i.e. created indirectly via other parameters). Those aren't returned via list endpoints

warped trench
#

This is returned via the /products/:id endpoint though?

#

How else can I retrieve the product object of this id?

bleak grotto
#

Yep, that's just by design. Otherwise if you're a heavy user of inline objects (Price/Product) it'd be an extensive list of objects

bleak grotto
warped trench
#

I'm attempting to retrieve this for the purposes of the product name via invoice.lines.data

#

I suppose if it is a line_item I can use just the description.

#

Thanks for the clarification guys ๐Ÿ™‚

bleak grotto
#

Yep, that description === product.name

warped trench
#

Doesn't appear to be so entirely, as if there is a unit_type that is included in the description

#

but for one-time, yeah, seems to be the case ๐Ÿ™‚

bleak grotto
#

You just need to 'expand' it

warped trench
#

Is it possible to expand each line item to have the product object via the Stripe.invoices.list call?

#

or via Stripe.invoices.retrieve

bleak grotto
#

Yep, like expand: ['lines.price.product']

#

Syntax depends on your language

warped trench
#

you're the best :0

#

thanks guys ๐Ÿ™‚

bleak grotto
#

np