Skip to main content
Midaz records accounting for real-time financial systems. It uses strict double-entry bookkeeping. It supports digital products, embedded finance, and high-volume operations. Midaz is ledger-centric: it enforces every balance, movement, and posting at the ledger level. You get traceability, auditability, and consistency by default. This page is the entry point for the Accounting section. It introduces the core primitives and shows how they fit together. It also points you to the reference pages and to a hands-on walkthrough of accounting end to end.

How the primitives relate


Midaz turns business events into balanced ledger postings. A small set of primitives builds on each other:

Chart of Accounts

This is the structure of balances your product needs. Midaz has no dedicated Chart of Accounts API. Instead, you model it on a ledger from assets, accounts, segments, portfolios, and account types. The code field on an Accounting Entry (for example 1.1.1.001) carries the traditional account number for each posting.

Account Types

These are reusable classifications that you assign to accounts. Each account type has a name, a key value, and a description. You use account types to group accounts in your financial structure.

Accounting Entries (Rubricas)

For each transaction action, these define a debit rubric and a credit rubric. Each rubric has a code and a description. Midaz stamps the matching rubric onto each operation, based on the operation’s action and direction.

Operations

A transaction produces these balanced ledger movements. An Operation is a single leg of a transaction — one debit or one credit on a specific account. Midaz enforces double-entry, so every transaction generates at least two operations: one debit and one credit. Total debits then equal total credits. Each operation carries a transactionId, an amount, and an assetCode. When the operation route defines accounting entries, the operation also carries a routeCode and a routeDescription from the resolved rubric.
When an operation route defines an accounting entry, Midaz resolves a rubric for the operation’s action and direction. It writes the rubric code to the operation’s routeCode and links the operation with a transactionId. Together, these fields give a complete audit trail: transaction → operation → rubric. Your teams trace which accounting rule applied to each movement, without extra lookups.
At a glance, the flow is:
Diagram showing the Accounting primitives workflow

Accounting primitives workflow

Midaz enforces double-entry at the ledger level, so every transaction always balances. Total debits equal total credits. Balances never drift. Each movement stays fully traceable for audit and compliance.
New to accounting in Midaz? Start with the Accounting Walkthrough. It gives a step-by-step path from the chart of accounts to a working Pix payment example.