Accounting reference
Accounting settings, the stater accounting commands, every accounting API call, what is not confirmed yet and what is not included.
On this page
Settings#
| Variable | Default | |
|---|---|---|
STATER_ACCOUNTING_SYNC |
true |
Run the sync job on this server. Set false on a server that should never call accounting software. |
STATER_ACCOUNTING_SYNC_EVERY |
15m |
How often the job looks for closed days and retries (5m to 6h). |
STATER_ACCOUNTING_HTTP_TIMEOUT |
5m |
The longest one Business Central call may take (1m to 7m). Xero calls have 60 seconds, QuickBooks 120 and MYOB 60. |
STATER_ACCOUNTING_RECHECK_DAYS |
62 |
How far back each run looks for days that changed after sending (7 to 400). |
STATER_ACCOUNTING_LOG_KEEP_DAYS |
90 |
How long the sync log is kept (7 to 3650). |
STATER_ACCOUNTING_EXPORT_MAX_DAYS |
92 |
The most days one export covers (1 to 731). |
No client ID or secret is ever read from the environment, so none can end up
in a compose file. A STATER_PUBLIC_URL that is neither https nor
http://localhost logs a warning at start.
Command line#
stater accounting export -from 2026-11-01 -to 2026-11-30 [-target xero] [-store S01 | -all] \
[-kinds journals,bills,invoices] [-changes] [-record] [-out FILE|DIR]
stater accounting status [-json]
export writes the same file (or zip) Money › Accounting downloads, byte
for byte, to the current directory, a directory or a file name. Without
-target it uses the software chosen in Setup; without -store it covers
every store. -changes gives only what changed since the last recorded
export, and -record records the export as "Record this export" does (the
same refusal over recorded days), audited as accounting.export by "stater
command line". It checks the installed licence and refuses as the web app
does; a missing mapping exits with the sentence naming the accounts to map.
The file is readable by its owner only.
status prints the software, each connection (organisation, state, last
success, when it must be reconnected), how many journals and documents were
sent, recorded or are waiting, and the oldest day not yet sent. It only
reads.
API#
All under /api/v1, tag "Accounting". "Company" means the caller works
across every store.
| Call | Needs |
|---|---|
GET /accounting/targets |
insight.export (no licence) |
GET, PUT /accounting/options |
money.approve, company |
GET, PUT /accounting/mappings?target |
money.approve, company |
GET /accounting/mappings/check?target&channel&from&to |
money.approve, company |
GET, PUT /accounting/contacts?target&party_kind&unmatched |
money.approve, company |
GET /accounting/connections |
money.approve, company (no licence) |
POST /accounting/connections, PATCH, DELETE /accounting/connections/{id} |
admin.integrations, company, browser session (DELETE: no licence) |
POST /accounting/connections/{id}/authorise, /connect, /test; GET …/organisations; PUT …/organisation |
admin.integrations, company, browser session |
GET /accounting/oauth/{provider}/callback |
the browser returning from the provider |
GET /accounting/connections/{id}/send-from |
money.approve, company |
PUT /accounting/connections/{id}/send-from, PUT …/sync, GET …/chart?kind&refresh |
money.approve, company (turning sync off: no licence) |
GET /accounting/days?store_id&from&to&view, GET /accounting/days/{store_id}/{date} |
insight.export and money.view, store scope (no licence) |
POST /accounting/days/{store_id}/{date}/post |
money.approve, company |
POST /accounting/days/{store_id}/{date}/skip |
money.approve, company (no licence) |
GET /accounting/documents?kind&view&from&to, POST …/{invoice_id}/post, POST …/{invoice_id}/skip |
money.approve, company (GET and skip: no licence) |
POST /accounting/sync |
money.approve, company |
GET /accounting/log?connection_id&level&store_id&date |
money.approve, company (no licence) |
GET /accounting/payments, POST /accounting/payments/{id}/recorded |
money.approve, company (no licence) |
GET /accounting/export?target&from&to&store_id&kinds&changes_only |
insight.export and money.view, store scope; bills and invoices need money.approve, company |
POST /accounting/exports, GET /accounting/exports, GET /accounting/exports/{id}/download |
money.approve, company, insight.export |
GET /accounting/tax-check?from&to |
money.approve, company |
The export answers with the file itself (text/csv,
text/tab-separated-values for MYOB and IIF, or application/zip) and
X-Stater-Overlaps-Recorded: true when the range includes recorded days. The
live-update and webhook topic is accounting.updated, with the software, the
store, the day or document reference and the status: never amounts or links.
Not confirmed yet#
Each item keeps the part it names Experimental, refused or worded with care until it is checked against the real product:
- The real templates: Xero journal, bill and invoice headings; QuickBooks
samples;
journal.iiffrom Intuit's IIF kit; the Sage 50 template; a MYOB export. - Xero: whether a journal with tax codes works tax out as Stater predicts; whether imported journals keep exclusive amounts; the lock-date error wording.
- QuickBooks Online:
http://localhostredirects with development keys; non-US tax amounts accepted exactly. - MYOB: the account, tax code and contact list endpoints and the look-up filter; whether company file sign-in is needed; how long refresh tokens last; whether journals use error 25009 for locked periods.
- Business Central: the sign of a journal line's amount; filtering ledger entries and invoices by number; which journal template the API uses; the posting-date error; vendor and customer lists.
- Whether each provider accepts PKCE alongside a client secret.
- GST codes on lines: whether each package balances on net amounts or including tax.
- Reading the ledger's base currency (until then you confirm it on connecting: "My Xero organisation keeps its books in SGD").
- Account sales as invoices, per package.
- Payments against invoices and bills through each API.
- QuickBooks: looking entries up by DocNumber, and how names are escaped in queries.
- Xero: voiding a draft invoice; exclusive amounts on manual journals;
http://localhostwith a port.
Not included yet#
Payments and allocations through the APIs, bank feeds and reconciliation, card fees and settlement matching; automatic credit notes; revenue by product category or department (sales are by tax rate, tracked by store); loyalty points earned as a liability; an automatic month-end inventory revaluation; more than one currency; per-store inventory accounts; QuickBooks Online US sales tax; direct sync for Sage, Finance and Operations and QuickBooks Desktop; MYOB desktop files and Business Central on-premises; Xero custom connections; more than one organisation receiving automatic sends at once; reading anything back from the ledger beyond accounts, tax codes, items, tracking, journals, contacts, lock dates and look-ups by Stater reference; attachments; scheduled or emailed exports.