ledger_apply_payments
FIFO reconciliation: payments onto invoices, oldest due first, ties keep input order; payments apply in the order given — the engine never reorders your cash. Cent-level exact Decimal, sub-cent inputs refused with a pointer, over-application leaves a named leftover instead of smearing onto the newest invoice. Refunds are credit notes, not negative payments. Free.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"invoices": "<invoices>",
"payments": "<payments>"
},
"name": "ledger_apply_payments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoices | Yes | ||
| payments | Yes |