Link a ledger account to an internal or external account

You can link External Accounts or Internal Accounts to ledger accounts.

When a payment order is created with these accounts, a ledger transaction will be automatically generated. This means that the money movement between a ledgerable internal account and a ledgerable external account will be accounted for and automatically ledgered.

When creating an external account in its create API, you can pass in a ledger account parameter, which creates a new ledger account and links it to the external account. An existing external account can also be linked to a Ledger Account in its Update API via the ledgerable_id and ledgerable_type fields.

An internal account can be linked to a ledger account through its Update API via the ledger_account_id parameter, or through setting the ledgerable_id and ledgerable_type fields on a ledger account on create or update.

Note: Ledger transactions are created asynchronously, so the ledger_transaction_id will not be in the payment order response. For this information, please instead listen to the ledger_transaction.created or payment_order.auto_ledgered webhooks.

Balance Reconciliation

A ledger account can be linked to an internal account in order to maintain an internal representation of the bank account on your ledger. As payments are created with corresponding ledger transactions, the ledger account balance will reflect the balance of these payments.

To aid with reconciliation, Modern Treasury allows you to compare this ledger account balance to balance reports provided by the bank. To view this comparison, navigate to the internal account in your dashboard and click the "Ledgers" tab.

If a ledger account balance drifts from the balance provided by the bank, this may indicate that transactions from the bank have failed to reconcile. The Reconciliation view can help you identify these transactions.