reconcile
Match expected payments against observed bank-statement entries to produce an explainable reconciliation report covering exact matches, adjustments, splits, batches, and unmatched residuals.
Instructions
Reconcile expected payments against observed bank-statement entries.
Purpose: Matches expected payment instructions (e.g. from pain.001) against observed bank transactions (e.g. from camt.053) and produces an explainable reconciliation report covering exact matches, short/over adjustments, split settlements (one-to-many), batch credits (many-to-one), and unmatched residuals.
When to use:
When performing multi-transaction cash reconciliation between ledgers and statements.
When transparent per-match confidence scores and reason breakdowns are required for audit.
When NOT to use:
Do NOT use for raw, unparsed XML files; normalize input documents first using normalize_pain001 or normalize_camt053.
Do NOT use for single-pair tuning analysis; use explain_match instead.
Do NOT use for unconstrained combinatorial invoice subsets; use reconcile_many_to_many.
Behavioral transparency: Pure, deterministic, side-effect-free, read-only calculation without network or disk access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Optional tuning object: 'abs_tol'/'rel_tol' (amount tolerance), 'date_window_days', 'high_threshold', 'review_threshold', 'currency_strict', 'enable_one_to_many', 'max_combination'. | |
| expected | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). | |
| observed | Yes | List of canonical records. Each is an object with 'id' (string) and 'amount' (number) required, plus optional 'currency' (ISO 4217), 'date' (ISO-8601), 'counterparty' (name), 'reference' (remittance/end-to-end id). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||