Reference extraction should add structure while preserving the evidence supplied by the payer.

01

What the public implementation shows

The BillReferenceMapper recognizes BILL-prefixed invoice references and obvious UPR values, populates the corresponding canonical fields, and preserves or normalizes remittance information under explicit tests.

The mapper sits between ISO remittance content and the CoreBank payment DTO used to associate a transfer with a government obligation. This is the implementation fact behind the note; the architectural reading begins from that visible boundary rather than from an assumed production story.

Operating principleReference extraction should add structure while preserving the evidence supplied by the payer.
02

The decision behind the mechanism

Only recognizable formats become structured invoice or UPR values; unknown text remains remittance rather than being guessed into a financial identifier.

Aggressive parsing can attach a payment to the wrong bill, while no normalization forces every CoreBank integration to reinterpret the same reference syntax. The mechanism matters because it gives that failure a named boundary, durable evidence, and a controlled response instead of leaving the outcome to timing or operator guesswork.

  • Recognize only documented prefixes and shapes.
  • Preserve original remittance evidence.
  • Populate invoice and UPR fields mutually and deliberately.
  • Route ambiguous references to controlled exception handling.
03

How the control should be operated

Reference rules should be versioned, case-aware, whitespace-safe, and tested with valid, empty, ambiguous, and legacy forms.

Government payment matching becomes predictable without losing the payer-provided text needed for exception handling. The reusable lesson is not to copy a class or endpoint in isolation, but to preserve the relationship between identity, state, authority, evidence, and operational ownership.

Field conclusion

Normalize bill references conservatively: extract what is provable and preserve what was actually received.

Public evidence ledger

Inspect the basis for this note.

These links point to public implementation evidence or authoritative documentation used for the claims above. The interpretation is mine; institutional code and ownership remain with their respective owners.

  1. 01
    Bill reference mapper

    The mapper defines the supported remittance-to-reference rules.

    Open source evidence
  2. 02
    Bill reference tests

    The tests fix preservation and normalization behavior for invoice and UPR values.

    Open source evidence