Reconcile balances and transfers
Reconcile account balances, transfers, fees, and your corporate and billing balances using minor-unit amounts and the export endpoints.
Reconcile against three sources: each account's live balance, the transfers that moved it, and the fees charged on top.
Before you begin
- Store Roots ids (
person_,acct_,cpty_,xfer_) next to your own records. Setexternal_idon transfers and counterparties so you can match them back. - Store amounts as integers in minor units. Every amount in an account, transfer, or fee is a JSON string of minor units; parse it as an integer, never as a float. For USD,
"125050"is 1,250.50.
Account balances
GET /api/v1/accounts/{account_id} reads the balance live on every call:
| Field | Meaning |
|---|---|
available_minor | Spendable now. Use only this to size a new transfer. |
pending_minor | In flight either way: inbound funds not yet available, plus funds held for a transfer in progress. |
current_minor | Everything the account holds. |
Treat current_minor as authoritative.
Funds held for a withdrawal stay in pending_minor until the rail takes them, so current_minor does not drop when the transfer is created.
Transfers
Pull every transfer for an account with GET /api/v1/transfers?account_id=acct_.... account_id matches either leg, so the list includes internal transfers the account received. For a period, GET /api/v1/transfers/export returns the whole matching set as CSV or PDF:
curl -o payments.csv \
"https://api.sandbox.roots.finance/api/v1/transfers/export?account_id=acct_4d9e2b7c1a6f5e3d8b0c9a2f1e7d6c5b&created_from=2026-09-01&created_to=2026-09-30&format=csv" \
-H "Authorization: Bearer $ROOTS_API_TOKEN"Post a transfer to your ledger only when it is terminal. Read status and failure from GET /api/v1/transfers/{transfer_id} first:
status | Effect on the account |
|---|---|
settled | Money left (withdrawal), moved between your accounts (internal), or arrived and is spendable (deposit). |
failed | Nothing moved. Any hold was reversed, so the funds are back in available_minor. |
returned | The bank sent the transfer back; reverse your earlier posting. settled_at stays set. |
reversed | The bank pulled back a settled ACH withdrawal; reverse your earlier posting. settled_at stays set. The withdrawal fee is not refunded. |
Use settled_at, returned_at, and reversed_at as the posting dates; each is set once and never changes.
fee_quoted_minor on a transfer is the fee quoted from your fee schedule, an estimate, and fee_charged_minor is the fee actually charged to the account, the sum of its posted fees (GET /api/v1/fees), "0" until the fee posts. Post the charge from fee_charged_minor, not from the quote; GET /api/v1/fees lists each charge. With fee_mode on_top, the source account is debited amount_minor plus the fee; with deducted, the beneficiary receives amount_minor minus the fee.
Transactions
A transfer is one object to you and one or more ledger entries on your accounts, called transactions. Read them to see exactly what moved, and when the ledger booked it.
GET /api/v1/transfers/{transfer_id}/transactionslists the transactions one transfer made, on every account it touched, oldest first (hold, principal, fee). An internal transfer shows two principal entries with the sameid, one per account (-2000and+2000); identify a transaction byaccount_idandidtogether.GET /api/v1/accounts/{account_id}/transactionslists one account's transactions, newest first. Narrow it withfrom/to(UTC days, inclusive),type,transfer_idanddirection(creditordebit);totalcounts what the filters keep.GET /api/v1/accounts/{account_id}/transactions/{transaction_id}reads one, by itstxn_...id.
Each transaction names its transfer_id, which is null for an entry no transfer made, such as a bank fee. amount_minor is signed: negative when money left the account.
type | What it is | In the default list |
|---|---|---|
principal | The money moved. | Yes |
fee | A fee charged on it; reason names the fee rule. | Yes |
hold | Funds set aside for a withdrawal in flight. | No |
release | A hold given back, when the transfer fails or is returned. | No |
type replaces the default list: send type=principal&type=fee&type=hold&type=release to see the money moving between the account's own pockets as well. For a settled withdrawal with a fee, the transfer's transactions are the hold (-3000), the fee (-127) and the principal (-3000, flow withdrawal_confirm). The sum of the fee transactions of a transfer equals its fee_charged_minor.
A hold is not money taken. It sets funds aside inside the account: available_minor drops, pending_minor rises, and current_minor does not change. The principal later takes that money out, so a settled withdrawal lists -3000 twice, once as the hold and once as the principal. Never add hold or release amounts to principal and fee amounts. To total what a transfer cost an account, sum its principal and fee transactions only; the default list returns exactly those.
The account statement still lists transfers, not transactions.
Account statements
GET /api/v1/accounts/{account_id}/statement returns the transfer activity of one account for up to one year, signed against that account. It is not an accounting statement: there is no opening or closing balance, the header balance is read at download time, and postings with no transfer behind them, such as holds, are not listed.
Fees
| Endpoint | Returns |
|---|---|
GET /api/v1/fees | Each fee charged or skipped, newest first. Filter by person_id, account_id, transfer_id, event_type, rule_code, payer, status, from, to. |
GET /api/v1/fees/summary | Totals and a breakdown by rule code and payer for the same filters. |
GET /api/v1/fees/export | One CSV row per charge, amounts in dollars. |
GET /api/v1/fees/{fee_id} | One charge. |
Each charge has status pending, posted, or skipped. A skipped charge's skip_reason is no_customer_account when the event names no customer account to debit, or first_activation when it is part of your first activation, which Roots does not charge for. fees_customer_minor is what left the customer's account; it is "0" when payer is client, in which case the platform fee is taken from your billing balance. A charge's rail_refs holds the bank references of the fee's own money moves once they happen: roots_sweep_transfer_id for Roots' share and client_sweep_transfer_id for your markup. The fee.charged webhook fires when a fee posts.
Corporate and billing balances
Your own balances are separate from your customers' accounts. GET /api/v1/billing returns them:
| Field | Meaning |
|---|---|
billing_minor | Your billing balance, which Roots' fees are paid from. |
revenue_minor | Your corporate balance: earned markup. |
min_minor | The billing minimum. |
blocked | true while billing_minor is below min_minor. |
billing_available_to_move_minor | The most you can move out of billing: what is above min_minor, less moves still waiting for the bank. |
revenue_available_to_move_minor | The most you can move out of revenue: revenue_minor less moves still waiting for the bank. |
The amounts are strings; blocked is a boolean. Statements and day-by-day history of both balances are in the Client Portal.
When billing_minor falls below min_minor, blocked is true, the billing.balance.low webhook fires, and requests that can incur a fee, including POST /api/v1/transfers, are refused with 400 insufficient_billing_balance. Move earned revenue into billing with POST /api/v1/billing/move-from-revenue (billing:write scope) or in the Client Portal, or top up. In sandbox, POST /api/v1/sandbox/billing/deposits with amount_minor books a simulated top-up into your billing balance. The fraud reserve, where to send a top-up and moving money between the reserves are in Manage your billing balance and fraud reserve.
Next steps
Updated 5 days ago