Pagination
BaoPay uses cursor-based pagination on every list endpoint — the fastest way to page through large result sets, and a natural fit for real-time data. Slice a list with the limit and page params.
This is a sample resource with pagination response. use limit and page query params to paginate the response.
Query Params attributes
| Field | Type | Description |
|---|---|---|
limit | integer | Limit the number of payments returned. |
page | integer | Specify the page number of the payments to retrieve. |
Response
{
"statusCode": 200,
"message": "Sample resource with pagination response",
"data": {
"docs": [
...
],
"totalDocs": 1,
"offset": 0,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}
}
