Swiss QR-bill payment reconciliation
Banking Switzerland
Checks each invoice’s QR reference and QR-IBAN against SIX’s rules, matches the bank’s credits to the invoices by QR reference, and gives each invoice a status: paid, part-paid or unpaid.
From SIX: Swiss Implementation Guidelines for the QR-bill, version 2.4
- 14validation rules
- 19pipeline stages
- 3 minto build and check
See it in Quantemplate
The pipeline

The flow

The checked output

What it checks
14 rules 10 Fail 4 Warning
- QR reference27 digits, the right check digit, and used on one invoice only 3 Fail 3
- Account and amountA QR-IBAN with the right check digits, CHF or EUR, and an amount the QR-bill allows 4 Fail 4
- InvoicesOverpaid, part-paid and overdue invoices 1 Fail, 2 Warning 3
- PaymentsUnknown references, wrong currencies or accounts, and duplicates 2 Fail, 2 Warning 4
A rule set to Fail marks its rows as failed, and any failure blocks Auto Export if you set it up. Warnings are only reported. Validation never removes a row. Every rule and its formula is listed in VALIDATIONS.md in the download.
How the pipeline works
- Stage 1 Invoices Tidy the invoices and work out each QR reference’s check digit and each account’s QR-IID and IBAN check digits
- Stages 2–3 Payments Tidy each bank file and stack them
- Stage 4 Reconcile A Join with Reconciliation on: each reference’s payments allocated to its invoice, with any surplus recorded
- Stages 5–6 Statement date The latest booking date, added to every invoice
- Stages 7–10 Totals Invoices per reference, per reference and currency, and per reference and account
- Stage 11 Invoice status What’s outstanding, each invoice’s status and the 10 invoice checks
- Stages 12–17 Check payments Bring the counts onto each payment and run the 4 payment checks
- Stages 18–19 Outputs QR-bill invoice status, and QR-bill payment checks
What’s in the download
- The 14 checks as JSON, and a table of every check with its formula and notes
- Invoices and payments files: good, and with rows built to fail each check
- The status each test invoice should get, and the number of rows each check should flag
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline
SIX’s guidelines aren’t included. Download the current version from SIX’s QR-bill page.
Build it
- Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
- With Claude in Chrome signed in to Quantemplate, ask Claude Code:
Build the Swiss QR-bill pipeline from the swiss-qr-bill folder.
- Claude creates the datasets and stages, runs the test data and checks every rule’s result. This takes around 3 minutes.
The agent builds through the Quantemplate app’s own API in your browser. That API isn’t published, so if a release changes it, the build stops and tells you what went wrong. Review what the agent builds before you rely on it.
Using real invoices and payments
- Keep the QR-bill Invoices dataset up to date with your open invoices by dropping a new file on it. References and IBANs can have spaces, as printed on the bill.
- Save the credits from your bank’s camt.054 notifications as CSV, with the columns of the payments test file, and add each file as an upload to stage 2.
- Stage 4 allocates each reference’s payments to its invoice with Reconciliation. Change its settings there to allocate differently.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- Payments are matched by QR reference only. Bills with a creditor reference (SCOR) or no reference aren’t matched, so RP01 flags their payments.
- A reference used on two invoices is flagged by QB03, and its payments go to the invoice due first.
- Bank charges taken off a payment leave its invoice part-paid.
- Amounts aren’t converted. A payment in another currency than its invoice is flagged by RP02.
- The statement date is the latest booking date in the payments, so an unpaid invoice due after it isn’t overdue yet.
- The invoices and payments are made up. The Swiss franc QR-IBAN is the example in SIX’s guidelines.
- The build doesn’t set up Auto Run, Auto Export or feeds.
- The agent works through the app in your browser, so changes someone makes in the app whilst it’s working can trip it up.