Pagination

Pagination exists so Chargee can return large collections without dumping every row in one response. For local order lists, the model is classic page and page size: you ask for a slice, and the response tells you enough about totals to request the next slice.

Local lists

When you list orders Chargee stores for your account, you choose which page you want and how many rows per page (up to a documented maximum). Defaults exist so a first call without tuning still returns a manageable window. The response pairs the page of orders with metadata such as current page, page size, total count, and how many pages that implies.

That metadata is what lets UIs build “next / previous” or jump-to-page controls without guessing. Always drive navigation from the metadata Chargee returns rather than assuming a fixed total.

Why there is a maximum page size

Unbounded page sizes encourage accidental full-table downloads and put needless pressure on the database and your client memory. The cap forces chunked reading. If you need everything, walk pages until the metadata says you are done.

Warehouse lists and import are different shapes of the same idea

When you read Monta’s own lists through Chargee, paging follows Monta’s conventions more closely than Chargee’s local metadata envelope. Treat that as a different dialect: useful for diagnostics, not necessarily identical to local list responses.

Import walks Monta’s history internally. You influence how large each warehouse list page is and whether Chargee should stop after processing a maximum number of full order pulls in one go. Omitting that cap means “keep going until the date window ends or rate limits interrupt.” Import pagination is therefore a server-side crawl you steer with knobs, not a client-visible page cursor in the same way as local list.

Practical advice

For product features, page through local orders. Keep page sizes modest in interactive UIs. For backfill, prefer import with an explicit ceiling on how much work one request may do, then continue in later requests.


Did this page help you?