Decision boundary
This guide treats the supplied pages as shared official Stripe guidance, not as independent corroboration. It is limited to v1 list endpoints and the documented library pagination behavior. Choose a traversal only after separating two questions: which page to request next, and which sequence an order-sensitive application is allowed to process.
For ordinary v1 list responses, elements are carried in data, has_more reports whether another portion remains, and the documented list presentation is reverse chronological. The special ordering note for library auto-pagination with ending_before must be handled separately.
The two list cursor parameters cannot be combined in one request. Treat cursor selection as a navigation decision; treat reordering, review, acceptance, and downstream processing as application-owned policy.
Four traversal choices
| Traversal mode | Cursor provenance | Direction | Documented returned ordering | Completion evidence | Order assumption to reject | Bounded application-owned action |
|---|---|---|---|---|---|---|
| Single list page without a cursor | No cursor is sent. | One requested page only. | Reverse-chronological list order. | has_more is false. | Reject the idea that one page necessarily represents every matching object. | Process only this page when that bounded result is intentional; otherwise select a traversal mode before processing. |
Manual subsequent page using starting_after and the last returned object ID | Last object ID from the received page. | Next-page movement after the boundary. | Reverse-chronological list order. | has_more is true; continue with the next cursor until it becomes false. | Reject use of the first returned ID as this forward cursor. | Keep the received order unless the application explicitly defines and reviews a different ordering contract. |
Manual previous page using ending_before and the first returned object ID | First object ID from the received page. | Previous-page movement before the boundary. | Reverse-chronological list order. | Use the response's has_more value to determine whether more list elements remain. | Reject sending both cursor families in the same request. | Require an application decision about whether this navigation direction is acceptable for the intended processing order. |
Client-library auto-pagination with ending_before | An existing object ID supplied as the ending_before boundary. | Library-managed traversal before the boundary. | Chronological output; newest customer is last. | The helper continues across pages until has_more becomes false. | Reject the label “first iterated customer is newest.” | Preserve the received sequence, or define an explicit alternative ordering contract and review it before order-sensitive processing. |
Why the auto-pagination case needs a separate rule
Stripe documents library helpers that traverse pages of list resources. Its pagination guidance also makes a narrow exception: using auto-pagination on a list endpoint with ending_before yields chronological results, with the newest customer at the end. That exception should not be generalized to every cursor arrangement.
This is a design distinction, not a provider-prescribed processing workflow. A team may preserve the delivered sequence, deliberately reorder under a defined contract, or stop for review; the suitable choice depends on the application's own order-sensitive rule.
Hypothetical failure walkthrough
Consider a hypothetical team that enables library auto-pagination with ending_before, calls the first iterated customer “newest,” and then applies an order-sensitive policy. That label conflicts with the documented chronological output for this combination.
- Preserve the sequence received from the helper rather than silently reversing it.
- Withdraw the unsupported “first is newest” label.
- Recognize that this documented combination puts the newest customer last.
- Select or define an application-owned ordering contract before processing any order-sensitive policy.
The correction does not establish a recovery guarantee or dictate a universal processing rule. It only prevents an application policy from resting on an ordering label that this traversal mode does not support.
Operational limits
This article intentionally leaves out search pagination and the separate v2 pagination interface. It also does not specify cursor-family validation, durable recovery, dataset consistency, or a guarantee that a particular application policy is safe. Those concerns need requirements and evidence beyond the supplied v1 list-pagination excerpts.
Review this design when the cited guidance changes, when the relevant version is retired or becomes incompatible, or when the target client-library and endpoint combination changes.
The exception is parameter- and helper-specific, so it cannot define a default ordering contract for other traversals. Stripe states the ordinary list contract separately: objects are reverse chronological, with the most recently created first. It then narrows the exception to
auto-paginationon a list endpoint while settingending_before, where chronological output places the newest customer last. Manual continuation withstarting_aftertherefore must retain the ordinary list-order assumption unless separate documentation establishes otherwise.An adapter should encode this distinction rather than expose a generic
chronologicalflag: for example, admit chronological helper output only for{ endpoint: "v1-list", pagination: "auto", cursor: "ending_before" }; all other combinations should preserve the documented reverse-chronological response order or fail closed when the traversal mode is unknown. This prevents a caller from silently applying the exception after changing only the cursor or replacing helper traversal with manual requests. Stripe pagination documentation