#david-product-expand

1 messages ยท Page 1 of 1 (latest)

slow gazelleBOT
fallow ocean
#

Hi ๐Ÿ‘‹

Do you have an example Product ID I can review?

hard zenith
#

yes

#

prod_NImMVcOl6SVBsP

#
{
"id": "price_1MYAnyBUI5OPyd6pP8tbEljr",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1675613462,
"currency": "usd",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_NImMVcOl6SVBsP",
"recurring": {
"aggregate_usage": null,
"interval": "year",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "inclusive",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 360000,
"unit_amount_decimal": "360000"
},
hard zenith
#

for some reasons

fallow ocean
#

I don't see any API request where a nick name was provided for this product

hard zenith
#

but nickname

#

is not the product name?

fallow ocean
#

No

hard zenith
#

oh

fallow ocean
#

Also this is the Price object that you are looking at

hard zenith
#

right

fallow ocean
#

Which you can tell by the ID price_

#

So if you wanted detail on the Product you would pass it in the expand parameter when retrieving (or listing) the Price

hard zenith
#

it's fine

#

nvm

#

i can't just use a dictionary

#

hardcoded

#

for the products name by price?

fallow ocean
#

Sorry I'm not clear on what you mean there? Product name by Price?

hard zenith
#

Well i want to list the subscriptions dinamically clientside by requesting them from my backend

hard zenith
fallow ocean
#

That's a response, but what is the request?

hard zenith
#

sorry i am bad at explaining things

#

so i made an endpoint on my backend which returns that array from stripe api

#

and i want to show the products on clientside from that response

#

but i don't have any names in it

fallow ocean
#

I think I get it but want to be sure. So you are making a List request to the Prices endpoint and want product names too?

hard zenith
#

only the priceid

#

yup

fallow ocean
#

That will return the product: as an object with all the details instead of just the prod_XXX ID

hard zenith
#

ait