close_agreement
Close an agreement for good — the terminal true-up at the END of its life (its term ended, or it's being wound down). Closing posts a final true-up Adjustment that matches the accrual to the settled amount (open → $0), THEN FREEZES the agreement: it moves to 'closed' and NO new transactions ever calculate against it again. This is NOT the periodic run (compute_close) or the periodic payout (settlement) — it ends the agreement. Because it MOVES MONEY (the true-up Adjustment), call WITHOUT confirm first to DRY-RUN — it reports the adjustment that would post and that the agreement will be frozen. Call again with confirm:true to post it and close. Terminal. Needs the agreement_id. Requires a connected Aurgus account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Administrative close flag, recorded on the audit trail (the true-up always resolves the open balance regardless). | |
| reason | No | Why it's being closed — recorded on the audit trail. | |
| confirm | No | Omit/false to DRY-RUN (preview the terminal true-up + freeze); true to post the Adjustment and close. | |
| agreement_id | Yes | The agreement to close (terminal). |