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.
- In
advisorymode, Midaz calls Tracer and never blocks the transaction. - In
enforcemode, when Tracer does not answer in time,tracer.failPosturedecides. Withopen, the default, 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 checks the account of the first source of the transaction, with its segment and portfolio. The amount includes fees.
- 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.

