Our libraries support auto-pagination. This feature allows you to easily iterate through large lists of resources without having to manually perform the requests to fetch subsequent pages.
To use the auto-pagination feature in Node 10+, simply iterate over a “list” call with the parameters you need in a for await
loop.
To use the auto-pagination feature in older versions of Node, issue a “list” call with the parameters you need, then call autoPagingEach(onItem)
on the returned list object to iterate over all objects matching your initial parameters.
Full docs are on the stripe-node GitHub repository.