#zak_api

1 messages ยท Page 1 of 1 (latest)

rancid craneBOT
#

๐Ÿ‘‹ 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.

pine jetty
#

I thought the limit param was an option but it doesnt seem that it's available on this certain function

warm phoenixBOT
mighty tapir
#

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

rancid craneBOT