P45 XML File Format

Document Type Definition

The P45 file should be a well formed XML document conforming to the Document Type Definition given here.

<!DOCTYPE P45File [

<!ELEMENT P45File (Employer, (P45 | P45Supp)+)>

<!ATTLIST P45File

currency (E|P) #REQUIRED

formversion CDATA #REQUIRED

language (E|G) #REQUIRED

printer (0|1) #REQUIRED>

<!ELEMENT Employer EMPTY>

<!ATTLIST Employer

number CDATA #REQUIRED

name CDATA #REQUIRED

address1 CDATA # IMPLIED

address2 CDATA #IMPLIED

address3 CDATA #IMPLIED

contact CDATA #REQUIRED

phone CDATA #REQUIRED>

<!ELEMENT P45 (Employee, Employment, Pay, TaxDetails, PRSI, Disability?, Deceased?)>

<!ELEMENT P45Supp (Employee, Employment, Pay, TaxDetails, PRSI, Breakdown?)>

<!ELEMENT Employee EMPTY>

<!ATTLIST Employee

ppsn CDATA #IMPLIED

surname CDATA #REQUIRED

firstname CDATA #REQUIRED

works CDATA #IMPLIED

dob CDATA #IMPLIED

address1 CDATA #IMPLIED

address2 CDATA #IMPLIED

address3 CDATA #IMPLIED>

<!ELEMENT Employment EMPTY>

<!ATTLIST Employment

start CDATA #IMPLIED

end CDATA #REQUIRED

unit CDATA #REQUIRED>

<!ELEMENT Pay EMPTY>

<!ATTLIST Pay

freq (W|M) #REQUIRED

period CDATA #REQUIRED

tfa CDATA #REQUIRED

taxtable CDATA #REQUIRED>

<!ELEMENT TaxDetails EMPTY>

<!ATTLIST TaxDetails

totalpay CDATA #IMPLIED

totaltax CDATA #IMPLIED

thispay CDATA #IMPLIED

thistax CDATA #IMPLIED

lumpsum CDATA #IMPLIED>

<!ELEMENT PRSI (PRSIClass*)>

<!ATTLIST PRSI

total CDATA #REQUIRED

employee CDATA #IMPLIED

weeks CDATA #REQUIRED>

<!ELEMENT PRSIClass EMPTY>

<!ATTLIST PRSIClass

class CDATA #REQUIRED

weeks CDATA #IMPLIED>

<!ELEMENT Disability EMPTY>

<!ATTLIST Disability

benefit CDATA #REQUIRED

tfareduction CDATA #IMPLIED

noncumulative (true|false) #IMPLIED “false”>

<!ELEMENT Deceased EMPTY>

<!ELEMENT Breakdown EMPTY>

<!ATTLIST Breakdown

from CDATA #REQUIRED

to CDATA #REQUIRED

previouspay CDATA #REQUIRED

previousprsi CDATA #REQUIRED

thispay CDATA #REQUIRED

thisprsi CDATA #REQUIRED>

]>

Notes on Elements

The file will consist of a root P45File element.

P45File

The P45File element has the following attributes:

currency / E or P, required / E for Euro, P for Pounds
formversion / Numeric, required / Must be equal to “1” for this version of the file format. Will change with each new edition of the form.
language / E or G, required / E for English and G for Irish
printer / 0 or 1, required / 0 for a laser printer or 1 for a dot-matrix

It then consists of one Employer element and one or more P45 or P45Supp elements.

Employer

The Employer element has the following attributes:

number / Alpha, required / The Employer Number (length 8). Must contain leading zeros e.g. 0000001B
name / Alpha, required / The name of the employer (up to 30 chars)
address1 / Alpha, optional / (up to 30 chars)
address2 / Alpha, optional / (up to 30 chars)
address3 / Alpha, optional / (up to 30 chars)
contact / Alpha, required / Contact Name (up to 20 chars)
phone / Numeric, required / Contact Phone No. (up to 12 chars) Parentheses not required e.g. 06733533

P45

The P45 element has no attributes. It consists of one Employee element, one Employment element, one Pay element, one TaxDetails element , one PRSI element, optionally one Disability element and optionally one Deceased element.

P45Supp

The P45Supp element has no attributes. It consists of one Employee element, one Employment element, one Pay element, one TaxDetails element , one PRSI element, and optionally one Breakdown element.

Employee

The Employee element has the following attributes:

ppsn / Alpha, optional / The PPS (RSI) number of the employee, if known (length 9). Format is 7 numerics (including leading zeros) followed by a check character and Return Level indicator of “space”, “W”, “X” or “T”.
surname / Alpha, required / Employee’s surname (up to 20 chars)
firstname / Alpha, required / Employee’s first name (up to 20 chars)
works / Alpha, optional / Works Number/Staff Number (up to 12 chars)
dob / Date, optional / Date of Birth. Required if PPSN unknown, DD/MM/YYYY
address1 / Alpha, optional / Required if PPSN unknown (up to 30 chars)
address2 / Alpha, optional / Required if PPSN unknown (up to 30 chars)
address3 / Alpha, optional / (up to 30 chars)

Employment

The Employement element has the following attributes:

start / Date, optional / Date of Commencement. Required if employment started during tax year. Not applicable to the P45 Supplementary. DD/MM/YYYY
end / Date, optional / Date of Cessation. Required if employment ended during tax year. DD/MM/YYYY
unit / Numeric, required / Unit number. Three digit numeric, 000 if unknown

Pay

The Pay element has the following attributes:

freq / W or M, required / Frequency of payment, either weekly or monthly
period / Numeric, required / The week number or month number, depending on whether the employee was paid weekly or monthly. (up to 2 numerics)
tfa / Numeric, required / The weekly or monthly TFA (Pence or Cents) for the employee, depending on whether they were paid weekly or montly. (up to 9 numerics) eg, 2100.65 = 210065
taxtable / Alpha, required / The tax table for the employee. (1 char)

TaxDetails

The TaxDetails element has the following attributes:

totalpay / Numeric, optional / Employees total pay (Pence or Cents) for the year. (up to 9 numerics) eg 2100.65 = 210065
totaltax / Numeric, optional / Amount of tax (Pence or Cents) decucted or refunded in total this year(up to 9 numerics). eg 2100.65 = 210065
thispay / Numeric, optional / Payment (Pence or Cents) to employee in this employment. (up to 9 numerics) eg 2100.65 = 210065
thistax / Numeric, optional / Amount of tax (Pence or Cents) decucted in this employment. (up to 9 numerics) eg 2100.65 = 210065
lumpsum / Numeric, optional / Amount of lump sum (Pence or Cents) payed to the employee (up to 9 numerics) eg 2100.65 = 210065

Note that either totalpay and totaltax or thispay and thistax must be present in the P45. Only totalpay and totaltax should be used for a P45 Supplementary.

PRSI

The PRSI element has the following attributes:

total / Numeric, required / Total PRSI contribution (Pence or Cents) (up to 9 numerics) eg 2100.65 = 210065
employee / Numeric, required / Employee’s PRSI (Pence or Cents) (up to 9 numerics) eg 2100.65 = 210065
weeks / Numeric, required / Total weeks insurable employment (Pence or Cents) (up to 9 numerics) eg 2100.65 = 210065

It also consists of one or more PRSI class elements.

PRSIClass

The PRSIClass element has the following attributes:

class / Alpha, required / PRSI class. On a P45, the first instance of this element should have class “A”, with each following instance being something other than class or subclass “A.”
weeks / Numeric, optional / This is the number of weeks at the given class. This is only used when it is a P45 and the class is “A.”

Up to 4 PRSI classes - one at “A” and 3 others - may be provided on a P45, but only one on a P45 Supplementary.

Disability

The Disability element has the following attributes:

benefit / Numeric, required / Disability benefit received by the employee (Pence or Cents) (up to 9 numerics) eg 2100.65 = 210065
tfareduction / Numeric, optional / Amount by which TFA was reduced (Pence or Cents) (up to 9 numerics) eg 2100.65 = 210065
noncumulative / true or false, optional / Indicator of whether or not operated on a non-cumulative basis.

If noncumulative is true, then tfareduction must be present.

Deceased

The Deceased element has the no attributes or sub-elements. It is present if the employee has deceased of absent otherwise.

Breakdown

The Breakdown element has the following attributes:

from / Date, required
to / Date, required
previouspay / Numeric, required
previousprsi / Numeric, required
thispay / Numeric, required
thisprsi / Numeric, required

Example

This is an example P45 file containing one P45 and one P45 Supplementary

<?xml version="1.0" encoding="UTF-8"?>

<P45File formversion="1" language="G" printer="0" currency="P">

<Employer number="87654321J" name="Jones Inc, Ltd" address1="Jones House" address3="Dublin 1" address2="IFSC" />

<P45>

<Employee surname="Jones" firstnames="Brian" ppsn="1111111L" />

<Employment end="31/08/2000" unit="0" />

<Pay freq="m" period="5" tfa="90000" taxtable="A" />

<TaxDetails totalpay="1200000" totaltax="500000" />

<PRSI total="320000" employee="140000" weeks="12">

<PRSIClass class="A" weeks="12" />

<PRSIClass class="b2" />

</PRSI>

</P45>

<P45Supp>

<Employee surname="Boy" firstnames="Tom" ppsn="1234657Q" />

<Employment end="31/08/2000" unit="0" />

<Pay freq="m" period="5" tfa="90000" taxtable="A" />

<TaxDetails totalpay="50000" totaltax="12000" />

<PRSI total="20000" weeks="12">

<PRSIClass class="c1" />

</PRSI>

</P45Supp>

</P45File>