Flow
ServicesAccounting Service

Accounting Service

Chart of accounts and event publishing — the first production service on the platform.

The accounting service implements the Chart of accounts: The hierarchical set of accounts in one jurisdiction; codes are unique per chart, classifications are a closed enum, and parent links form a tree. slice: create accounts with hierarchy, Account classification: One of asset, liability, equity, revenue, or expense; required on every account and used to derive normal balance and financial statement placement., postability, Cedar authz, and Transactional outbox: Each domain inserts events into its own <domain>_events table in the same transaction as the state change; a publisher drains unpublished rows to Azure Service Bus. publishing of account.created to Azure Service Bus.

Accounting also owns journal entries and their balanced debit/credit lines. The service boundaries and billing integration are documented in docs/accounting/accounting.md and Billing accounts and invoices.

Domain
Services
Kind
Go HTTP service
Lifecycle
Active
flowctl project
None
Stacks
Runs on its own

Response shape note

Accounting uses the platform {header, payload} envelope. Journal entry data appears under payload.data. See services/accounting/openapi.yaml for the current contract.

Transfer transaction dates

Billing can correct the recorded transaction date of a posted account transfer through POST /v1/journal-entries/{id}/transaction-date. Accounting verifies the original transfer's creation record and its transfer ID. Only the Billing service may call this operation. The transfer must be unreversed, and its posting month must be Open or Soft-closed. Changing the transaction date does not move the posting to another month. The period check and update share a transaction with the calendar lock.

The operation changes occurred_on and updated_at. It preserves the journal ID, lines, amounts, accounts, dimensions, entry date, post month and creation data. This bounded exception to posted-entry immutability is recorded in docs/decisions/0118-correcting-a-transfer-transaction-date.md. The update and before-and-after date event commit atomically; the reason is on the PII feed. An identical retry returns the stored result even if the month has since closed.

Domain docs

Detailed design notes also live under docs/accounting/chart-of-accounts.md and docs/accounting/open-questions.md.

The demo app is documented in docs/accounting/demo-app.md.

Billing machine calls require ACCOUNTING_TOKEN_JWKS_URL and ACCOUNTING_TOKEN_ISSUER. Accounting verifies the https://accounting.flow.internal audience and accepts only svc-billing machine subjects through this path. Browser calls retain Cloudflare Access. Missing machine verification configuration disables that path without changing browser access.

Legal-entity listing is granted to staff, controllers, platform admins, and the named Payments (payments) and Billing (svc-billing) system principals. Payments uses it to validate fee schedules; Billing uses it to resolve the legal entity calendar for transfers.

On this page