code and description. They annotate an operation after route resolution. Operation Route rules and transaction legs determine the participating accounts.
What are Accounting Entries
A rubric maps a transaction action and route direction to an accounting classification. Instead of computing each classification by hand, you register rubrics once. Midaz then resolves them automatically as it processes transactions. Each rubric carries:
code: an accounting code (for example,1.1.1.001).description: a human-readable label for the entry (e.g.,Customer checking — outbound).
accounting.validateRoutes) enabled and a matching rubric registered, it resolves the rubric for each operation. It records the resulting routeCode and routeDescription on the operation. This gives you a complete audit trail from transaction to operation to rubric. Your teams can trace exactly which accounting rule applied to each movement.
Configure rubrics per action on each Operation Route. For
direct and commit actions, Source routes require the debit rubric and Destination routes require the credit rubric. Dedicated block and unblock rubrics are optional. If they are absent, Midaz resolves the direct rubric for those actions. Source-side hold and cancel actions require both rubrics, and overdraft requires both on every supported route type. Bidirectional routes always require both.The 9 action types
Each action is a distinct transactional event. The first five actions cover the transaction lifecycle. The next three cover overdraft, block, and unblock movements. The last one covers transactions that span Ledgers. An Operation Route can map different debit and credit rubrics for each action. Every stage of an operation then receives the right accounting annotation. The Hold and Cancel rows show a balance with
direction: credit. On a direction: debit balance, a hold increases available and a cancel decreases it. onHold moves the same way on both.
Overdraft classifies companion operations that the engine generates automatically during overdraft usage and repayment. For every supported route type and direction, configure both the debit and credit rubrics. Block and unblock can use dedicated rubrics for operations that the block and unblock transaction endpoints produce. Without those rubrics, those actions use the
direct rubric. When needed, register dedicated rubrics for these actions in the same way as for the other actions.
Configuring Accounting Entries
You register rubrics through the API as part of your Operation Routes. The
accountingEntries block on a route defines one entry per action. Each entry carries its debit and/or credit rubric:
Validation modes
Midaz reacts to a missing rubric based on the Ledger’s accounting settings. Two distinct gates control this behavior:
Default (graceful)
By default (accounting.validateRoutes disabled), Midaz does not resolve rubrics at all: the transaction proceeds normally and the routeCode and routeDescription fields stay empty (nil) for every operation. It raises no error.
Strict (opt-in)
Setaccounting.validateRoutes to true in the Ledger Settings to enforce route validation. In strict mode, Midaz returns 0157 when no Operation Route of the Transaction Route has an entry for the requested action. It returns 0117 when a leg names no Operation Route, or one that the Transaction Route does not provide for that action. An overdraft movement on a route without an overdraft entry returns 0492.
- routeCode: the
codeof the resolvedAccountingRubricfor that action and direction. - routeDescription: the description of the resolved rubric, populated alongside
routeCode.

