#bwurtz999_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/1331756702487412848
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, that is expected. By default, the number of objects returned in a single request is 100 and we have a pagination functionality: https://docs.stripe.com/api/pagination/auto that you could use.
This specifies a limit on the number of objects to return, ranging between 1 and 100.
Does this mean it will never return more than 100 results?
That is correct
Ok. Let me describe my issue and maybe there is a different way to accomplish this. I am pulling all payments associated with an automatic payout. I want to know the gross amount, fee amount, and net amount directly from Stripe
Each payout can have 1,000+ payments associated with it
How can I achieve this if I cannot retrieve all the payments associated with the payout?
Retreiving the payout only gives me the amount deposited to the bank account (the net amount). It does not list the Stripe fee taken from the gross amount
Is there a different expand field where I can pull the total fee amount associated with a payout?
You can use the autp pagination functionality: https://docs.stripe.com/api/pagination/auto
This feature allows you to easily iterate through large lists of resources without having to manually perform the requests to fetch subsequent pages.
Can you try this please?
To use the auto-pagination feature in PHP, simply issue an initial “list” call with the parameters you need, then call autoPagingIterator() on the returned list object to iterate over all objects matching your initial parameters.
I see this. But the limit says the max is 100
Will that forloop keep retrieving new pages until all records have been pulled?
Just 100 at a time?
Yeap!
Sure