> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxpay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Statement

> GET /v2/statement — paginated double-entry ledger with running balances and embedded transaction objects.

Each entry represents a single debit or credit line against one of your sub-accounts, with a balance before and after. When the movement was generated by a Noxpay process — Crossramp Checkout, onramp, offramp, withdrawal — the full transaction object is embedded inline.

## Query parameters

| Parameter      | Type    | Description                                                                  |
| -------------- | ------- | ---------------------------------------------------------------------------- |
| `limit`        | integer | Max results per page (default: `20`, max: `100`)                             |
| `offset`       | integer | Pagination offset (default: `0`)                                             |
| `currency`     | string  | Filter by currency code (e.g. `TRX_USDT_S2UZ`, `BRL`)                        |
| `account_type` | string  | Filter by sub-account: `available`, `in_transit`, `to_receive`, or `blocked` |
| `date_from`    | string  | Start date filter — RFC 3339 or `YYYY-MM-DD`                                 |
| `date_to`      | string  | End date filter — RFC 3339 or `YYYY-MM-DD`                                   |

Both bounds are inclusive and filter on the journal entry date, **not** on the originating transaction's creation date.

<Warning>
  A bare `YYYY-MM-DD` in `date_to` resolves to **midnight** at the start of that day, so `date_to=2026-08-20` excludes everything that happened during 20 August. To include a whole day, pass the next day, or use an explicit RFC 3339 timestamp.
</Warning>

An unparseable date is discarded and the filter simply does not apply — you get an unfiltered result rather than a `400`. An unrecognised `account_type` behaves the same way: the whole statement is returned. Validate these client-side if it matters.

An invalid `limit` falls back to `50` rather than returning an error.

## Response fields

| Field     | Type    | Description                             |
| --------- | ------- | --------------------------------------- |
| `total`   | integer | Total matching entries across all pages |
| `limit`   | integer | Page size used                          |
| `offset`  | integer | Current offset                          |
| `entries` | array   | List of statement entry objects         |

## Statement entry

| Field                          | Type    | Description                                                                                                                                          |
| ------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                           | integer | Unique ledger line identifier                                                                                                                        |
| `date`                         | string  | ISO 8601 timestamp of the journal entry                                                                                                              |
| `account.id`                   | integer | Internal ledger account ID                                                                                                                           |
| `account.name`                 | string  | Ledger account label (e.g. `USDT TRC20 available`). Operator-configured — display it, do not parse it                                                |
| `account.code`                 | string  | Full double-entry account code (e.g. `2.1.1.100.1.1.1`)                                                                                              |
| `account.currency`             | string  | Raw ledger currency code (e.g. `TRX_USDT_S2UZ`)                                                                                                      |
| `account.currency_pretty_name` | string  | Display name for the code, from the currency table (e.g. `USDT (TRX)`)                                                                               |
| `debit`                        | float   | Amount debited from this account                                                                                                                     |
| `credit`                       | float   | Amount credited to this account                                                                                                                      |
| `previous_balance`             | float   | Account balance before this entry                                                                                                                    |
| `balance`                      | float   | Account balance after this entry                                                                                                                     |
| `transaction`                  | object  | Embedded transaction object when the entry came from a Noxpay process. **Omitted entirely** for internal adjustments — the key is absent, not `null` |

## Account sub-type from code

The last segment of `account.code` identifies the sub-account bucket:

| Code segment | Type         | Description                          |
| ------------ | ------------ | ------------------------------------ |
| `1`          | `available`  | Immediately withdrawable             |
| `2`          | `in_transit` | Sent; awaiting on-chain confirmation |
| `3`          | `to_receive` | Pending inbound                      |
| `4`          | `blocked`    | Frozen for compliance or dispute     |

## Embedded transaction object

When `transaction` is present it is the standard [Transaction Object](/api-reference/reference/transaction-object), minus `version`. It carries no resource-type field, so identify the product from which attribute keys are present — these are the kinds of process that can appear:

| Product                       | Distinctive attributes                     |
| ----------------------------- | ------------------------------------------ |
| Crossramp Checkout            | `currency_entry`, `fixed_link`             |
| Onramp to Global Account      | `currency_entry`, `currency_exit_received` |
| Onramp to External Address    | as above, plus `wallet`, `tx_hash`         |
| Offramp from Global Account   | `currency_exit`, `amount_sent`             |
| Offramp from External Address | `deposit_address`, `exact_deposit_amount`  |
| Withdrawal                    | `amount_discounted`, `address`             |

The `attributes` object contains the fields relevant to that product. See the per-resource pages for full attribute tables.

## Status codes

| HTTP  | When                         |
| ----- | ---------------------------- |
| `200` | Success                      |
| `401` | Missing or invalid `api-key` |
| `500` | Internal error               |

<RequestExample>
  ```bash cURL theme={null}
  curl "https://checkout.noxpay.io/v2/statement?limit=20&offset=0" \
    -H "api-key: <key>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://checkout.noxpay.io/v2/statement",
      headers={"api-key": "<key>"},
      params={"limit": 20, "offset": 0},
  )
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({ limit: 20, offset: 0 });
  const response = await fetch(
    `https://checkout.noxpay.io/v2/statement?${params}`,
    { headers: { "api-key": "<key>" } }
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "total": 128,
    "limit": 20,
    "offset": 0,
    "entries": [
      {
        "id": 4521,
        "date": "2024-05-01T12:00:00Z",
        "account": {
          "id": 42,
          "name": "USDT TRC20 available",
          "code": "2.1.1.100.1.1.1",
          "currency": "TRX_USDT_S2UZ",
          "currency_pretty_name": "USDT (TRX)"
        },
        "debit": 0.00,
        "credit": 100.00,
        "previous_balance": 50.00,
        "balance": 150.00,
        "transaction": {
          "end2end": "NOXabc123",
          "created_at": "2024-05-01T11:59:00Z",
          "updated_at": "2024-05-01T12:00:00Z",
          "process": "success.completed",
          "status": { "en": "Success", "pt": "Sucesso", "es": "Éxito" },
          "substatus": { "en": "Success", "pt": "Sucesso", "es": "Éxito" },
          "message": { "en": "Transaction completed successfully", "pt": "Transação concluída com sucesso", "es": "Transacción completada con éxito" },
          "error_message": { "en": "", "pt": "", "es": "" },
          "attributes": {
            "quote": 5.45,
            "currency_exit_received": "USDT (TRX)",
            "amount_payment": 550.00,
            "amount_received": 100.00,
            "client_name": "João Silva",
            "client_tax_id": "12345678901"
          }
        }
      }
    ]
  }
  ```
</ResponseExample>
