#masseelch_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1212360213705916416
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- masseelch-testing-invoice.finalization_failed, 1 day ago, 7 messages
- masseelch, 1 day ago, 14 messages
- masseelch, 1 day ago, 8 messages
- masseelch, 5 days ago, 10 messages
hi there!
hello
that's because the subscription dones't have a top level price property. the price is stored in the items object: https://docs.stripe.com/api/subscriptions/object#subscription_object-items
Oh man, I feel dumb. Thank you very much.
also you don't need to use expand for this at all, the price and metadata are already included by default.
Are you sure? Because in what is returned without expand, metadat is null but the product does have metadata attached when looking in dashboard
I though you wanted the Price metadata. for the Product metadata, you will need to expand it yes.
Doesn't work though, since from subscrition it is 5 levels deep due to using data for lists. I guess I have to do it differently. Thanks!
let me quickly test this on my end
ah yes you are right, it should be "data.items.data.price.product", but it's more than 4 levels.
so you should either try to store the metadata somewhere else (like on the price itself). or make extra API calls to retrieve the corresponding Products
I will make anther API call.
Having the meta on prices is too much maintenance. Except if there is a way to auto-populate product meta into the price?
no that's something that you would need to do on your end