#bensontrent_api

1 messages ¡ Page 1 of 1 (latest)

balmy arrowBOT
#

👋 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/1376986763641491580

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

short shell
#

hello! i'm wrapping up some other threads but i will take a look at this shortly

short shell
#

ok, sorry for the delay - looking at this now

#

it will definitely be possible to get the info you need, it's just a matter of piecing the correct objects together. let me do some digging real quick

#

ok, so looking at the object path from invoice => product in basil, i think it looks like this:
lines.data.pricing.price_details.product

#

the problem is that expansion only supports going 4 levels deep, so i think the answer here might need to be that you make a second call to get the product

balmy arrowBOT
wary sundial
#

And it's not expandable since it's more than 4 deep (you beat me there) and this presents rate limit issues and loading issues to make individual calls on each product itemized in the invoice. I'm going to meet with the Stripe Apps team (we have a weekly meeting) I'll get in touch with the API team and see if we can make invoices more developer friendly on the next version. Thanks for looking at this for me, I did a lot of research and didn't find any method that had the ability to expand product detials (including invoiceItems or retrieving the checkout session (which may or may not exist on an invoice)

short shell
#

yep of course! the new versions are making some foundational changes that will enable some pretty cool features in the future, but at the cost of introducing some complexity to object structure that do make working with the APIs more challenging, and this is one of those cases. you're not the first person to run into this particular point of frustration, and we're also tracking feedback on the new versions on my team, so i'll make sure to summarize our chat here and pass your concerns along

wary sundial
#

THANK YOU!!!!