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
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.
The page offset at which you'd like to resume fetching data.
List Response Format
An array containing the actual response elements, paginated by any request parameters.
A dictionary containing information on this paginated list.
The current page number.
The URL for accessing this list.
Whether or not there are more elements available after this set. If false
, this set comprises the end of the list.
The previous page of this list.
The next page of this list.
{
"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
},
{...},
{...}
]
}