Checking german BIC/Account #s
C Ruby
Switch branches/tags
Pull request Compare This branch is 35 commits ahead of provideal:master.
Latest commit 7f2b81a May 26, 2013 @jeanmartin version 0.4.4



Check whether a certain bic/account-no-combination can possibly be valid for a German bank.

It uses the C library konto_check (see by
Michael Plugge.


An example tends to tell more than a 1000 words:

>> require "konto_check"

>> KontoCheck::init("./blz.lut")

# konto_check?(blz, ktno) => true/false (valid/invalid)
>> KontoCheck::konto_check?("52250030", "52001")

>> KontoCheck::konto_check?("52250030", "52002")

# ISO-8859-1 encoded name of bank
>> KontoCheck::bank_name("10010010")

# there is more, RTFS or wait for/help creating more examples...

Short ‘Documentation’

KontoCheck::konto_check?(<blz>, <kto>)

check whether the given account number kto can possibly be
a valid number of the bank with the bic blz.


initialize the underlying C library konto_check with bank
information from the LUT file lut_file.
The LUT file can be created from the plain text file
found at:
This file is updated every three months, so be sure to
replace (and regenerate) it regularly.

There will be a rake task to update the LUT file soon.


returns the name of the bank as a (ISO-8859-1 encoded)
string or raises a runtime error with a short error message
if an error occurred (invalid blz, blz too short, etc.).
This may be changed in the future to simply return nil (should be discussed).


Since the original is
licensed under LGPL, so is this module.