Link a Ledger Account Settlement and Expected Payment
Creating and linking LAS and EP
- Create a
pendingLedger Account Settlement through the Create Ledger Account Settlement API. The settlement object is inprocessingstatus initially; - Once the Ledger Account Settlement is processed successfully, Modern Treasury sends a
ledger_account_settlement.finished_processingwebhook, which containsstatus,amount,direction,ledger_transaction_idamong other fields; - You could then create an Expected Payment through the Create Expected Payment API and set the
ledger_transaction_idparameter to the LAS'sledger_transaction_id. The LAS and the EP are now linked together through a common Ledger Transaction.
Status updates
When the Expected Payment is reconciled: Modern Treasury updates the Ledger Account Settlement and the Ledger Transaction to posted and sends ledger_account_settlement.posted and ledger_transaction.posted webhooks
When the Expected Payment is unreconciled or partially_reconciled: The Ledger Account Settlement is updated to pending, and it's ledger_transaction is updated to the latest pending ledger_transaction given that Ledger Transactions are immutable once posted.
When the Expected Payment is archived: The Ledger Account Settlement stays in pending. You could either unarchive the Expected Payment, or archive the Ledger Account Settlement so that the Ledger Entries are available for future Settlements to pick up. Note that once a Ledger Account Settlement is archived, it cannot be restored.
| Expected Payment status | Ledger Transaction status | status |
|---|---|---|
unreconciled, partially_reconciled | pending | pending |
reconciled | posted | posted |
archived | archived | pending |
Look up an LAS's linked EP
A Ledger Account Settlement and a Expected Payment are linked together through their common Ledger Transaction. In order to look up the linked EP from an LAS, you would:
- Get the
ledger_transaction_idof the LAS; - Retrieve the Ledger Transaction by calling the Get Ledger Transaction API with its ID. The Ledger Transaction's
ledgerable_typeisexpected_payment, theledgerable_idis the Expected Payment ID.
Look up an EP's linked LAS
A Ledger Account Settlement and a Expected Payment are linked together through their common Ledger Transaction. In order to look up the linked LAS from an EP, you would:
- Get the
ledger_transaction_idof the Expected Payment; - Query the Ledger Account Settlements by passing in the
ledger_transaction_idparameter. There should only be one LAS returned.
Updated 10 months ago