Link a ledger account settlement to an invoice

Creating and linking LAS and Invoice

  1. Create a pending Ledger Account Settlement through the Create Ledger Account Settlement API. The settlement object is in processing status initially;
  2. Once the Ledger Account Settlement is processed successfully, Modern Treasury sends a ledger_account_settlement.finished_processing webhook, which contains status, amount, direction, ledger_transaction_id among other fields;
  3. Create an invoice through the Create Invoice API and set the ledger_account_settlement_id parameter to the LAS's id. The LAS and the Invoice are now linked together.
  4. The Create Invoice also has the optional boolean field of ingest_ledger_entries , if the ledger_account_settlement_id is passed and this is set to true, then the invoice will create line items from the ledger account settlement’s itemized ledger entries, summing to the ledger account settlement’s amount decimal. When using ingest_ledger_entries the currency of the ledger account settlement passed must match the invoice currency. If ingest_ledger_entries is set to false or not passed then invoice line items must be passed normally as described in Create an Invoice.
  5. Optionally the invoice creation flow may also be done through the UI

Status Updates

An invoice always has 1 “active” payment object attached to it. This connection is explained further in the Invoice Payment Object Connection guide. The ledger account settlement linked to the invoice will accordingly track that object’s status as indicated in linking a ledger account settlement to a payment object.

In the case that an invoice is manually marked as paid the attached ledger account settlement will be posted. When the invoice is voided the attached expected payment is archived, leading to the LAS being archived.