stdnum.nl.btw

Btw-identificatienummer (Omzetbelastingnummer, the Dutch VAT number).

The btw-identificatienummer (previously the btw-nummer) is the Dutch number for identifying parties in a transaction for which VAT is due. The btw-nummer is used in communication with the tax agency while the btw-identificatienummer (EORI-nummer) can be used when dealing with other companies though they are used interchangeably.

The btw-nummer consists of a RSIN or BSN followed by the letter B and two digits that identify the number of the company created. The btw-identificatienummer has a similar format but different checksum and does not contain the BSN.

More information:

>>> validate('004495445B01')
'004495445B01'
>>> validate('NL4495445B01')
'004495445B01'
>>> validate('NL002455799B11')  # valid since 2020-01-01
'002455799B11'
>>> validate('123456789B90')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.nl.btw.compact(number)

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

stdnum.nl.btw.is_valid(number)

Check if the number is a valid btw number.

stdnum.nl.btw.validate(number)

Check if the number is a valid btw number. This checks the length, formatting and check digit.