Commit a settlement
settlement_commitSettles multiple open splits from a prior preview for a debt between two members in one step; pass the preview result unchanged, and re-preview if debts changed and the call returns 409.
Instructions
Marks the open splits listed by a settlement_preview as settled in one step, for the debt from fromMemberId to toMemberId. Run settlement_preview first and pass its result unchanged as expected; if the debts changed in between, the call fails with 409 settlement_changed, then preview again. Use it to settle several shares at once; for one share use expense_split_settle, to record a cash payment over the whole net debt use cash_payment_record. The caller must be one of the two members (otherwise not_party_to_debt). Moves no money. Notifies the other member and writes an audit entry.
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": {
"fromMemberId": "<fromMemberId>",
"toMemberId": "<toMemberId>",
"currency": "<currency>",
"expected": "<expected>"
},
"name": "settlement_commit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wgCode | No | Share code of the flat (code from wg_list). Leave it out when the account belongs to one flat. | |
| currency | Yes | Currency of the debt to settle. Debts in different currencies are settled separately. | |
| expected | Yes | The settlement_preview result for the same members and currency, passed back unchanged. It proves what the caller reviewed; extra keys such as remainingCents are ignored. | |
| toMemberId | Yes | Member who is owed the money; same value as in the preview. | |
| fromMemberId | Yes | Member who owes the money and pays; same value as in the preview. |