Skip to content
HisarPay

Money and events

Reports

Export your invoices, withdrawals and ledger movements as CSV, Excel or PDF for accounting or analysis. Reports are rendered in the background: check their status and download them once ready.

Requesting a report

POST /v1/reports queues the report and returns the report object with status pending and HTTP 202. The key needs the reports scope. The report covers the data of the key’s mode (live or test).

curl -X POST https://hisarpay.com/v1/reports \
  -H "Authorization: Bearer $HISARPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "invoices",
    "format": "xlsx",
    "lang": "tr",
    "from": "2026-10-01T00:00:00Z",
    "status": [
      "paid",
      "overpaid"
    ]
  }'
FieldDescription
kindWhat to export (see the table below).
formatcsv (default, UTF-8 with BOM), xlsx or pdf (A4 landscape).
langLanguage of the column headers and PDF title: tr or en (default).
from / toISO 8601 date range (UTC); from inclusive, to exclusive.
statusOnly rows in these states (up to 10 values).

Report kinds

kindContentsstatus filter
invoicesInvoicespending, partial, paid, overpaid, expired, cancelled
withdrawalsWithdrawalspending_review, queued, processing, completed, failed, rejected
balance_transactionsLedger movements—
webhook_deliveriesWebhook deliveriespending, delivered, failed

CSV and Excel files hold at most 10,000 rows, a PDF at most 2,000 (the newest; a PDF that was cut off says so on every page). Split longer periods into several ranges. At most three reports are prepared at once and 40 a day; once the files of the last seven days reach 100 MB no more can be asked for. The answer is rate_limited then.

Status and download

Follow the status with GET /v1/reports/{id}: pending → processing → ready (or failed). Once ready, download_url is set; download the file with the same API key. The SDKs’ createAndWait runs this loop for you.

GET /v1/reports/7c1e9a40-2b3d-4f5e-8a6b-9c0d1e2f3a4b
{
  "id": "7c1e9a40-2b3d-4f5e-8a6b-9c0d1e2f3a4b",
  "object": "report",
  "livemode": true,
  "kind": "invoices",
  "format": "xlsx",
  "lang": "tr",
  "status": "ready",
  "filters": { "from": "2026-10-01T00:00:00Z", "to": null, "status": ["paid", "overpaid"] },
  "row_count": 1284,
  "filename": "hisarpay-invoices-2026-10-23.xlsx",
  "download_url": "https://hisarpay.com/v1/reports/7c1e9a40-2b3d-4f5e-8a6b-9c0d1e2f3a4b/download",
  "created_at": "2026-10-23T09:00:00.000Z",
  "completed_at": "2026-10-23T09:00:04.000Z",
  "expires_at": "2026-10-30T09:00:00.000Z"
}
Download
curl -o invoices.xlsx https://hisarpay.com/v1/reports/7c1e9a40-2b3d-4f5e-8a6b-9c0d1e2f3a4b/download \
  -H "Authorization: Bearer $HISARPAY_API_KEY"

Limits

  • Up to 3 reports can be in progress at once; a fourth gets 429 rate_limited.
  • Files are kept for 7 days (expires_at), then deleted. GET /v1/reports lists the last 7 days.
  • Exports from the dashboard share the same queue and limits.