Pagination
Page through long lists with page and pageSize.
GET /transactions is paginated with page numbers. Other list endpoints return a bounded list in one response, described below.
Parameters
Prop
Type
curl "https://business-api.migrapay.com/v1/api/transactions?page=2&pageSize=50" \
-H "Authorization: Bearer $MIGRAPAY_API_KEY"Response shape
Results are newest first. The page sits in data.docs, alongside the totals you need to build a pager:
{
"status": "success",
"message": "Transactions retrieved successfully.",
"data": {
"docs": [],
"totalDocs": 132,
"page": 2,
"totalPages": 3,
"counts": { "all": 132, "transfer": 97, "collection": 30, "fee": 5 }
}
}| Field | Description |
|---|---|
docs | The items on this page. |
totalDocs | Items matching your filters, across all pages. |
page | The page returned. |
totalPages | Pages available at the current pageSize. |
counts | Totals per activity type for the whole account. Not affected by filters, handy for tab badges. |
To read everything, request page=1, 2, 3… until page equals totalPages. New transactions arriving while you page shift later pages, so when syncing, filter by a fixed endDate first.
Bounded lists
| Endpoint | Returns |
|---|---|
GET /payouts | The 100 most recent payouts. For older ones use GET /transactions?activity=transfer. |
GET /collections | The 200 most recent collections. |
GET /recipients | All recipients. |
GET /wallets | All wallets. |