GladysDevelopers

Pagination

Read long lists one page at a time.

Lists are returned one page at a time. Ask for a page with page and limit:

curl "https://api.joingladys.com/api/v1/payments?page=2&limit=50" \
  -H "Authorization: Bearer access_…"

Prop

Type

The response says where you are in meta.pagination:

{
  "success": true,
  "data": [ … ],
  "meta": {
    "pagination": { "page": 2, "per_page": 50, "total_pages": 7, "total_items": 312 }
  }
}

To read everything, keep asking for the next page until page reaches total_pages. New items can arrive while you page, so a list read this way is a snapshot, not a ledger: use webhooks to keep up with changes.

Filtering payments

GET /payments also takes filters, each an exact match:

FilterExample
status?status=CAPTURED
environment?environment=TEST
capture_method?capture_method=MANUAL
merchant_reference?merchant_reference=order_1042

and can be sorted by created_at or amount, e.g. ?sort=-amount.

Lists that aren't paged

A payment's refunds (GET /payments/{reference}/refunds) come back all at once, oldest first. Webhook deliveries (GET /webhook-deliveries) return the 50 most recent.

On this page