#meteograms_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ 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.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ 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/1400431722927099995
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
hi!
But now
stripe.invoices.retrieveUpcoming()is no longer available, I am usingstripe.invoices.createPreview().
yes, that makes sense
so you are saying that this expand [ 'lines.data.price.tiers' ] worked with retrieveUpcoming but not with createPreview?
It doesn't complain about it in the call, but there seems to be no firstItem.price... only firstItem.pricing
If I understand correctly, the previous expand should act on what ends up in firstItem.price ... but that doesn't exist anymore in the returned data?
I think what you want to expand is this: https://docs.stripe.com/api/invoices/object?api-version=2025-06-30.basil&lang=curl#invoice_object-lines-data-pricing-price_details-price
so it would be [ 'lines.data.pricing.price_details.price.tiers' ]
however expand only support expending 4 or 5 levels, so I don't think this would work.
Nope, I get: You cannot expand more than 4 levels of a property. Property: lines.data.pricing.price_details.price.tiers
yes, that's what I thought. so it looks like you can't use expand in this case, and instead you'll need to make one extra API call to retrive the Price itself (with the tiers)