Skip to main content

Pagination

Payscribe uses cursor-based pagination for list endpoints.

Page-based pagination

Most list endpoints accept page and per_page parameters.

ParameterTypeDefaultDescription
pageinteger1Page number to retrieve
per_pageinteger20Items per page (max: 100)
GET /invoices/?page=2&per_page=50

Response meta:

{
"status": true,
"data": [],
"meta": {
"page": 2,
"per_page": 50,
"total": 156,
"page_count": 4
}
}

Cursor-based pagination

Some endpoints support cursor pagination for real-time data. The response includes next and previous cursors.

{
"status": true,
"data": [],
"meta": {
"next": "cursor_abc123",
"previous": null,
"perPage": 50
}
}

Pass the next cursor value as the page parameter to fetch the next set of results.

GET /transactions?page=cursor_abc123&per_page=50

Sorting

List endpoints may support sorting via sort_by and sort_order parameters.

ParameterTypeExample
sort_bystringcreated_at, amount
sort_orderstringasc, desc
GET /invoices/?sort_by=created_at&sort_order=desc

Was this page helpful?

Report a docs issue →