> ## 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.

# Creating a Ledger

> Set up a new Ledger inside your Organization to track another stream of Transactions with full segregation.

A Ledger is the accounting workspace where Assets, Accounts, Routes, and Transactions are isolated. Create a new Ledger when you need a separate balance domain, product line, environment, or accounting model.

## Before you start

***

You need an existing Organization. If this is the first setup, create the Organization first in [Creating an Organization](/en/lerian-console/midaz-console/creating-an-organization).

Decide what the Ledger boundary means before creating it. Avoid using one Ledger for unrelated products if they require different account structures, routes, or operational controls.

## Create the Ledger

***

<Steps>
  <Step>
    From the **Ledgers** page, click the **New Ledger** button in the top-right corner.
  </Step>

  <Step>
    The **New Ledger** form will appear.
  </Step>

  <Step>
    In the **Ledger Details** tab, enter the Ledger name in the **Ledger Name** field.
  </Step>

  <Step>
    (Optional) To include metadata, select the **Metadata** tab. This will display two fields: **Key** and **Value**.

    * To add more metadata, click the plus (+) icon next to the first row.
  </Step>

  <Step>
    (Optional) Select the **Settings** tab to configure validation rules for this Ledger.

    * Enable **Validate Account Type** if Accounts must use registered Account Types.
    * Enable **Validate Routes** if Transactions must follow pre-configured Accounting Routes.
  </Step>

  <Step>
    After completing the form, click **Save**.
  </Step>

  <Step>
    A success message will appear in the top-right corner of the screen, and the new Ledger will be added to the list on the main **Ledgers** page.
  </Step>
</Steps>

## Field guide

***

| Field                 | What to enter                                                                                                                                                             | Example                  |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| Ledger Name           | A clear name for the accounting workspace. Use a name that shows the product, country, environment, or business boundary.                                                 | `Brazil Payments Ledger` |
| Metadata Key          | Optional classification or integration field name.                                                                                                                        | `environment`            |
| Metadata Value        | Value for the metadata key.                                                                                                                                               | `production`             |
| Validate Account Type | Optional setting. Turn on when every Account in this Ledger must use a previously registered Account Type. Leave off if you will not classify Accounts by type yet.       | `Enabled`                |
| Validate Routes       | Optional setting. Turn on only after the Accounting Routes for this Ledger are planned or configured, because Transactions must match a valid route when this is enabled. | `Disabled`               |

<Tip>
  The fields in the Metadata tab are open. There are no predefined keys or values. Use consistent key names across your Organization, such as `environment`, `businessLine`, or `region`, so you can filter and audit Ledgers later.
</Tip>

## Ledger settings

***

The **Settings** tab controls validation rules for the Ledger you are creating.

### Validate Account Type

When this setting is enabled, every new Account in this Ledger must use an Account Type that was previously registered for the Ledger. Enable it when you want operators to classify Accounts consistently, such as `customer`, `merchant`, `treasury`, or `fee`.

<Warning>
  After **Validate Account Type** is enabled, Accounts without a valid Account Type will be rejected.
</Warning>

### Validate Routes

When this setting is enabled, Transactions must match the Accounting Routes configured for this Ledger. Enable it only when your route model is already planned or configured.

<Warning>
  If **Validate Routes** is enabled before routes exist, Transactions that do not match an available route will fail validation.
</Warning>

## What to do next

***

After creating the Ledger:

1. Review whether **Validate Account Type** and **Validate Routes** are correct for this Ledger.
2. Create at least one Asset in [Creating an Asset](/en/lerian-console/midaz-console/creating-an-asset).
3. If you need to change the validation rules later, use the **Settings** tab described in [Managing Ledgers](/en/lerian-console/midaz-console/managing-ledgers-via-console#ledger-settings).

<Card title="API equivalent" type="tip" horizontal>
  [Create a Ledger endpoint](/en/reference/midaz/create-a-ledger)
</Card>
