Skip to content
HisarPay

API reference

Reports

CSV, Excel and PDF exports rendered in the background. Details in the guide →

POST/v1/reports

Request a report (rendered asynchronously; CSV and Excel up to 10 000 rows, PDF up to 2 000)

Scope: reportsKey: live or test

Request body

  • kindstringrequired

    Values:invoiceswithdrawalsbalance_transactionswebhook_deliveries

  • formatstringoptional

    Values:csvxlsxpdf

    Default: "csv"

  • langstringoptional

    Language of the column headers and the PDF title.

    Values:tren

    Default: "en"

  • fromstring (date-time)optional

    Inclusive start (ISO 8601, UTC).

    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$

  • tostring (date-time)optional

    Exclusive end (ISO 8601, UTC).

    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$

  • statusarray<string>optional

    Only rows in these states (invoices, withdrawals and webhook_deliveries).

    ≤ 10 items

Responses

Example request
curl -X POST https://hisarpay.com/v1/reports \
  -H "Authorization: Bearer $HISARPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "kind": "invoices",
    "format": "csv",
    "lang": "en",
    "from": "2026-10-01T00:00:00Z"
  }'

Details in the guide

GET/v1/reports

List recent reports (kept for 7 days)

Scope: reportsKey: live or test

Responses

  • 200 OKJSON response
    2 fields
    • dataarray<Report>
    • next_beforestring | number· nullable
Example request
curl https://hisarpay.com/v1/reports \
  -H "Authorization: Bearer $HISARPAY_API_KEY"
GET/v1/reports/{id}

Retrieve a report

Scope: reportsKey: live or test

Path parameters

  • idstring (uuid)required

    The record id.

Responses

  • 200 OKReturns the Report object
Example request
curl https://hisarpay.com/v1/reports/0b6a3f52-3c1d-4a7e-8f4b-1d2c3e4f5a6b \
  -H "Authorization: Bearer $HISARPAY_API_KEY"

Details in the guide

GET/v1/reports/{id}/download

Download a ready report file

Scope: reportsKey: live or test

Path parameters

  • idstring (uuid)required

    The record id.

Responses

  • 200 OKJSON response
Example request
curl https://hisarpay.com/v1/reports/0b6a3f52-3c1d-4a7e-8f4b-1d2c3e4f5a6b/download \
  -H "Authorization: Bearer $HISARPAY_API_KEY"

Details in the guide