ID and bank detail checks for claims
Insurance All territories
Checks claims payments before they’re made: that each claimant’s or payee’s ID has the right layout and check digits for its country, from Belgium’s national number to Brazil’s CNPJ, that it suits the payee, and that the IBAN or CBU they’re paid to is valid and not shared with another payee. It checks the IDs without keeping them.
From the published check digit rules of 14 national ID and tax numbers, Swift’s IBAN Registry and Argentina’s CBU rules
- 38validation rules
- 14pipeline stages
- 14ID types
- 3 minto build and check
See it in Quantemplate
The pipeline

The test run’s checks

The checked output

What it checks
38 rules 33 Fail 5 Warning
- PayeeClaim ID, payment ID given and not used twice, payee name, PERSON or BUSINESS, and an ISO 3166 country 5 Fail 5
- ID formatThe ID type, an ID given for it, and the ID’s length, layout, repeated characters and birth date 6 Fail 6
- ID check digitsThe check digits of each ID type, one rule per check method: the DNI and NIE share one 13 Fail 13
- ID and payeeThe ID suits a person or a business, comes from the payee’s country, and is given where the country has one 1 Fail, 2 Warning 3
- Bank detailsThe account type, characters and length, an IBAN’s country, length and check digits, a CBU’s check digits, the BIC, and that the BIC, account and payee are in the same country 6 Fail, 2 Warning 8
- PaymentNo account paid to different payees, an ISO 4217 currency and an amount over 0 2 Fail, 1 Warning 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
- Stage 1 Check IDs Clean each payment file, work out every ID’s layout, birth date and check digits and the account’s check digits, then take the IDs out
- Stage 2 Union payments Stack the payment files
- Stages 3–4 ID types The ID Types table, and how many ID types each country has for people and for businesses
- Stages 5–6 Counts The payments with each payment ID, and the different payees paid to each account
- Stages 7–10 Joins Bring each payment’s ID type, its country’s ID types and both counts onto its row
- Stage 11 Check payments Run the 27 payee and ID checks and the 11 bank detail and payment checks
- Stages 12–14 Outputs Every payment with its masked ID and the columns its checks use, and the number and total of payments by country, ID type, account type and currency
The ID types it checks
Each ID type is a row in the ID Types dataset, with its country, who has it, its shortest and longest length and its check method. A payee with no ID has the type NONE.
ID |
Who has it |
What’s checked |
|---|---|---|
Belgian national number or BIS number, BE-NN |
People |
Modulo 97, and the birth date |
Dutch BSN, NL-BSN |
People |
The 11-proof |
Swedish personnummer or samordningsnummer, SE-PIN |
People |
Modulus 10, and the birth date |
Spanish DNI, ES-DNI, and NIE, ES-NIE |
People |
The check letter, modulo 23 |
Italian codice fiscale, IT-CF |
People |
The check letter, and the birth date |
Polish PESEL, PL-PESEL |
People |
Weights 1, 3, 7 and 9, and the birth date |
Chilean RUT or RUN, CL-RUT |
People and businesses |
Modulo 11, with K for 10 |
Brazilian CPF, BR-CPF |
People |
Two check digits, modulo 11 |
Brazilian CNPJ, BR-CNPJ |
Businesses |
Two check digits, modulo 11, for numeric and alphanumeric CNPJs |
Argentine CUIT or CUIL, AR-CUIT |
People and businesses |
Its first two digits, and modulo 11 |
Hong Kong identity card, HK-HKID |
People |
Modulo 11, with A for 10 |
Australian ABN, AU-ABN |
Businesses |
Modulo 89 |
New Zealand IRD number, NZ-IRD |
People and businesses |
Its range, and modulo 11 with a second set of weights when the first gives 10 |
Accounts can be IBANs, checked against each country’s length in Swift’s IBAN Registry and by modulo 97, Argentine CBUs, checked by their two check digits, or other accounts, checked for their characters and length.
How it keeps IDs private
Claimants’ IDs are personal data, so the pipeline checks them without keeping them:
- Stage 1 works out everything the checks need from each ID: its length and layout, the birth date in it, and the check digits its type’s rule expects.
- Its last step replaces the ID number with five asterisks and its last three characters, and empties every column that held the ID or a birth date from it.
- Every later stage, both outputs and the validation report only ever see the masked ID. Payees on the same account are told apart by their ID type and those last three characters.
- The file you upload to stage 1 still holds the full IDs until you remove it, so remove each upload once it has run.
What’s in the download
- The 38 rules as JSON, and a table of every rule with its formula, notes and source
- The ID Types table: 14 ID types, with each one’s country, who has it, its length and its check method
- 41 fictional claims payments to claimants and repairers in 16 territories, with generated IDs and accounts, 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
The national rules and Swift’s IBAN Registry aren’t included. Each rule’s source is listed in VALIDATIONS.md, and 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 ID and bank detail checks pipeline from the id-bank-checks folder. Test it with the test file and the good file and compare the results with the expected ones.
- Claude creates the ID Types 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 claims payments
- Give your payment file the same columns as the test file, one row per claims payment: Claim ID, Payment ID, Payee name, Payee type, Payee country, ID type, ID number, Account type, Account, BIC, Currency and Amount. A claims system’s payment list or a payment run both work.
- Write the payee type as PERSON or BUSINESS, and the ID type as a code from the ID Types table, such as NL-BSN or BR-CNPJ, or NONE. The account type is IBAN, CBU or OTHER.
- IDs and accounts can be written as they’re printed, with spaces, dots, dashes, slashes and brackets, such as a Hong Kong ID with its check digit in brackets.
- A country whose ID uses one of the check methods already here is a new row in the ID Types dataset. A new check method needs its own calculated columns in stage 1, a layout in stage 11 and its own 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 country and shared account checks are warnings, so they don’t block Auto Export. Set them to Fail if they should stop the payment.
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 ID or account with the right check digits might not exist, or might belong to someone else. IDs aren’t matched to the payee’s name or date of birth, and accounts aren’t checked with the bank: banks in the EU check the payee’s name against the account for euro payments.
- Two payees on the same account whose IDs have the same type and last three characters count as one payee, so the shared account check can miss them.
- 29 February is accepted in any year, and a birth date in the future isn’t caught.
- A CUIT’s first two digits aren’t matched to the payee type. Business IDs other than RUTs, CNPJs, CUITs, ABNs and IRD numbers, such as VAT numbers, aren’t covered: give those payees the type NONE.
- Accounts other than IBANs and CBUs are only checked for their characters and length. The payment references template checks more account types.
- The payees are made up, and their IDs and accounts are generated with the right check digits. 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.