> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Debits and credits

> What debit and credit mean in a banking system: the two ends of a money movement, and why one balance is a wallet to you and a liability to the ledger.

Two words trip up almost everyone the first time they read a banking system: **debit** and **credit**. They sound like accounting jargon, but they name something simple: the two ends of a money movement. A debit is where money comes **from**. A credit is where it **goes**.

## Debit is out, credit is in

***

Every movement of money leaves one account and arrives in another. Those two ends have names:

* A **debit** is the account money moves **out of** (the **source**).
* A **credit** is the account money moves **into** (the **destination**).

When you send R\$100 to a merchant, your account is **debited** (money out) and the merchant's account is **credited** (money in). One movement, two sides.

```mermaid theme={null}
flowchart LR
    S["Your account<br/>(source)"]:::debit
    M(("Movement<br/>R$100")):::bal
    D["Merchant account<br/>(destination)"]:::credit
    S -->|"debit · R$100 out"| M
    M -->|"credit · R$100 in"| D
    classDef debit fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
    classDef credit fill:#fde68a,stroke:#d97706,color:#78350f
    classDef bal fill:#f3f4f6,stroke:#6b7280,color:#111827
```

This is how your bank statement already reads: money leaving your account shows as a debit, money arriving shows as a credit.

## Your wallet is not the whole story

***

The everyday intuition and the accounting meaning part ways here.

In your **wallet**, the math is obvious: money in is good, money out is less. When your bank says it **credited** your account, your balance went **up**. A **debit** took money away. So it's tempting to read *credit = add, debit = subtract*.

But that's your wallet's point of view. The **ledger** that holds your money sees the same balance another way. To the institution, your balance is money it **owes you**, not something it owns. Whether a debit or credit grows or shrinks a balance depends on that balance's persisted direction, not account type alone.

So keep the two ideas apart:

* **Wallet thinking** asks: did *my* number go up or down?
* **Accounting thinking** asks: which account did this movement leave (**debit**), and which did it arrive in (**credit**)?

The accounting meaning is the reliable one, and it never changes: **a debit is the source, a credit is the destination**. Whether that raises or lowers a given balance is a *separate* question. The direction persisted on that balance answers it.

## Assets and liabilities: the two sides of the ledger

***

Each balance in a Ledger has a **direction**. That direction, not an account category alone, decides whether a debit or credit changes its available amount.

In Midaz, a balance direction is `debit` or `credit`:

* A balance with direction **`debit`** increases its available amount on a debit and decreases it on a credit.
* A balance with direction **`credit`** increases its available amount on a credit and decreases it on a debit.

An account type can supply a default direction, but Midaz applies the direction persisted on the balance. For every **[asset](/en/products/midaz/assets)** you define (BRL, USD, a loyalty point), the Ledger automatically keeps an external account named after it (`@external/BRL`, `@external/USD`). You can also define your own named external accounts.

<Note>
  Same R\$100, two truths: it's an **asset** in your wallet and a **liability** on the institution's Ledger. Both are right. They are the two sides of the same movement. [The outside world](/en/start-here/fundamentals/core-banking/external-accounts-and-reconciliation) follows the asset side across the boundary.
</Note>

## The iron rule: debits always equal credits

***

**Total debits always equal total credits**. Every movement is recorded on both sides at once: the same amount out of the source and into the destination. The two sides match exactly. If they don't, something is wrong, and the books say so.

Take that R\$100 payment. R\$100 leaves your account as a debit and R\$100 arrives in the merchant's account as a credit. One event, two entries, totals equal:

```mermaid theme={null}
flowchart LR
    D["Your account<br/>DEBIT R$100"]:::debit
    C["Merchant account<br/>CREDIT R$100"]:::credit
    D --- BAL{{"Total debits R$100<br/>= Total credits R$100"}}:::bal
    C --- BAL
    classDef debit fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
    classDef credit fill:#fde68a,stroke:#d97706,color:#78350f
    classDef bal fill:#dcfce7,stroke:#16a34a,color:#14532d
```

The money didn't appear or vanish. It moved from one account to another, and the matching debit and credit prove it. This is the engine behind **double-entry bookkeeping**: every movement written down twice, once as it leaves and once as it arrives.

<Tip>
  An **[operation](/en/products/midaz/operations)** is the smallest Midaz record of a balance effect. A non-pending transfer can produce a source debit and destination credit. Pending or canceled flows can also include `ON_HOLD` or `RELEASE` operations.
</Tip>

<Note>
  **See also in Core Banking**

  See what debit and credit mean from the ledger's side in [How money is recorded](/en/start-here/fundamentals/core-banking/double-entry-explained).
</Note>

## Next steps

***

<Note>
  **Next up**

  Debits and credits only make sense as a pair. See how they work together in [Double-entry bookkeeping](/en/start-here/fundamentals/accounting/double-entry-bookkeeping).
</Note>
