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

ID and bank detail checks for claims
Checks, the ID Types table, test payment files and a pipeline snapshot. Zip, 87 KB.
Download the template

See it in Quantemplate

The pipeline

The ID and bank detail checks pipeline in Quantemplate: all 14 stages listed, from Check IDs to Payments by country, with the test payment file uploaded to stage 1.

The test run’s checks

Part of the validation report for the test file: the check digit rules for PESEL, RUT, CPF, CNPJ, CUIT, HKID, ABN and IRD numbers and the check that the ID suits a person or a business, each flagging 1 row. The checks that the ID type is from the payee’s country and that a payee has an ID are warnings.

The checked output

The Payments checked output from the clean run, the first 12 of 41 rows: each payment’s claim, payee, country and ID type, with the ID number shown only as five asterisks and its last three characters, and blank for businesses with no ID.

What it checks

38 rules 33 Fail 5 Warning

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

  1. 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
  2. Stage 2 Union payments Stack the payment files
  3. Stages 3–4 ID types The ID Types table, and how many ID types each country has for people and for businesses
  4. Stages 5–6 Counts The payments with each payment ID, and the different payees paid to each account
  5. Stages 7–10 Joins Bring each payment’s ID type, its country’s ID types and both counts onto its row
  6. Stage 11 Check payments Run the 27 payee and ID checks and the 11 bank detail and payment checks
  7. 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:

What’s 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

  1. Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
  2. 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.
  3. 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

Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.

Limits