Participants
- Your institution. Your system creates, commits and cancels the transactions in Midaz.
- Midaz. The ledger. It asks Tracer before it moves any balance, and confirms or releases the capacity that Tracer holds.
- Tracer. Evaluates your active rules, holds capacity on your spending limits, and returns the decision to Midaz.
Before you start
- Midaz is connected to Tracer in your environment.
- The Tracer mode in your ledger settings is
advisoryorenforce. The default isoff. Change it withPATCH /v2/organizations/{organization_id}/ledgers/{ledger_id}/settings. See ledger settings. - Your rules and spending limits are ACTIVE in Tracer. See Set up rules and spending limits.
Diagram
Transaction
Pending transaction
How you know it finished
Midaz returned the transaction, or the committed or canceled pending transaction.
Rules
- The v1 transaction routes do not call Tracer. On a ledger in
enforcemode, Ledger HTTP v1 refuses a transaction that moves balances with0574. - In
advisorymode, Midaz calls Tracer and never blocks the transaction. - In
enforcemode, when Tracer does not answer in time,tracer.failPosturedecides. Withopen, the transaction goes on without the check. Withclosed, Midaz rejects it. - When no rule matches, Tracer does not apply the default decision on this path.
- Tracer records each decision as a validation with the
transactionIdof the transaction. Find it withGET /v1/validationsandtransaction_id. To read the limit holds of the transaction, callGET /v1/validations/{validation_id}/reservations. - Tracer checks the source accounts that Midaz sends, each with its segment, portfolio and the amount that leaves it, and stops at the first
DENY. The amount includes fees. A source that Tracer refuses refuses the whole transaction. The validation of a transaction with more than one source lists the outcome of each source insources. - Tracer receives only scalar metadata values, as text. Compare them as strings in the rules for this path.
- A revert counts against your spending limits. Tracer does not apply your rules to it.
- If a confirmation or a release does not reach Tracer, the result of the transaction does not change.
- A request can skip the Tracer check with
skip.traceronly when the ledger settingoverrides.allowTracerSkipistrue.
What can go wrong
The codes
0177, 0531, 0532, 0535 and 0178 come only from a ledger in enforce mode.
The Midaz error list describes each code.

