Prerequisites
Before you begin, make sure the following tools are installed:
Midaz has been tested on macOS (Apple Silicon and Intel) and Linux (amd64). Windows users should run it through WSL2.
Step 1 — Clone the repository
Clone the Midaz repository and move into the project directory.
Step 2 — Set up environment files
Midaz uses
.env files to configure each component. Generate them from the provided examples:
.env.example to .env in each component directory. The default values are ready for local development, so no changes are required.
Step 3 — Start the infrastructure
Start the supporting services required by Midaz: PostgreSQL, MongoDB, Valkey, RabbitMQ, Redpanda, and OpenTelemetry.
Step 4 — Start Midaz
Midaz runs as a single Ledger service that includes the onboarding and transaction domains. Start it with:
200 OK response.
Step 5 — Create an organization
An organization represents the business entity behind the financial operation: your company, a client, or a regulated institution. In production, this maps to the legal entity under which ledgers, accounts, and transactions are managed.
Save the
id returned in the response. You will use it in the next steps as {organization_id}.Step 6 — Create a ledger
A ledger is an isolated book of records within an organization. You can create separate ledgers for different financial domains, such as payments, fee collection, or settlement, each with its own accounts and transaction history.
id as {ledger_id}.
Step 7 — Create an asset
An asset defines the unit of value tracked in the ledger. This can be a fiat currency like BRL or USD, but also loyalty points, crypto tokens, securities, or any custom unit your business needs to move and track. You must create at least one asset before creating accounts.
Step 8 — Create accounts
Accounts represent the participants or buckets in your financial flow: a customer wallet, a revenue pool, a merchant settlement account, or an internal reserve. Each account is linked to a single asset and follows double-entry accounting rules. You need at least two accounts to process a transaction: one to debit (source) and one to credit (destination). Create a source account:
Step 9 — Process your first transaction
This is the core action: moving value between accounts with full traceability. Midaz records every transaction as a balanced operation, debiting the source and crediting the destination so your books stay consistent by design.
This transaction sends R$ 10.00 from
@revenue to @customer-001. The value "1000" represents 10.00 in BRL’s smallest unit, cents.Midaz uses integer values to avoid floating-point precision issues, which is a standard practice in financial systems.Step 10 — Verify the balance
Confirm the transaction was processed by checking the destination account balance.
Explore the API
Midaz can serve its OpenAPI 3.1 spec and interactive API documentation. The docs surface is off by default; enable it by setting
LEDGER_HUMA_DOCS_ENABLED=true in components/ledger/.env and restarting. Then access:
- API docs:
http://localhost:3002/v1/docs - OpenAPI spec:
http://localhost:3002/v1/openapi.json(or/v1/openapi.yaml)
Observability
Midaz ships with a preconfigured Grafana instance integrated with OpenTelemetry.
- Grafana dashboard:
http://localhost:3100 - Default credentials:
midaz/lerian
Stopping Midaz
To stop all services:
Next steps
Creating transactions
Learn the different ways to create transactions, including JSON, inflow, and outflow, and when to use each.
Deploy to production
Deploy Midaz to Kubernetes using the official Helm chart.
Setting up CRM
Manage holders and alias accounts to connect real-world identities to your Midaz accounts.
Extend with plugins
Add Fees Engine, Pix, and other capabilities to your Midaz deployment.

