To match CODA bank statements to invoices, import the file, read the structured communication from each movement and validate its check digits. Match each valid reference to one open invoice, post only unambiguous matches automatically, and send the rest to manual review.
Key takeaways
- A CODA file is a bank-produced export in which each movement record carries the payment communication that links a payment to an invoice.
- Validate the check digits of every structured reference before using it as a matching key, because a mistyped reference can point to the wrong invoice.
- Post automatically only when exactly one open item agrees on reference, amount and counterparty, and route every other case to a reviewer.
- Store the original file and log each match decision so that every posting can be traced and the import can be replayed.
What does a CODA file contain?
A CODA file is an electronic account statement exported by a Belgian bank, listing the movements on one account over a period. It consists of fixed-width records: a header for the account, movement records with dates, amounts and descriptions, and balance records that close the statement.
Two details matter most for reconciliation. The first is the booking date and the value date, because a payment can settle on a different day than it was recorded. The second is the structured communication field, where the payer writes the reference that links the payment to an invoice. Free-text descriptions also appear, but they vary by bank and by payer, so they are weak keys for matching.
Because the file is produced by the bank in a fixed layout, it is a reliable record of what reached the account. It does not explain why the money was sent, which is why matching needs a second step after parsing.
How do you import a CODA file step by step?
Import runs in four stages: parse, validate, store and pass the movements on. Log each stage separately so that a failure can be traced to the step that caused it.
Parse and validate the file
Parsing reads the header, movement and balance records. Validation confirms that the opening balance plus the movements equals the closing balance. If the arithmetic does not close, reject the whole file instead of importing part of it, because a partial import is harder to reconcile than a rejected file sent again.
Store the original file
Keep the untouched file with its checksum and import time. When someone later asks why a payment was posted to a given invoice, the original file is the evidence, and the import can be replayed against it.
Pass movements on for matching
Credit movements are the main input for receivables, while debit movements matter for supplier payments. Pass each movement with its date, amount, counterparty name, structured reference and original line number, so that every later decision can point back to the source line.
How do you match CODA bank statement lines to invoices?
You match a line by normalising its structured reference, looking up that key among open invoices and confirming the amount. A match is accepted automatically only when exactly one open item agrees on all three.
Normalise and check the reference
The Belgian structured communication is a twelve-digit number written in the form +++xxx/xxxx/xxxxx+++. The last two digits are a check value calculated with modulo 97 over the first ten digits, and a remainder of zero is written as 97. The rules sit within the Belgian banking sector, and the federation Febelfin (Febelfin home page) is a starting point for the sector's documentation. A reference that fails the check was probably mistyped or truncated, so it should not be used as a key. Strip the separators and plus signs for comparison, but keep the original string for audit.
Apply the three checks
- The reference must match exactly one open invoice.
- The amount must equal the open balance, or fall within a tolerance you have set and documented.
- The counterparty name should be consistent with the customer on the invoice, where the bank supplies a name.
A line that passes all three checks can post automatically. A line that passes only the first check goes to a review queue with the candidate invoice attached, so the reviewer sees the reasoning rather than starting from zero. For background on how these flows connect to other systems, see the integration and API articles on the Rui Codex blog.
Choose the amount tolerance carefully
A small tolerance absorbs bank fees and rounding differences, but a wide tolerance produces silent errors. Set it per customer or per currency only where you have seen a real pattern, and log every match made inside the tolerance so it can be audited later.
When does automatic matching fail?
Automatic matching fails when the key is missing, invalid, shared or wrong. Each failure class needs its own response, so classify failures rather than sending everything to one queue.
- Missing reference: the payer typed a description or left the field empty. Use name and amount only as suggestions for review.
- Invalid check digits: the reference was mistyped. Do not correct it automatically, because the nearest valid number may belong to another invoice.
- Shared reference: one reference covers several invoices, as with a batch payment. Split the amount only when the payer's remittance data supports the split.
- Partial payment: the amount is lower than the open balance. Record a partial settlement rather than forcing a match.
- Overpayment: the amount exceeds the open balance. Hold the excess for a decision.
The trade-offs are real. Stricter rules reduce wrong postings but increase manual work, while looser rules reduce the queue and raise the number of corrections that accountants must reverse. Where the review volume is high, an AI automation project can help classify the remaining cases, but the posting rules should stay deterministic and reviewable.
Hypothetical examples of matching failures
Here are two hypothetical scenarios: the first is a wholesaler and the second a services company, and neither describes a real organisation.
In the first scenario, a payer's banking app transposes two digits in the structured reference, so the check value fails. The import flags the line as invalid, a reviewer finds the invoice by name and amount, and the correction is recorded against the original line number. Nothing is posted automatically.
In the second scenario, a payer reuses one reference across a monthly batch, and two open invoices share that reference and the same amount. Automatic matching stops, and the reviewer confirms the split against the remittance email. The lesson is that identical amounts defeat amount checks, so any ambiguity must stop automation.
How should personal data in statements be handled?
Bank statements contain personal data such as names, account numbers and payment descriptions, so access to imported files should be limited to the people who reconcile them. The GDPR (Regulation (EU) 2016/679 on EUR-Lex) governs how that personal data is processed, and the regulation text is the place to check the specific principles. This article is general information, not legal or tax advice.
On the technical side, restrict access by role, encrypt stored files and log who viewed or changed a match. Rui Codex offers technical implementation support for these systems through its system integration services, but it does not provide legal, tax or compliance advice.
What should a go-live checklist cover?
A go-live checklist confirms that import, matching and review behave correctly on real files before anyone relies on them. Run it on several periods of files, not on a single clean statement.
- Opening and closing balances reconcile with the movements in each file.
- Re-importing a file creates no duplicate postings.
- Every rejected reference has a documented review route.
- The amount tolerance is written down and logged for each match.
- Reviewers can see the candidate invoice and the original line.
- Access to statement files is restricted and audited.
Once the checklist passes, a staged rollout works better than switching every account at once. Start with the accounts whose references are most consistent, then widen the scope as the review queue shrinks. If you want a second opinion on your import design, you can request a project consultation or email info@ruicodex.com.
Frequently Asked Questions
What is a CODA file?
A CODA file is an electronic bank statement exported by Belgian banks, listing the movements on one account in fixed-width records. It holds header, movement and balance records, so software can read each field by its position. Each movement carries the date, amount and communication that a reconciliation process needs.
Can a CODA line be matched without a structured reference?
Yes, but only with lower confidence. Matching then relies on amount, date and counterparty name, which can collide when several customers pay the same amount. Route those lines to review rather than posting them automatically, and log the decision for audit.
What does a failed check digit mean?
A failed check digit means the twelve-digit structured communication does not satisfy the modulo 97 check, so it was probably mistyped or truncated by the payer. Do not correct it automatically, because the nearest valid number may belong to a different invoice. Send the line to a reviewer with the original string attached.
Should CODA imports run automatically?
Import can be scheduled, but posting should stay gated by the matching rules. Automate the deterministic parts, such as parsing and storing files, and keep ambiguous matches with people until review data justifies a change to the rules.
How do I check whether my matching works?
Sample the posted matches each period, track how many lines reach review and why, and check a set of corrections against the original files. A rising share of reversals suggests a rule is too loose, while a large queue suggests it is too strict.
Conclusion
CODA bank statements give you a reliable record of what reached an account, but the payment reference is what links that record to an invoice. Validate the reference, match only unambiguous cases automatically, and keep a traceable record of every decision. Measure the review queue after go-live and adjust the rules where the data points. If your team is planning this kind of reconciliation and wants an engineering review of the design, you can request a project consultation with Rui Codex.
Sources
- Regulation (EU) 2016/679 (General Data Protection Regulation) - EUR-Lex, Publications Office of the European Union
- Febelfin - Febelfin, the Belgian federation of the financial sector