Payment references by country
Finance and banking All territories
Checks payments before they’re sent: that each account and payment reference is well formed and has the right check digits by its country’s rule, from IBANs to Mexico’s CLABE and Norway’s KID, and that euro payments to an IBAN fit a SEPA credit transfer.
From Swift’s IBAN Registry, ISO 13616 and ISO 11649, the EPC’s SEPA credit transfer rulebook and QR code guidelines, and each national scheme’s rules
- 30validation rules
- 14pipeline stages
- 12account and reference types
- 3 minto build and check
See it in Quantemplate
The pipeline

The test run’s checks

The checked output

What it checks
30 rules 28 Fail 2 Warning
- AccountsThe account type, the account’s characters and length, an IBAN’s country and length, and the check digits of IBAN, CLABE, CBU, Bankgiro, Plusgiro and Norwegian accounts 9 Fail 9
- BICThe BIC’s format, and that its country is the account’s 1 Fail, 1 Warning 2
- PaymentPayment ID given and not used twice, payee name, ISO 4217 currency and an amount over 0 4 Fail 4
- ReferencesThe reference type, its characters and length, that it’s used in the account’s country, and the check digits of RF, Belgian, Finnish, KID and OCR references 10 Fail 10
- Reference useA reference or remittance text, not both, and no reference used twice for the same account 1 Fail, 1 Warning 2
- SEPA limitsFor euro payments to an IBAN: payee name, remittance text and amount within the SEPA credit transfer and EPC QR code limits 3 Fail 3
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
- Stages 1–2 Prepare Clean each payment file, take the spaces and punctuation out of accounts and references, work out every check digit, and stack the files
- Stages 3–4 Schemes The Payment Schemes table, once for account types and once for reference types
- Stages 5–6 Counts The payments with each payment ID, and with each account and reference
- Stages 7–10 Joins Bring each payment’s account type, reference type and both counts onto its row
- Stage 11 Check payments Run the 11 account checks and the 19 reference and payment checks
- Stages 12–14 Outputs Every payment with the columns its checks use, and the number and total of payments by account type, reference type and currency
What’s in the download
- The 30 rules as JSON, and a table of every rule with its formula, notes and source
- The Payment Schemes table: 12 account and reference types, with each one’s country, length and check method
- 49 fictional claims payments to repairers and suppliers, with accounts in 27 countries, and a test file with a case for each rule
- The rows each rule should flag on the test file
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline, and the Python scripts that generate everything in the download
Swift’s IBAN Registry and the national schemes’ rules aren’t included. The IBAN Registry is on Swift’s IBAN 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 payment references pipeline from the payment-references folder. Test it with the test file and the good file and compare the results with the expected ones.
- Claude creates the Payment Schemes dataset, uploads the test file, builds the 14 stages and checks both test files. 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 your own payments
- Give your payment file the same columns as the test file, one row per payment: Payment ID, Payee name, Account type, Account, BIC, Currency, Amount, Reference type, Reference and Remittance information. A payment run, a claims system’s payment list or an invoice file all work.
- Write each account type and reference type as a code from the Payment Schemes table, such as IBAN, CLABE or SE-BANKGIRO, and RF, BE-STRUCTURED or NO-KID-MOD10. Use NONE where a payment has remittance text instead of a reference.
- Accounts and references can be written as they’re printed, with spaces, dashes and full stops, and a Belgian structured communication with its +++ and slashes.
- A country whose account or reference uses one of the check methods already here is a new row in the Payment Schemes dataset. Estonia’s reference number, for example, uses the same 7-3-1 weights as Finland’s. A new check method needs its own calculated columns and rule.
- Upload each file and add it to stage 1’s inputs. Stage 2 stacks stage 1’s outputs with Linked Stages on, so nothing after it needs changing.
- The BIC country and repeated reference checks are warnings, so they don’t block Auto Export. Set them to Fail if they should stop the data going further.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- It checks check digits, not registers. An account or reference with the right check digits might not exist, or might belong to someone else. BICs are checked for their format, not against Swift’s directory, and payee names aren’t matched to accounts: banks in the EU do that with verification of payee.
- Only an IBAN’s own check digits and length are checked, not the national check digits some countries put inside it, such as Belgium’s and France’s.
- The EPC QR code’s limits are checked on the payment’s fields, not on a code itself. Brazil’s Pix codes and the Czech QR Platba end in a checksum Quantemplate’s formulas can’t work out, so they aren’t covered.
- Whether a payee’s KIDs use MOD10 or MOD11 is agreed with its bank, so the reference type has to say which. The length digit some Swedish payees add to their OCR references isn’t checked.
- Currencies aren’t converted, or checked against the account’s country.
- The payees and their accounts are made up. The accounts use bank codes that national registers showed as unassigned in December 2026, and the BICs start with QTMP, which isn’t in any register we checked.
- 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.