Link a Ledger Account Settlement to an Invoice
Creating and linking LAS and Invoice
- Create a
pending
Ledger Account Settlement through the Create Ledger Account Settlement API. The settlement object is inprocessing
status initially; - Once the Ledger Account Settlement is processed successfully, Modern Treasury sends a
ledger_account_settlement.finished_processing
webhook, which containsstatus
,amount
,direction
,ledger_transaction_id
among other fields; - Create an invoice through the Create Invoice API and set the
ledger_account_settlement_id
parameter to the LAS'sid
. The LAS and the Invoice are now linked together. - The Create Invoice also has the optional boolean field of
ingest_ledger_entries
, if theledger_account_settlement_id
is passed and this is set totrue
, 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 usingingest_ledger_entries
the currency of the ledger account settlement passed must match the invoice currency. Ifingest_ledger_entries
is set to false or not passed then invoice line items must be passed normally as described in Create an Invoice. - 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
.
Updated 6 months ago