Guides
Balance & transactions

Balance & transactions

Read your available balance and your transaction history straight from the ledger — the data behind the dashboard. Both are scoped to your merchant automatically.

Scope: any authenticated merchant key/session. (Ops admins can target another merchant with ?merchant_ref= or any ledger account with ?account_ref=.)

Balance

curl https://engine.swahilies.net/api/psp/balance \
  -H "Authorization: Bearer swh_live_<prefix>_<secret>"
{
  "account_ref": "merchant:daraja:payable",
  "balances": [
    { "currency": "TZS", "balance_minor": 150000, "balance": 150000 },
    { "currency": "USD", "balance_minor": 2000,   "balance": 20.0 }
  ]
}

One entry per currency you hold. balance_minor is integer minor units; balance is the human amount.

Transactions

curl "https://engine.swahilies.net/api/psp/transactions?limit=50" \
  -H "Authorization: Bearer swh_live_<prefix>_<secret>"
{
  "account_ref": "merchant:daraja:payable",
  "count": 128,
  "limit": 50,
  "offset": 0,
  "has_more": true,
  "results": [
    {
      "txn_id": "3852bc71-862e-4fb1-8ed3-ae661f8367ad",
      "direction": "credit",
      "amount_minor": 50000,
      "amount": 50000,
      "signed_minor": 50000,
      "currency": "TZS",
      "reference": "order_1042",
      "source": "tembo_webhook",
      "description": "",
      "created_at": "2026-10-20T09:12:00Z"
    }
  ]
}

Newest first. signed_minor is positive for money in (credit) and negative for money out (debit) — convenient for a running statement.

Query parameters

ParamNotes
currencyFilter by ISO currency, e.g. TZS.
directioncredit (in) or debit (out).
since / untilISO-8601 timestamps.
limitPage size, default 50, max 200.
offsetRows to skip. Use with count / has_more to page.

These read the double-entry ledger directly, so a balance always equals the sum of its transactions — no separate reconciliation needed.