Skip to content

Pagination and local records

The partner API returns individual cards and balances. There is no GET /v1/cards collection or cardholder list. The one list is a chain card’s transactions (below).

Persist the top-level card_id returned by issuance alongside your customer ID, order ID, external_ref, amount, and restaurant. To display “My cards”, query your database and retrieve current status or balance for the records the customer owns.

Paginate that local collection using your application’s usual approach. Only refresh the visible cards and reuse recent results; do not request every customer’s balance on every page load.

A second order for the same email and restaurant may refer to the same issuer card. Preserve every financial order, but group the customer-facing card list by the confirmed issuer.card_id and restaurant when available. Two Zwipe records pointing to the same issuer card do not represent two independent balances.

There is no lookup by external_ref. If an issuance response was lost before you saved card_id, follow the identical replay procedure.

GET /v1/cards/{card_id}/transactions returns {data, next_cursor}, newest first, 25 entries by default and at most 100 (limit). Pass next_cursor as cursor for the next page; it is null on the last page. A page can hold fewer entries than limit, even none, while next_cursor is set: keep reading until it is null. An unknown cursor is 400. A chain finds a customer’s card again with GET /v1/cardholders/{external_id}/card.