#zak_api
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/1318689520241348682
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I thought the limit param was an option but it doesnt seem that it's available on this certain function
Hi there ๐ there is a limit there, where the Invoice only includes 10 Invoice Items by default (or default limit for listing).
I'd suggest creating a Preview Invoice instead:
https://docs.stripe.com/api/invoices/create_preview
That will created a persisted Invoice object that you can then use to retrieve the associated line items by setting limit to a larger value (and paginating through the results if needed)
https://docs.stripe.com/api/invoice-line-item/retrieve
Alternatively, you can use this endpoint that only retrieves the line items for the upcoming invoice, which does support the limit parameter and doesn't create a persisted object:
https://docs.stripe.com/api/invoice-line-item/invoices/upcoming/lines/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.