stdnum.pl.nip

NIP (Numer Identyfikacji Podatkowej, Polish VAT number).

The NIP (Numer Identyfikacji Podatkowej) number consists of 10 digit with a straightforward weighted checksum.

>>> validate('PL 8567346215')
'8567346215'
>>> validate('PL 8567346216')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('PL 8567346215')
'856-734-62-15'
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.pl.nip.checksum(number)

Calculate the checksum.

stdnum.pl.nip.compact(number)

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

stdnum.pl.nip.format(number)

Reformat the passed number to the standard format.

stdnum.pl.nip.is_valid(number)

Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.

stdnum.pl.nip.validate(number)

Checks to see if the number provided is a valid VAT number. This checks the length, formatting and check digit.

Previous topic

stdnum.no.orgnr

Next topic

stdnum.pt.nif