What are Accounting Entries
A rubric maps a transaction action to the ledger accounts the engine must debit and credit. Instead of computing each classification by hand, you register rubrics once. Midaz then resolves them automatically as it processes transactions. Each rubric carries:
code— a unique identifier (the chart of accounts code, e.g.,1.1.1.001).description— a human-readable label for the entry (e.g.,Customer checking — outbound).- A set of action mappings — one entry per action type, each with its own debit and/or credit rubric.
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. Source routes require the debit rubric. Destination routes require the credit rubric. Bidirectional routes require both.
The 8 action types
Each action represents a distinct transactional event. The first five actions cover the transaction lifecycle. The last three cover overdraft, block, and unblock movements. A single rubric can map different debit and credit accounts for each action. Every stage of an operation then lands on the right ledger entry.
Overdraft classifies companion operations that the engine generates automatically during overdraft usage and repayment. Block and unblock classify operations that the dedicated block and unblock transaction endpoints produce. You register the rubrics for all three the same way as 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, the transaction proceeds normally when no rubric matches an action. Midaz leaves therouteCode and routeDescription fields empty (nil) for that operation. It raises no error.
Strict (opt-in)
Setaccounting.validateRoutes to true in the Ledger Settings to require a registered rubric for every action. Midaz then rejects any operation whose action and direction has no registered mapping. It returns error 0117 ErrAccountingRouteNotFound.
- routeCode — the
codeof the resolvedAccountingRubricfor that action and direction. - routeDescription — the description of the resolved rubric, populated alongside
routeCode.

