stdnum.us.ein

EIN (U.S. Employer Identification Number).

The Employer Identification Number, also known as Federal Employer Identification Number (FEIN), is used to identify a business entity in the United States. It is issued to anyone that has to pay withholding taxes on employees.

>>> validate('91-1144442')
'911144442'
>>> get_campus('04-2103594') == 'Brookhaven'
True
>>> validate('911-14-4442')  # dash in the wrong place
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> validate('07-1144442')  # wrong prefix
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> format('042103594')
'04-2103594'
stdnum.us.ein.compact(number)

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

stdnum.us.ein.format(number)

Reformat the passed number to the standard format.

stdnum.us.ein.get_campus(number)

Determine the Campus or other location that issued the EIN.

stdnum.us.ein.is_valid(number)

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

stdnum.us.ein.validate(number)

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

Previous topic

stdnum.us.atin

Next topic

stdnum.us.itin