Financials

Cash, statements, and runway — provider-agnostic by design.

Every company in Reventlov has a financials surface: a live cash balance, trailing transactions, and the three core financial statements (income, balance, cash flow). The data shape is provider-agnostic — Mercury, OpenClaw, QuickBooks Online, Xero, Plaid, or a manual upload all flow into the same schema and render the same way.

Resources

ResourcePurpose
financial_connectionA linked bank or accounting provider for a company
cash_balanceA point-in-time cash position (one row per day per account)
bank_transactionAn individual debit or credit
financial_snapshotA full income statement, balance sheet, or cash flow for a period

Connections

A company can have many connections, of two kinds:

  • bank — Mercury, Plaid-linked accounts, or any source of real-time cash
  • accounting — OpenClaw, QuickBooks, Xero, or any source of statements
1{
2 "id": "fcx_...",
3 "company_id": "co_...",
4 "provider": "mercury",
5 "kind": "bank",
6 "external_account_id": "acc_abc",
7 "display_name": "Operating · Mercury",
8 "status": "active",
9 "last_synced_at": "2026-04-30T14:00:00Z"
10}

Status flips to error if the provider returns auth failures and to disconnected if the user revokes access.

Cash balances

One row per (company, connection, as_of) day. Cents-only. Multiple bank accounts on the same day are stored as separate rows; sum them client-side to get total cash.

1{
2 "id": "cbl_...",
3 "company_id": "co_...",
4 "connection_id": "fcx_...",
5 "as_of": "2026-04-30",
6 "balance_cents": 124500000,
7 "currency": "USD",
8 "source": "mercury"
9}

Bank transactions

Sign convention: positive = credit (money in), negative = debit (money out). (connection_id, external_id) is unique to make ingest idempotent.

1{
2 "id": "btx_...",
3 "company_id": "co_...",
4 "connection_id": "fcx_...",
5 "external_id": "mercury_txn_abc",
6 "posted_at": "2026-04-29T14:23:00Z",
7 "amount_cents": -395000,
8 "currency": "USD",
9 "description": "AWS",
10 "category": "infrastructure",
11 "counterparty": "Amazon Web Services"
12}

Financial snapshots

A financial_snapshot is a full statement for a period. There are three statement_types: income, balance, cashflow. Each company may have at most one snapshot per (statement_type, period_end); re-posting upserts.

1{
2 "id": "fsn_...",
3 "company_id": "co_...",
4 "statement_type": "income",
5 "period_start": "2026-01-01",
6 "period_end": "2026-03-31",
7 "currency": "USD",
8 "totals": {
9 "revenue": 480000,
10 "gross_profit": 360000,
11 "operating_income": 90000,
12 "net_income": 72000
13 },
14 "line_items": [
15 { "key": "revenue", "label": "Revenue", "amount_cents": 480000, "is_total": true },
16 { "key": "cogs", "label": "Cost of revenue", "amount_cents": -120000, "indent": 1 },
17 { "key": "gross_profit", "label": "Gross profit", "amount_cents": 360000, "is_total": true },
18 { "key": "opex", "label": "Operating expenses", "amount_cents": -270000, "indent": 1 },
19 { "key": "operating_income", "label": "Operating income", "amount_cents": 90000, "is_total": true },
20 { "key": "tax", "label": "Income tax", "amount_cents": -18000, "indent": 1 },
21 { "key": "net_income", "label": "Net income", "amount_cents": 72000, "is_total": true }
22 ],
23 "source": "openclaw"
24}

totals is rendered as KPI tiles at the top of each statement view. line_items is a flat ordered array; indent controls visual hierarchy and is_total adds a top border + bold weight.

Common total keys

Statement typeSuggested keys in totals
incomerevenue, gross_profit, operating_income, net_income
balancetotal_assets, total_liabilities, total_equity
cashflowoperating_cash, investing_cash, financing_cash, net_change

These are conventions, not constraints — any keys you set show up in the UI.

Runway

Computed in real time from the latest cash_balance and trailing-90-day transaction net:

burn_per_month = -(sum of trailing 90d txn amounts) / 90 * 30
runway_months = latest_cash / burn_per_month

If the trailing window is net positive, runway shows as .

Ingest workflow

provider Reventlov
| |
|--POST txns---->| /api/v1/companies/{id}/bank/transactions
|--POST balance->| /api/v1/companies/{id}/cash/balances
|--POST snapshot>| /api/v1/companies/{id}/financials/snapshots
|
+-- emits bank.transaction.posted
emits bank.balance.updated
emits financial.snapshot.updated

Every ingest fires the matching webhook event so downstream consumers (your agent, ledgers, alerting, the dashboard’s revalidator) stay in sync.

Permissions

All financial endpoints accept human or agent scope keys. Read endpoints are account-scoped; you can only see snapshots for companies you own.