Automatic payment matching: references, bank statements and exceptions
Automatic payment matching with invoices and orders works reliably when every document gets a unique payment reference, the bank delivers that reference in a structured statement and the system follows a clear order of rules. A payment with an exact reference, amount and currency is closed automatically. Partial payments, overpayments, payments without a reference and lump-sum payments go to an exception queue with a suggested resolution that a person decides on.
This guide is for companies and online stores that accept bank transfers and manually compare bank statements with unpaid documents. It explains how to choose a reference, where to get bank data, how to set up the rules and what to check before go-live.
Why manual matching stops being enough
With a few payments a week, manual checking is manageable. The problem starts when the next step depends on the payment: shipping an order, activating a service, releasing a customer’s credit limit or stopping reminders. Any delay is then felt by the customer, and any mistake turns into an unjustified reminder or goods shipped without payment.
Automation does not mean that the system guesses. A good design separates payments with an unambiguous match from payments that need a human decision. People then deal only with the second group and see all the supporting data for it.
The foundation is a unique payment reference
Matching is only as good as the identifier the payer sends with the money. If several open documents share the same reference, or the customer has to copy it from a confusing email, no rule will reliably fix that later.
The variable symbol in Slovak payments
According to the Slovak Banking Association specification, the variable symbol (VS) carries payment reference information used to match the payment to, for example, a loan, a contract or a payer. It is numeric and has at most 10 digits. The specific symbol also has at most 10 digits and the constant symbol at most 4. In SEPA payments, the symbols are transferred end to end, from the payer to the beneficiary, in the End-to-End Identification field in the form /VS…/SS…/KS…. If no reference was given, the value NOTPROVIDED is used (SBA: payment symbols in SEPA).
The notation can still differ by bank and channel. Since 18 March 2024, UniCredit Bank in Slovakia, following a recommendation of the National Bank of Slovakia, has mapped the symbols to the End-to-End Identification field with a “?” prefix, i.e. ?/VS…/SS…/KS…. According to its notice, the prefix is not displayed in electronic statements but is displayed in the transaction history in BusinessNet (UniCredit Bank: change in payment symbol mapping). Your parser must therefore accept both forms and should be tested on real statements from your bank.
Recommendation: use an order or invoice number as the variable symbol that is purely numeric, has at most 10 digits and does not start with zero. Leading zeros are easily lost during manual retyping or a spreadsheet export, so normalise them on both sides when comparing.
The RF reference for foreign payers
The variable symbol is a Slovak national convention, so a foreign payer may not have a dedicated field for it in their bank. For such customers, the international structured creditor reference RF under ISO 11649 is a better fit. It starts with the letters RF, followed by two check digits calculated with the same algorithm as for IBAN (ISO/IEC 7064, MOD 97-10), so typing errors can be caught at entry. It is printed in groups of four characters, and it is recommended to keep it as short as possible. Finance Finland, the Finnish financial sector federation, states in its guide that in ISO 20022 XML statements the reference is shown in full in the Creditor Reference Information field if the payer entered it in RF format (Finance Finland: RF reference).
Example: order number 20261234 produces the reference RF11 2026 1234. Generate and validate the check digits in code, never by hand.
Where to get the bank data
A PDF statement is meant for people. Automation needs structured data that the system can read without guessing. ISO 20022 defines the following messages for communication between a bank and its customer (ISO 20022: Bank-to-Customer Cash Management):
| Message | Content according to ISO 20022 | Use in payment matching |
|---|---|---|
| camt.053 – account statement | booked entries and the balance at a given point in time | final matching, period close and balance checks |
| camt.054 – credit or debit notification | one or more credit or debit entries | ongoing confirmation of individual payments, if the bank provides it |
| camt.052 – account report | pending and booked items and balance information | ongoing overview, if the bank provides it; a pending item is not yet a payment |
Agree with your bank which messages you will receive, through which channel and how often. Finance Finland notes that a bank may provide data on received reference payments as agreed, either as a separate file or on an account statement (Finance Finland). Always store the original file so that you can repeat and document the processing.
Practical example: morning matching in an online store
This is an illustrative example, not a case study. An online store offers payment by bank transfer. For order 20261234 it shows the customer the IBAN, the amount of €149.90 and the variable symbol 20261234. A business customer from abroad sees the reference RF11 2026 1234 instead of the symbol. The morning statement contains four credits:
| Statement entry | Evaluation | What happens |
|---|---|---|
| VS 20261234, €149.90 | exact match of reference, amount and currency with one order | the order is marked as paid and released for shipping |
| VS 20261240, €100.00 for an order total of €120.00 | reference matches, amount is lower | status “partially paid”, shipping waits, task for sales |
| no VS, remittance text “ord 20261251 Novák”, €89.00 | order number only in free text | the system suggests a candidate, a person confirms it |
| €640.00 with the VS of one of three invoices of a B2B customer | amount equals the total of three open invoices | suggested split across three invoices, confirmed in accounting |
If the same statement arrives a second time, for example after a download failure, nothing is booked again. Every bank entry has a unique key in the system and is processed only once.
How to implement matching step by step
- Define the source of truth. Decide where the authoritative payment information is created (online store, invoicing, ERP or accounting) and which systems should only be updated.
- Generate the reference when the document is created. One order or invoice has one reference. Show it the same way in the order confirmation, on the invoice, in the QR payment and in the customer account.
- Validate inputs. The variable symbol contains digits only and at most 10 characters; for RF, the check digits are verified.
- Automate statement intake. Store the original file, the time of receipt and the processing result.
- Normalise references. Remove the “?” prefix, split
/VS/SS/KS, remove spaces from RF, and unify letter case and leading zeros. - Set the order of rules. Close automatically only an exact match of reference, amount and currency with a single open document. Only suggest all other cases.
- Ensure idempotency. The key of an entry is the identifier from the bank, if the statement contains one. A fallback combination of account, date, amount and reference may not distinguish two identical payments on the same day, so use it with care.
- Connect follow-up actions. Order status changes, stopping reminders and releasing shipments are triggered only by a booked entry, not by a confirmation sent by the customer.
- Introduce an exception queue. Every exception has a reason, a suggested resolution, an owner and a deadline. The decision is written to the audit trail.
- Reconcile totals daily. The sum of matched and unmatched credits must equal the sum of credits in the statement.
Benefits and tradeoffs
Speed versus certainty
A notification or account report can deliver information before the statement, but the final basis is the booked entry. If you ship based on a pending item, you need a procedure for when it changes or is not booked. It is safer to ship goods only after booking.
Full automation versus suggestions
The more rules close payments automatically, the less manual work there is, but the more expensive each mistake becomes. Use matches by amount, payer name or remittance text only as suggestions, because several orders can have the same amount at the same time.
Custom integration versus accounting software features
If your accounting or ERP system already matches statements, it is often better to transfer its result to the online store than to build a second, parallel record. A custom solution makes sense when you need immediate actions in the online store or application, your own exception rules or a connection between several systems through API integration.
Common mistakes
- One variable symbol for all of a customer’s documents without a rule for which invoice the payment settles.
- Matching by amount only.
- Shipping based on a screenshot or a payment order confirmation.
- A parser that does not handle the “?” prefix, empty symbols or the value NOTPROVIDED.
- Reminders sent before the latest statement has been processed.
- Manual fixes directly in the database without a record of who changed the status and why.
- Overpayments and refunds handled without agreement with the accountant.
Pre-launch checklist
- Every open document has a unique reference visible wherever the customer pays.
- The bank delivers structured statements automatically, and you know when they arrive.
- The parser has been tested on real statements, including a payment without a symbol, with the “?” prefix and with an RF reference.
- Only an unambiguous match of reference, amount and currency is closed automatically.
- Importing the same statement again changes nothing.
- Exceptions have an owner, a deadline and an audit trail.
- Reminders and shipping wait until the latest statement has been processed.
- The daily total of matched and unmatched credits agrees with the statement.
Frequently asked questions
Do I need a bank API for payment matching?
Not necessarily. It is enough if the bank automatically delivers structured statements or notifications, for example camt.053 or camt.054, and they contain the payment reference. The delivery method affects speed, but the matching rules stay the same.
What if the customer forgets the variable symbol?
The payment goes to the exception queue. The system can suggest candidates based on the amount, the remittance text or the payer’s account, but confirmation belongs to a person. If the candidate is unclear, contact the customer before you cancel the order.
Can AI make matching decisions?
AI can help find a candidate in the free remittance text. Decisions about money and order status should, however, be made by deterministic rules and, in unclear cases, by a person. Every suggestion must be explainable and verifiable.
How should partial payments and overpayments be handled?
Define the rules in advance: whether a partial payment blocks shipping, when the customer receives a request for the outstanding amount and how an overpayment is refunded. Agree on them with your accountant so that the status in the online store and in accounting does not diverge.
How to start
The best starting point is a sample of real statements and a list of the exceptions you currently handle manually. From these, rules can be designed that automatically close unambiguous cases and send the rest for review. See how we approach process automation and custom online stores on our homepage, browse more articles on our blog, or write to us and we will go through what can be automated in your process together.
Sources
- Slovak Banking Association: Additional Optional Service applied in Slovakia to SEPA Credit Transfer (SCT) – payment symbols in SEPA
- UniCredit Bank: SEPA payments – changes to the mapping of payment symbols and payment debit date from 18 March 2024 – the “?” prefix in the End-to-End Identification field
- Finance Finland: Introduction of the global structured creditor reference (RF) in Finnish companies – structure and reporting of the RF reference
- ISO 20022: Message Definition Report Part 2 – Bank-to-Customer Cash Management (Maintenance 2018–2019) – camt.052, camt.053 and camt.054 messages