stdnum.be.iban

Belgian IBAN (International Bank Account Number).

The IBAN is used to identify bank accounts across national borders. The Belgian IBAN is built up of the IBAN prefix (BE) and check digits, followed by a 3 digit bank identifier, a 7 digit account number and 2 more check digits.

>>> validate('BE32 123-4567890-02')
'BE32123456789002'
>>> validate('BE41091811735141')  # incorrect national check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> validate('BE83138811735115')  # unknown bank code
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> validate('GR1601101050000010547023795')  # not a Belgian IBAN
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> to_bic('BE 48 3200 7018 4927')
'BBRUBEBB'
>>> to_bic('BE83138811735115') is None
True
stdnum.be.iban.compact(number)

Convert the iban number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.be.iban.format(number, separator=' ')

Reformat the passed number to the space-separated format.

stdnum.be.iban.is_valid(number)

Check if the number provided is a valid Belgian IBAN.

stdnum.be.iban.validate(number)

Check if the number provided is a valid Belgian IBAN.