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_pageinteger

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 50.

pageinteger

The page offset at which you'd like to resume fetching data.

List Response Format
dataarray

An array containing the actual response elements, paginated by any request parameters.

metadictionary

A dictionary containing information on this paginated list.

pageinteger

The current page number.

urlstring

The URL for accessing this list.

has_moreboolean

Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

prevnullable integer

The previous page of this list.

nextnullable integer

The next page of this 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
    },
    {...},
    {...}
  ]
}