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

> Record a new Transaction in the Console to move Asset balances between Accounts in your Ledger.

A Transaction moves value between Accounts in a Ledger. Create one only after the Asset, source account, destination account, and any required Accounting Route are ready.

## Before you start

***

Confirm that:

* The source and destination Accounts exist in the selected Ledger.
* Both Accounts use the Asset selected for the Transaction.
* You know each Account alias, including the `@` prefix.
* Source accounts allow sending and destination accounts allow receiving.
* If **Validate Routes** is enabled, the Transaction matches an existing Accounting Route.

## Create the Transaction

***

<Steps>
  <Step>
    From the **Transactions** page, click the **New Transaction** button.
  </Step>

  <Step>
    The **New Transaction** modal will open. Select the type of transaction you want to create:

    * **Simple 1:1** - Transactions using one source and one destination
    * **Complex n:n** - Transactions using more than one source or destination
  </Step>

  <Step>
    After selecting the transaction type, the **New Transaction** page opens with a step-by-step form:

    <Steps>
      <Step title="Transaction Data">
        Fill in the basic transaction information:

        * (Optional) Add a **Description** for the transaction
        * (Optional) Specify an **Accounting route group** for classification
        * Enter the **Value** (amount) to be transferred
        * Select the **Asset** that will be used in the transaction
      </Step>

      <Step>
        Click **Next** to proceed to the accounts selection step.
      </Step>

      <Step title="Source and Destination">
        Specify the accounts involved:

        * Search for the **source account** by alias and select it
        * Search for the **destination account** by alias and select it
        * For complex transactions, you can add multiple sources and/or destinations

        <Warning>
          You **must** use the account alias to perform transactions. Make sure you save it when you create your account.

          If you forget your alias, you can find it by [editing account information](/en/lerian-console/midaz-console/editing-account-information).
        </Warning>
      </Step>

      <Step>
        Click **Next** to proceed to the operations step.
      </Step>

      <Step title="Operations">
        Review and adjust the operation details:

        * For simple transactions (1:1), the amounts are automatically filled
        * For complex transactions (n:n), specify the amount for each source (debit) and destination (credit)
        * Expand each operation to add optional descriptions and metadata

        <Note>
          For complex transactions, the sum of all source amounts must equal the sum of all destination amounts.
        </Note>
      </Step>
    </Steps>
  </Step>

  <Step>
    When all the information is correct, click the **Go to Review** button.
  </Step>

  <Step>
    A review page will be displayed showing a summary of all the transaction information:

    * Transaction value and asset
    * Source and destination accounts
    * Individual debit and credit operations
    * Metadata records (if any)
  </Step>

  <Step>
    Review the information carefully. If everything is correct:

    * Click **Send Transaction** to submit and view the transaction details
    * Click **Send and Create another** to submit and immediately start a new transaction
  </Step>

  <Step>
    Upon success, you will be redirected to the transaction details page showing the transaction summary, data, and status.
  </Step>
</Steps>

## Field guide

***

| Field                  | What to enter                                                                                                  | Example                        |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| Transaction type       | Choose `Simple 1:1` for one source and one destination, or `Complex n:n` for multiple sources or destinations. | `Simple 1:1`                   |
| Description            | Optional business description of the movement.                                                                 | `Customer payment to merchant` |
| Accounting route group | Optional route classification when your setup uses route validation or grouping.                               | `Pix Transfer Route`           |
| Value                  | Total amount to move. For complex transactions, source totals must equal destination totals.                   | `100.00`                       |
| Asset                  | Asset used by the Transaction. It must match the selected Accounts.                                            | `BRL`                          |
| Source account         | Account alias that will be debited. Include the `@` prefix.                                                    | `@customer_123`                |
| Destination account    | Account alias that will be credited. Include the `@` prefix.                                                   | `@merchant_456`                |
| Operation amount       | Amount assigned to each source or destination operation. Required in complex transactions.                     | `100.00`                       |
| Metadata Key           | Optional classification or integration field name.                                                             | `externalReference`            |
| Metadata Value         | Value for the metadata key.                                                                                    | `order_98765`                  |

## Transaction types explained

***

### Simple Transaction (1:1)

Use for straightforward transfers between two accounts:

* One source account (debit)
* One destination account (credit)
* Same amount debited and credited

**Example**: Transfer \$100 from Customer A to Merchant B.

### Complex Transaction (n:n)

Use for transactions involving multiple parties:

* Multiple source accounts (debits) and/or multiple destination accounts (credits)
* Amounts can be distributed across accounts
* Total debits must equal total credits

**Examples**:

* Payment with fees:
  * Customer pays \$103
  * Merchant receives \$100
  * Fee account receives \$3
* Consolidated payment: Multiple customers fund a single vendor payment

<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 `externalReference`, `orderId`, or `channel`, to link Transactions back to source systems for reconciliation and audit.
</Tip>

## What to do next

***

After sending the Transaction, review the details page and confirm the status, source operation, destination operation, and account balances.

<CardGroup cols={2}>
  <Card title="Create a Transaction using JSON" icon="code" href="/en/reference/midaz/create-a-transaction-using-json">
    Create a Transaction programmatically with the JSON endpoint.
  </Card>

  <Card title="Retrieve a Transaction" icon="file-search" href="/en/reference/midaz/retrieve-a-transaction">
    Inspect the Transaction status and operations via API.
  </Card>
</CardGroup>
