> ## 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 an Accounting Route

> Create a new Accounting Route in the Console using the 3-step wizard to define transaction routes, operation routes, and accounting scenarios.

You create an Accounting Route through a guided 3-step wizard. The wizard walks you through the transaction route, the operation routes with their accounting scenarios, and a final review.

## Before you start

***

Create the Account Types and Accounts that the route validates. If you have not chosen the operation type, the validation type, and the accounting scenarios yet, read [Accounting rules](/en/midaz/console/mc-accounting) first.

<Warning>
  If you enable **Validate Routes** for the Ledger, every transaction must match an existing route. Do not enable route validation until the required Accounting Routes are ready.
</Warning>

## Step 1: Basic information

***

<Steps>
  <Step>
    From the **Accounting Routes** page, click **New Route**.
  </Step>

  <Step>
    The creation wizard opens on **Step 1 — Basic information**.
  </Step>

  <Step>
    Fill in the basic information:

    * **Title** (required): a descriptive name for this transaction route. You must fill in this field to continue.
    * **Description** (optional): a description of the route's purpose. If you leave it empty, the wizard submits and stores an empty description.
  </Step>

  <Step>
    Click **Next** to proceed to Step 2.
  </Step>
</Steps>

## Step 2: Operation Routes

***

In this step, you add and configure the operation routes. Operation routes define how the ledger validates accounts and records accounting entries.

<Note>
  A **Bidirectional** operation route acts as both source and destination. When you later create a transaction, the ledger matches a bidirectional route on **both** the source side and the destination side. A single route can then validate both ends of the flow.
</Note>

<Steps>
  <Step>
    Click **Add Operation Route** to create your first operation route card.
  </Step>

  <Step>
    Configure the operation route:

    * **Title** (required): a name for this operation route. The operation route has a single required text field and no separate description field. You cannot advance to the next step until you fill it in.
    * **Operation Type**: `Source`, `Destination`, or `Bidirectional`.
    * **Validation Type**: Optionally configure `Account Type` or `@Alias` to validate accounts. An Operation Route can omit the account validation rule.
    * **Account Type or Alias**: the selected Account Type values or the specific account alias.
  </Step>

  <Step>
    *(Optional)* Configure **Accounting Scenarios** to define how the ledger records entries. Toggle on the scenarios you need:

    <Tabs>
      <Tab title="Direct Transaction">
        Standard one-step transaction. Define the **Account Code** and **Description** for:

        * **Debit** — The account code debited on execution
        * **Credit** — The account code credited on execution

        <Tip>
          For Direct Transactions, which sides appear depends on the operation type. Source routes show debit only, destination routes show credit only, and bidirectional routes show both. Other scenarios may differ — see the Two-Step Transaction tab for details.
        </Tip>
      </Tab>

      <Tab title="Two-Step Transaction">
        Transactions with a hold-then-commit cycle. Configure entries for each phase:

        * **Hold (Value Reserve)** — Entries that record reserved funds
        * **Commit (Reservation Confirmation)** — Entries that confirm the reservation
        * **Cancel (Reservation Cancellation)** — Entries that cancel the reservation. Fill these fields too: the ledger validates Hold, Commit, and Cancel as an atomic group and rejects the route when the Cancel mapping is missing.

        The available entry fields vary by operation type:

        * **Source** — Hold and Cancel show both debit and credit fields. Commit shows debit only.
        * **Destination** — Only the Commit phase appears, with credit only. Hold and Cancel are not available.
        * **Bidirectional** — All phases show both debit and credit fields.
      </Tab>

      <Tab title="Reversal">
        Entries that record the reversal of a completed transaction. Define the debit and credit account codes and descriptions for the reversal entries.

        <Note>
          The Reversal scenario is only available for **Bidirectional** operation routes.
        </Note>
      </Tab>

      <Tab title="Overdraft">
        Entries that apply when a debit exceeds the account's available funds and draws on an overdraft line. Define the debit and credit account codes and descriptions for the overdraft draw and later repayment.

        <Note>
          Overdraft is available for **Source**, **Destination**, and **Bidirectional** operation routes. When you enable Overdraft, the wizard also enables the Direct scenario, because an overdraft draw settles through a direct entry.
        </Note>
      </Tab>

      <Tab title="Block">
        Entries that record blocking and unblocking funds on an account. Configure two independent sections, **Block** and **Unblock**. Each section is all-or-nothing: leave it empty to use the default entries, or fill in both the account code and the description for every visible side.

        <Note>
          Block is available for all operation types. Source routes show debit entries only, destination routes show credit entries only, and bidirectional routes show both.
        </Note>
      </Tab>
    </Tabs>
  </Step>

  <Step>
    *(Optional)* Click **Add Operation Route** again to add more operation routes to this Accounting Route.

    <Warning>
      You must add at least one source and one destination operation route, or at least one bidirectional route. The wizard will not proceed without a valid route configuration.
    </Warning>
  </Step>

  <Step>
    Click **Next** to proceed to Step 3.
  </Step>
</Steps>

## Step 3: Review

***

<Steps>
  <Step>
    Review the complete configuration:

    * Transaction route title and description
    * Each operation route with its type, validation rules, and accounting entries
    * Accounting scenarios with debit and credit entries per transaction type
  </Step>

  <Step>
    To adjust anything, click **Previous** to go back.
  </Step>

  <Step>
    Click **Create Transaction Route** to create the Accounting Route.
  </Step>
</Steps>

## Field guide

***

### Basic information

| Field       | What to enter                                                         | Example                                            |
| ----------- | --------------------------------------------------------------------- | -------------------------------------------------- |
| Route Title | Required route name. Keep it short and specific to the business flow. | `Pix Transfer Route`                               |
| Description | Optional explanation of what the route validates or records.          | `Handles Pix transfers between customer accounts.` |

### Operation route

| Field                 | What to enter                                                                                                                                       | Example                               |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| Title                 | Required name for this operation route card. Must be filled before advancing; there is no separate description field.                               | `Checking account validation for Pix` |
| Type                  | Accounting side this operation route applies to: `Source`, `Destination`, or `Bidirectional`. This cannot be changed after creation.                | `Bidirectional`                       |
| Validation Type       | Optional account-validation rule. Use `Account Type` for account classes or `@Alias` for a specific account. An Operation Route can omit this rule. | `Account Type`                        |
| Account Type or Alias | Account Types or aliases accepted by this operation route.                                                                                          | `customer`                            |
| Accounting Scenarios  | Transaction scenarios this route should record: Direct, Two-Step, Reversal, Overdraft, or Block.                                                    | `Direct Transaction`                  |
| Account Code          | Accounting code used in the debit or credit entry for the selected scenario.                                                                        | `1.1.1.001`                           |
| Entry Description     | Entry-level description shown in the scenario configuration.                                                                                        | `Customer checking - outbound`        |

## Quick example

***

<Accordion title="Pix Transfer with Direct and Two-Step scenarios">
  **Transaction Route**

  | Field       | Value                                                     |
  | ----------- | --------------------------------------------------------- |
  | Title       | `Pix Transfer Route`                                      |
  | Description | `Handles Pix instant transfers between checking accounts` |

  **Operation Route 1 — Bidirectional**

  | Field           | Value                                 |
  | --------------- | ------------------------------------- |
  | Title           | `Checking account validation for Pix` |
  | Operation Type  | `Bidirectional`                       |
  | Validation Type | `Account Type`                        |
  | Account Types   | `checking`                            |

  **Direct Transaction scenario**

  | Side   | Account Code | Description                    |
  | ------ | ------------ | ------------------------------ |
  | Debit  | `1.1.1.001`  | `Customer checking — outbound` |
  | Credit | `1.1.1.002`  | `Customer checking — inbound`  |

  **Two-Step Transaction — Hold**

  | Side   | Account Code | Description                   |
  | ------ | ------------ | ----------------------------- |
  | Debit  | `1.1.1.001`  | `Customer checking — reserve` |
  | Credit | `2.1.1.001`  | `Pending settlement — hold`   |

  **Two-Step Transaction — Commit**

  | Side   | Account Code | Description                    |
  | ------ | ------------ | ------------------------------ |
  | Debit  | `2.1.1.001`  | `Pending settlement — release` |
  | Credit | `1.1.1.002`  | `Customer checking — settled`  |
</Accordion>

## What to do next

***

After you create the route, create a transaction that matches the same account types, aliases, and scenario in [Creating a Transaction](/en/midaz/console/creating-a-transaction).

<CardGroup cols={2}>
  <Card title="Create Transaction Route" icon="code" href="/en/reference/midaz/create-transaction-route">
    Create the transaction-level route via API.
  </Card>

  <Card title="Create Operation Route" icon="code" href="/en/reference/midaz/create-an-operation-route">
    Create operation-level routing rules via API.
  </Card>
</CardGroup>
