> For the complete documentation index, see [llms.txt](https://host2host.onibonje.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://host2host.onibonje.com/docs/26-reconciliation.md).

# Reconciliation Architecture

## 1. Overview

**Module:** `h2h-reconciliation`

Matches platform postings against partner confirmation files, Finacle settlement reports, and internal ledgers. Unmatched items flow to the **reconciliation workbench** ([admin](/docs/05-low-code-admin-platform.md)).

***

## 2. Architecture

```mermaid
flowchart TB
  subgraph sources [Data Sources]
    TX[payment_instruction posted]
    PARTNER[Partner confirm file]
    FIN[Finacle settlement report]
  end

  subgraph recon [h2h-reconciliation]
    AGG[EOD Aggregate Job]
    MATCH[Matching Engine]
    EXC[Exception Buckets]
  end

  subgraph ui [Admin]
    WB[Recon Workbench]
  end

  TX --> AGG
  PARTNER --> AGG
  FIN --> AGG
  AGG --> MATCH
  MATCH --> EXC
  EXC --> WB
```

***

## 3. Configuration (`recon_config`)

| Field               | Description                                 |
| ------------------- | ------------------------------------------- |
| `matching_keys`     | `["bankReference", "amount", "valueDate"]`  |
| `tolerance_amount`  | 0.01                                        |
| `tolerance_days`    | 2                                           |
| `exception_buckets` | UNMATCHED, AMOUNT\_MISMATCH, DATE\_MISMATCH |

***

## 4. Matching Algorithm

1. Exact match on primary keys (bankReference)
2. Fuzzy match on amount + date + customerReference within tolerance
3. Unmatched → `recon_item` status `EXCEPTION`
4. Analyst manual match → `recon_match`

***

## 5. SPI

`ReconMatcherProvider` — custom matchers via plugin JAR (e.g. treasury-specific).

***

## 6. Jobs

| Job                      | Type         | Schedule        |
| ------------------------ | ------------ | --------------- |
| `EOD_RECON_AGGREGATE`    | SQL\_TASK    | Daily 23:00     |
| `RECON_AUTO_MATCH`       | CAMEL\_ROUTE | After aggregate |
| `RECON_EXCEPTION_REPORT` | SCRIPT       | Daily 06:00     |

***

## 7. Error Codes

`RECON_001`–`RECON_004` — see [Error Catalog](/docs/31-error-code-catalog.md).

***

## 8. Related Documents

* [22 Use Cases](/docs/22-use-cases-and-solutions.md) UC-11
* [30 Database Schema](/docs/30-database-schema-reference.md)
* [14 Extensibility Framework](/docs/14-extensibility-framework.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://host2host.onibonje.com/docs/26-reconciliation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
