Skip to content
HisarPay

API conventions

Pagination

List endpoints return results newest first, in cursor-based pages. New records added while you page do not shift the pages you have not read yet.

Paging with a cursor

  • limit is the page size: 1–100, default 20.
  • Responses look like { data, next_before }. For the next page, send next_before back as the before parameter.
  • When next_before is null, you are on the last page.
  • Treat the cursor as opaque. Depending on the endpoint it may be an id, a timestamp or a number; never build one yourself.
GET /v1/invoices?limit=2
{
  "data": [
    { "id": "0b6a3f52-3c1d-4a7e-8f4b-1d2c3e4f5a6b", "object": "invoice", "status": "paid" },
    { "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b", "object": "invoice", "status": "paid" }
  ],
  "next_before": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b"
}

Walking every page

The SDKs’ listAll helpers fetch pages lazily, one after another:

curl "https://hisarpay.com/v1/invoices?status=paid,overpaid&limit=100" \
  -H "Authorization: Bearer $HISARPAY_API_KEY"

# next page: with next_before from the previous response
curl "https://hisarpay.com/v1/invoices?status=paid,overpaid&limit=100&before=9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b" \
  -H "Authorization: Bearer $HISARPAY_API_KEY"

Filters

EndpointParameterValues
GET /v1/invoicesstatusComma-separated statuses: pending, partial, paid, overpaid, expired, cancelled
GET /v1/invoicesqInvoice id, order id, description, e-mail, address or txid
GET /v1/invoicestoken · sourceTRX or USDT; api, panel, link, telegram
GET /v1/invoicescreated_from · created_toWhen it was made: 2026-12-01, or a time with its zone
GET /v1/withdrawalsstatus · source · token · q · created_from · created_toThe same; sources are panel, api, auto, admin
GET /v1/payment-linksactivetrue · false
GET /v1/eventstypeA single event type
GET /v1/balance-transactionstokenRequired: TRX or USDT; limit up to 200