Parses a camt.053 or camt.054 XML body and emits one or more candidate reconciliation keys per booked entry, ordered by confidence.
The carrier-extraction logic considers all six standard carriers (EndToEndId, InstrId, StrdCdtrRef, Ustrd, AcctSvcrRef, SplmtryData) and re-ranks them under the bank-handler logic at apps/api/src/lib/bank-recon-handlers/. Customers pin a bank handler via the optional bank field.
The free-text Ustrd carrier is regex-parsed with a default invoice-id pattern (/[A-Z]{2,}[-_]?\d{4,}[-_]?\d+/). Override via ustrd_key_pattern for tenants whose invoice ids do not match the default.
The actual matching against the customer's expected-payments list is a separate route — POST /v1/reconcile — fed with the candidate list this route returns.
See apps/api/src/routes/camt053.ts and the parser at apps/api/src/lib/camt053-parser.ts.