Skip to main content

Pagination

List endpoints use cursor-based pagination. In the API reference, these fields appear as optional query parameters on list endpoints, for example GET /v1/customers, GET /v1/payment-intents/account, GET /v1/products, and other endpoints that return collections.

In the interactive API reference explorer, optional parameters appear under Request > Parameters.

Parameters

ParameterTypeDescription
limitnumberNumber of objects to return. Accepts values from 1 to 100. When omitted, the API uses 10.
startingAfterstringCursor for the next page. Use the id of the last object received in the current page.
endingBeforestringCursor for the previous page. Use the id of the first object received in the current page.

Send only one cursor per request. If you send both startingAfter and endingBefore, the API returns an error because the backend can only navigate one direction per request.

The request parameter names are startingAfter and endingBefore. In list responses, the API returns those cursor values under meta.cursorNext and meta.cursorBefore; use meta.cursorNext as startingAfter to move forward and meta.cursorBefore as endingBefore to move backward.

Examples

First page:

curl "https://api.onvopay.com/v1/customers?limit=10" \
-H "Authorization: Bearer onvo_test_secret_key_..."

Next page:

curl "https://api.onvopay.com/v1/customers?limit=10&startingAfter=cl40muorw00493ndp0okzk2g3" \
-H "Authorization: Bearer onvo_test_secret_key_..."

Previous page:

curl "https://api.onvopay.com/v1/customers?limit=10&endingBefore=cl40muorw00493ndp0okzk2g3" \
-H "Authorization: Bearer onvo_test_secret_key_..."

When the response includes meta, use the response cursors to build the next request.

Recommendations

  • Use filters to limit data volume.
  • Process pages incrementally.
  • Do not assume two consecutive pages are immutable if data changes while you are iterating through the list.