Skip to main content
All endpoints that list objects provide support for cursor-based pagination. For instance, you can list workers, list charges or list payments. Most list endpoints return items in reverse chronological order—the most recently created object appears first, and the oldest appears last. Endpoint reference pages call out documented exceptions such as stable lexicographic order.

Parameters

limit
number
default:"10"
A limit on the number of objects to be returned, between 1 and 100.
cursor
string
A cursor for pagination. Pass the cursor value from a previous response to fetch the next page. Unlike starting_after and ending_before which accept object IDs, cursor should only be used with the cursor value returned by the list endpoint. Treat this value as opaque: do not decode, parse, inspect, or construct cursors yourself.
starting_after
string
An object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects ending with item_12n4, your subsequent call can include starting_after=item_12n4 to fetch the next page.
ending_before
string
An object ID for backward pagination. For instance, if you make a list request and receive 100 objects starting with item_2d54, your subsequent call can include ending_before=item_2d54 to fetch the previous page.
Only one of cursor, starting_after, or ending_before may be provided per request. Providing more than one will result in an error.

Returns

Newer platform list endpoints return the standard list envelope:
{
  "object": "list",
  "data": [],
  "has_more": false
}
When has_more is true, use the last returned object’s id as starting_after to fetch the next page, or use the first returned object’s id as ending_before to page backward. These endpoints do not return a top-level cursor; the cursor request parameter is reserved for endpoints that explicitly return opaque cursor tokens. Some list endpoints return a top-level cursor while more results exist. These endpoints call out the cursor parameter in their reference pages:
cursor
string
A cursor for fetching the next page of results. This field is only present when there are more results to fetch. If the cursor field is absent from the response, you have reached the end of the list. Cursor values are opaque and may use different internal encodings across list endpoints.