Overview
API endpoints that return collections (like listing payments) use pagination to limit response size and improve performance. Superbank uses offset-based pagination.Pagination Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Number of items per page (max: 100) |
offset | number | 0 | Number of items to skip |
Request Example
Response Format
Paginated responses include apagination object with metadata:
Pagination Object
| Field | Type | Description |
|---|---|---|
total | number | Total number of items matching the query |
limit | number | Items per page (as requested) |
offset | number | Current offset |
has_more | boolean | Whether more items exist after this page |
Iterating Through Pages
JavaScript Example
Python Example
Filtering with Pagination
You can combine pagination with filters:total count reflects filtered results, not all records.
Best Practices
Use Reasonable Page Sizes
- Default (
20) is good for displaying in UI - Use larger limits (
100) for bulk operations - Avoid very small limits to reduce API calls
Handle Empty Results
Respect Rate Limits
When paginating through large datasets, add delays between requests to avoid hitting rate limits:Endpoints with Pagination
| Endpoint | Description |
|---|---|
GET /v1/payments | List payments |