# Account & balance (Ledger)

The Ledger gives you a real-time view of your Nexterpay wallet — your balance, recent transactions, and historical entries filtered by date.

## When to call Ledger endpoints

* **Before a payout.** Confirm that available balance ≥ payout amount + expected fees.
* **For reconciliation.** Pull entries within a date window and match them against your internal ledger.
* **For support.** When a customer disputes a transaction, the ledger entry is the source of truth for the movement.

## Get balance

```
POST /Ledger/GetLedgerBalance?currency=XAF
```

```bash
curl -X POST "https://api-sandbox.nexterpay.io/Ledger/GetLedgerBalance?currency=XAF" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```json
{
  "currency": "XAF",
  "available": 125000,
  "pending": 5000
}
```

* `available` — funds you can disburse now.
* `pending` — inbound funds not yet settled.

## Get recent entries

```
POST /Ledger/GetLedgerEntries
```

Returns the **most recent 200 entries** across all currencies. No parameters.

```bash
curl -X POST "https://api-sandbox.nexterpay.io/Ledger/GetLedgerEntries" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```json
[
  {
    "entryID": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
    "orderID": "c9a1f8e0-4b3c-4b9e-8a2d-5e6f7a8b9c0d",
    "externalID": "payin-20260423-000123",
    "type": "PayIn",
    "amount": 100,
    "currency": "XAF",
    "timestamp": "2026-04-23T10:15:22Z"
  }
]
```

## Get filtered entries

```
POST /Ledger/GetListLedgerEntries?dtStart=ISO_DATE&dtEnd=ISO_DATE
```

Returns entries within a time window. Dates are ISO 8601 UTC.

```bash
curl -X POST "https://api-sandbox.nexterpay.io/Ledger/GetListLedgerEntries?dtStart=2026-04-01T00:00:00Z&dtEnd=2026-04-23T23:59:59Z" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

{% hint style="info" %}
**Reconciliation pattern.** Run a nightly job that calls `GetListLedgerEntries` for the previous 24 hours, then matches each returned entry to a local record by `externalID`. Any entry that does not match a local record is an exception — investigate it before you close the day.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexterpay.io/platform/account-and-balance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
