#psarojanand-pagination
1 messages ยท Page 1 of 1 (latest)
The above Payout id - po_1LPgmpPOIi7gUqPA5baI1Fer has 463 transfers under it.
when I am fetching the record I received only 100 at time. How to fetch all or next set of data for this Payout.
I tried limit and starting_after but it didn't work
$payout_details = \Stripe\BalanceTransaction::all(['limit'=>500,'payout' => 'po_1LPgmpPOIi7gUqPA5baI1Fer','expand' => ['data.source.source_transfer.source_transaction']],['stripe_account'=>"acct_xxxxx"],['starting_after'=>'txn_1LPKVpPOIi7gUqPAJuQpxgBb']);
I see! You can use auto-pagination provided by Stripe, so that you don't have to handle pagination on your own for large lists: https://stripe.com/docs/api/pagination/auto
ok 2 mins let me check
In your case, limit of 500 won't work since List Retrieval API is limited to 100 objects max: https://stripe.com/docs/api/pagination#pagination-limit
So, you can:
- manually loop through by using
starting_afterorending_before; OR - use auto-pagination provided by library: https://stripe.com/docs/api/pagination/auto
In either case, you can refer to the video here: https://stripe.com/docs/videos/developer-foundations?video=pagination&lang=php
ok auto pagination did work but not for all records as I said this payoutid has 460 records but in API I have received only 280
I will watch the video
if it didn't resolve my problem will come back
Thanks for your kind help
No problem! Happy to help ๐