stdnum.us.ptin

PTIN (U.S. Preparer Tax Identification Number).

A Preparer Tax Identification Number (PTIN) is United States identification number for tax return preparers. It is an eight-digit number prefixed with a capital P.

>>> validate('P-00634642')
'P00634642'
>>> validate('P01594846')
'P01594846'
>>> validate('00634642')  # missing P
Traceback (most recent call last):
    ...
InvalidFormat: ...
Traceback (most recent call last):
    ...
InvalidFormat: ...
stdnum.us.ptin.compact(number)

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

stdnum.us.ptin.is_valid(number)

Checks to see if the number provided is a valid ATIN. This checks the length, groups and formatting if it is present.

stdnum.us.ptin.validate(number)

Checks to see if the number provided is a valid PTIN. This checks the length, groups and formatting if it is present.

Previous topic

stdnum.us.itin

Next topic

stdnum.us.rtn