Skip to content

List statements

GET/statements

The workspace's statements, newest first.

Sandbox: test money only. No request moves real money.

Authenticate with your sandbox key as a bearer token: Authorization: Bearer nbk_test_....

Needs statements:read.

Request

HeaderValueSent
AuthorizationBearer nbk_test_...Required

No Idempotency-Key is needed: a read changes nothing, so it is safe to send again.

Parameters

FieldDescription
Limitlimit · query integer1 to 100. Default 20.
Cursorcursor · query stringUp to 256 characters.
The request in cURL, JavaScript and Python
GET /v1/statementsSandbox, test key
const response = await fetch('https://sandbox-api.nasfampay.com/v1/statements', {  headers: {    Authorization: `Bearer ${process.env.NASFAM_SANDBOX_KEY}`,  },});if (!response.ok) {  const problem = await response.json();  throw new Error(`${problem.status} ${problem.code}: ${problem.title} (request ${problem.request_id})`);}const result = await response.json();console.log(response.status, result);
Code for Request
GET /v1/statementsSandbox, test key
// npm install axiosimport axios from 'axios';try {  const { status, data: statements } = await axios.get(    'https://sandbox-api.nasfampay.com/v1/statements',    {      params: { limit: 10 },      headers: {        Authorization: `Bearer ${process.env.NASFAM_SANDBOX_KEY}`,      },    },  );  console.log(status, statements);} catch (error) {  if (!axios.isAxiosError(error) || !error.response) throw error;  const problem = error.response.data;  throw new Error(`${problem.status} ${problem.code}: ${problem.title} (request ${problem.request_id})`);}

Responses

StatusMeaningBody
OK200Statements. Headers: RateLimit (draft-ietf-httpapi-ratelimit-headers-11. the same buckets, each "<bucket>";r=<whole requests remaining, never negative>;t=<seconds until the quota is fully available again>. ), RateLimit-Policy (draft-ietf-httpapi-ratelimit-headers-11. a structured field list with one item per bucket the request drew on (orders, quotes, quotes_daily, reads, webhooks, lookups, lookups_org, lookups_daily), each "<bucket>";q=<quota>;w=<window seconds>. no partition key (pk) is sent. ).StatementList object
Too many requests429Too many requests (rate_limited), or your queued orders are at your cap (queue_limit). A bucket that cannot be read at once because of contention is answered here too, never waited on. Honour Retry-After. . Headers: Request-Id, Retry-After (seconds to wait before retrying), RateLimit (draft-ietf-httpapi-ratelimit-headers-11. the same buckets, each "<bucket>";r=<whole requests remaining, never negative>;t=<seconds until the quota is fully available again>. ), RateLimit-Policy (draft-ietf-httpapi-ratelimit-headers-11. a structured field list with one item per bucket the request drew on (orders, quotes, quotes_daily, reads, webhooks, lookups, lookups_org, lookups_daily), each "<bucket>";q=<quota>;w=<window seconds>. no partition key (pk) is sent. ).Problem object
Any other statusdefaultError (RFC 9457). A 503 service_unavailable with Retry-After means the request was not processed: the rate limiter or the database could not answer, and the API refuses rather than serve unlimited (reads included). For a money-moving operation, retrying with the same Idempotency-Key is always safe. . Headers: Request-Id, Retry-After (on 429 and some 503 responses).Problem object

The statement list object

FieldDescription
Datadata · array of Statement · required
IDdata[].id · string · requiredPattern ^stm_[0-9A-HJKMNP-TV-Z]{26}$.
Statedata[].state · string · requiredOne of queued, ready, failed.
Failure codedata[].failure_code · string or null · requiredOne of reconciliation_failed, too_large, null.
Currencydata[].currency · string · requiredOne of USD.
Timezonedata[].timezone · string · required
Reconcileddata[].reconciled · boolean · required
Perioddata[].period · object · required
Fromdata[].period.from · string · requiredFormat date.
Todata[].period.to · string · requiredFormat date.
From atdata[].period.from_at · string · requiredFormat date-time.
To atdata[].period.to_at · string · requiredFormat date-time.
Formatsdata[].formats · array of string · requiredEach one of csv, pdf.
Movement countdata[].movement_count · integer or null · requiredAt least 0.
Created atdata[].created_at · string · requiredFormat date-time.
Finished atdata[].finished_at · string or null · requiredFormat date-time.
Filesdata[].files · array of object · required
Formatdata[].files[].format · string · requiredOne of csv, pdf.
Byte sizedata[].files[].byte_size · integer · requiredAt least 1.
Sha256data[].files[].sha256 · string · requiredPattern ^[0-9a-f]{64}$.
Expires atdata[].files[].expires_at · string · requiredFormat date-time.
Availabledata[].files[].available · boolean · required
Summarydata[].summary · object, one of 2 · requiredEither shape 1: ; or shape 2: opening, closing, categories, spent, orders_charged, deposits_credited, reservations_returned, refunded, adjustments, spent_by_product.
Has morehas_more · boolean · required
Next cursornext_cursor · string or null · required

Responses are extensible: ignore fields, enum values and event types you do not know. Any other status is a Problem (see Errors).

Every kind of response
200 OKSynthetic sandbox data
{  "data": [    {      "id": "stm_01K7SAMP000000000000000001",      "state": "queued",      "failure_code": null,      "currency": "USD",      "timezone": "string",      "reconciled": true,      "period": {        "from": "2026-10-10",        "to": "2026-10-10",        "from_at": "2026-10-10T10:05:02Z",        "to_at": "2026-10-10T10:05:02Z"      },      "formats": [        "csv"      ],      "movement_count": null,      "created_at": "2026-10-10T10:05:02Z",      "finished_at": null,      "files": [        {          "format": "csv",          "byte_size": 1,          "sha256": "0000000000000000000000000000000000000000000000000000000000000000",          "expires_at": "2026-10-10T10:05:02Z",          "available": true        }      ],      "summary": null    }  ],  "has_more": false,  "next_cursor": null}
Code for Responses
Response
JSON
200 OKSynthetic sandbox data
{  "data": [    {      "id": "stm_01K7SAMP000000000000000090",      "state": "ready",      "failure_code": null,      "currency": "USD",      "timezone": "Africa/Lagos",      "reconciled": true,      "period": {        "from": "2026-10-01",        "to": "2026-10-10",        "from_at": "2026-09-30T23:00:00.000Z",        "to_at": "2026-10-09T23:00:00.000Z"      },      "formats": [        "csv"      ],      "movement_count": 2,      "created_at": "2026-10-10T10:20:00.000Z",      "finished_at": "2026-10-10T10:20:04.000Z",      "files": [        {          "format": "csv",          "byte_size": 1240,          "sha256": "0000000000000000000000000000000000000000000000000000000000000000",          "expires_at": "2026-10-10T11:20:04.000Z",          "available": true        }      ],      "summary": {        "opening": {          "available": "0",          "reserved": "0",          "on_hold": "0",          "total": "0"        },        "closing": {          "available": "99250000",          "reserved": "0",          "on_hold": "0",          "total": "99250000"        },        "categories": [          {            "category": "deposit",            "label": "Deposits credited",            "count": 1,            "change": {              "available": "100000000",              "reserved": "0",              "on_hold": "0",              "total": "100000000"            }          },          {            "category": "order",            "label": "Orders charged",            "count": 1,            "change": {              "available": "-750000",              "reserved": "0",              "on_hold": "0",              "total": "-750000"            }          }        ],        "spent": "750000",        "orders_charged": 1,        "deposits_credited": "100000000",        "reservations_returned": "0",        "refunded": "0",        "adjustments": "0",        "spent_by_product": [          {            "product": "telegram_stars",            "spent": "750000",            "count": 1          }        ]      }    }  ],  "has_more": false,  "next_cursor": null}
Error
JSON
429 Too Many RequestsSynthetic sandbox data
{  "type": "about:blank",  "title": "Too many requests",  "status": 429,  "code": "rate_limited",  "category": "rate_limit",  "detail": "Too many requests. Retry after the time in Retry-After.",  "param": null,  "request_id": "req_01K7SAMP000000000000000090"}

How it behaves

What to expect
AuthenticationYour key as a bearer token in the Authorization header: a nbk_test_ key on the sandbox host.
IdempotencyNot needed: a GET changes nothing, so it is safe to send again.
In the sandboxServed, on your own test records.
On LiveThe same request, on the Live host with a live key, which exists only for a workspace activated for Live. See Go live.
FundingNone. This request does not touch your balance.
Status changesNone.
Webhook eventsNone.

Error responses

Any request can answer with invalid_request, invalid_api_key, key_expired, key_environment_mismatch, insufficient_scope, rate_limited, service_unavailable, internal_error. Errors says what to do about each one.