Pagination
All top-level API resources have support for bulk fetches through "list" API methods. For example, you can list charges, list customers, and list payment methods. These list API methods share a common structure and accept, at a minimum, the following two parameters: page and per_page.
Parameters
per_pageintegeroptional
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
pageintegeroptional
The page offset at which you'd like to resume fetching data.
List Response Format
dataarrayoptional
An array containing the actual response elements, paginated by any request parameters.
metadictionaryoptional
A dictionary containing information on this paginated list.
RESPONSE
{
"meta": {
"page": 1,
"url": "/v1/customers",
"has_more": false,
"prev": null,
"next": null
},
"data": [
{
"id": "618938e5-57c4-47f7-8da5-5bc607d97101",
"created": 1713323382,
"shipping_address": null,
"updated": 1713323382,
"livemode": false,
"name": "John",
"phone": null,
"email": "john@website.com",
"description": null,
"object": "customer",
"metadata": [],
"billing_address": null
},
{...},
{...}
]
}