Payslip


Overview

URL https://api.xero.com/payroll.xro/1.0/Payslip
Methods Supported POST, GET
Description Allows you to retrieve and update payslips in a Xero organisation

Elements for Payslip

EmployeeID Xero identifier for payroll employee
PayslipID Xero identifier for payroll payslip
EarningsLines See EarningsLine
TimesheetEarningsLines See TimesheetEarningsLine
DeductionLines See DeductionLine
LeaveAccrualLines See LeaveAccrualLine
ReimbursementLines See ReimbursementLine – see PayItems
SuperannuationLines See SuperannuationLine
TaxLines See TaxLine
The following are returned on a GET request
FirstName Employee first name
LastName Employee last name
EmployeeGroup Employee Group name
LastEdited Last edited
Wages The Total Wages for the PayRun
Deductions The Total Deductions for the PayRun
NetPay The Total NetPay for the PayRun
Tax The Total Tax for the PayRun
Super The Total Super for the PayRun
Reimbursements The Total Reimbursement for the PayRun
LeaveEarningsLines See LeaveEarningsLine

Elements for a EarningsLine

The following elements are required to add a EarningsLine

EarningsRateID Xero identifier for payroll earnings rate.
RatePerUnit Rate per unit for earnings rate.
NumberOfUnits Earnings rate number of units.
FixedAmount Earnings rate amount. Only applicable if the EarningsRate RateType is Fixed

Elements for a LeaveEarningsLine

The following elements are required to add a LeaveEarningsLine

EarningsRateID Xero identifier for payroll earnings rate.
RatePerUnit Rate per unit for earnings rate.
NumberOfUnits Earnings rate number of units

Elements for a TimesheetEarningsLine

The following elements are required to add a TimesheetEarningsLine

EarningsRateID Xero identifier for payroll earnings rate.
RatePerUnit Rate per unit for earnings rate
Amount The Amount of the Timesheet Earnings Line.

Elements for a DeductionLine

The following elements are required to add a DeductionLine

DeductionTypeID Xero identifier for payroll earnings rate.
CalculationType Rate per unit for earnings rate.
Percentage The Percentage of the Deduction Line.
NumberOfUnits Earnings rate number of units

Elements for LeaveAccrualLine

The following elements are required to add a LeaveAccrualLine

LeaveTypeID Xero identifier for the Leave type.
NumberOfUnits Number of units for the Leave line.
AutoCalculate If you want to auto calculate leave.

Elements for a ReimbursementLine

The following elements are required to add a ReimbursementLine

ReimbursementTypeID Xero identifier for payroll reimbursement type
Description Reimbursement lines description (max length 50)
ExpenseAccount Reimbursement expense account. For posted pay run you should be able to see expense account code
Amount Reimbursement amount

Elements for a SuperannuationLine

The following elements are required to add a SuperannuationLine

SuperMembershipID Xero identifier for payroll super fund membership ID
ContributionType Superannuation contribution type
CalculationType Superannuation calculation type
MinimumMonthlyEarnings Superannuation minimum monthly earnings
ExpenseAccountCode Superannuation expense account code
LiabilityAccountCode Superannuation liability account code
PaymentDateForThisPeriod Superannuation payment date for the current period (YYYY-MM-DD)
Percentage Superannuation percentage
Amount Superannuation amount

Elements for a TaxLine

The following elements are required to add a TaxLine

TaxTypeName Name of the tax type
Description Description of the tax line
Amount The tax line amount
LiabilityAccount The tax line liability account code. For posted pay run you should be able to see liability account code

NB : You can only Add, Update or Delete Manual Adjustment Tax Lines.


GET Payslip

Optional parameters for GET Payslip

Record filter You can specify an individual record by appending the value to the endpoint, i.e.
GET https://…/Payslip/{identifier}
PayRunID The Xero identifier for a Pay run e.g. 297c2dc5-cc47-4afd-0000-74990b8761e9

POST Payslip

Use this method to add, update or delete one or more payslip line items.

Note: You do not need to provide a line item type that you don’t need to update. However, if a line item type is included, you must specify all lines of that type, otherwise missing lines will be deleted.

Example of minimum elements required to add a new Payslip

<Payslips>  
  <Payslip>  
    <EmployeeID>577dd1ca-5a6b-4e98-bc2d-086ca49637d3</EmployeeID>   
    <PayRunID>0B4FFDF5-DF3F-4471-920D-8C81B1CDE1FD</PayRunID>     
  </Payslip>  
</Payslips>

Example of updating a payslip

<Payslips>  
  <Payslip>  
    <EmployeeID>577dd1ca-5a6b-4e98-bc2d-086ca49637d3</EmployeeID>  
    <PayslipID>5a422c9e-1157-4b1e-9d37-687f28f6f995</PayslipID>  
    <EarningsLines>  
      <EarningsLine>  
        <EarningsRateID>a24dd671-afd3-49bf-a60e-88acd7faa9e4</EarningsRateID>  
        <RatePerUnit>35.0000</RatePerUnit>  
        <NumberOfUnits>25.0000</NumberOfUnits>  
      </EarningsLine>  
    </EarningsLines>  
    <TimesheetEarningsLines />  
    <DeductionLines>  
      <DeductionLine>  
        <Amount>35.00</Amount>  
        <CalculationType>PRETAX</CalculationType>  
        <DeductionTypeID>af8c92c5-813b-4675-9534-5de05260e9da</DeductionTypeID>  
        <Percentage>4.0000</Percentage>  
      </DeductionLine>  
    </DeductionLines>  
    <LeaveAccrualLines />  
    <ReimbursementLines>  
      <ReimbursementLine>  
        <ReimbursementTypeID>2c9dcc91-089b-4ba1-8a04-940a3c126fd4</ReimbursementTypeID>  
        <Description>test</Description>  
        <Amount>10.00</Amount>  
      </ReimbursementLine>  
    </ReimbursementLines>  
    <SuperannuationLines>  
      <SuperannuationLine>  
        <SuperMembershipID>96b956b3-942c-482b-a1e7-b1646bebb9b5</SuperMembershipID>  
        <ContributionType>SGC</ContributionType>  
        <CalculationType>PERCENTAGEOFEARNINGS</CalculationType>  
        <MinimumMonthlyEarnings>450.0000</MinimumMonthlyEarnings>  
        <ExpenseAccountCode>478</ExpenseAccountCode>  
        <LiabilityAccountCode>826</LiabilityAccountCode>  
        <PaymentDateForThisPeriod>2013-02-25</PaymentDateForThisPeriod>  
        <Percentage>9.0000</Percentage>  
        <Amount>78.7500</Amount>  
      </SuperannuationLine>  
    </SuperannuationLines>  
    <TaxLines>  
      <TaxLine>  
        <PayslipTaxLineID>9b16d93f-9bbe-4887-85f0-d4d3c95f9a37</PayslipTaxLineID>  
        <Description>No tax file number (Australian resident)</Description>  
        <Amount>407.00</Amount>  
      </TaxLine>  
    </TaxLines>  
  </Payslip>  
</Payslips>  

Example of updating a payslips timesheet earnings lines

<Payslips xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>f626ca03-aa29-43d4-8204-4ba12293fdb0</PayslipID>  
    <EarningsLines>  
      <EarningsLine>  
        <EarningsRateID>a24dd671-afd3-49bf-a60e-88acd7faa9e4</EarningsRateID>  
        <RatePerUnit>30.0000</RatePerUnit>  
        <NumberOfUnits>40.0000</NumberOfUnits>  
      </EarningsLine>  
    </EarningsLines>  
  </Payslip>  
</Payslips>  

Note that we can not add a TimesheetEarningsLine and LeaveEarningsLine through Payslip Service. You can update the RatePerUnit of a TimesheetEarningsLine.

Example of updating a payslip non pending superannuation lines

<Payslips xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>621cffb4-38cc-43dd-9c0b-c9e0e1b0f578</PayslipID>  
    <SuperannuationLines>  
      <SuperannuationLine>  
        <SuperMembershipID>4fd2a28e-ac86-4726-b8d9-f449457f9984</SuperMembershipID>  
        <ContributionType>SGC</ContributionType>  
        <CalculationType>PERCENTAGEOFEARNINGS</CalculationType>  
        <MinimumMonthlyEarnings>450.0000</MinimumMonthlyEarnings>  
        <ExpenseAccountCode>478</ExpenseAccountCode>  
        <LiabilityAccountCode>826</LiabilityAccountCode>  
        <PaymentDateForThisPeriod>2013-04-28</PaymentDateForThisPeriod>  
        <Percentage>9.0000</Percentage>  
      </SuperannuationLine>  
    </SuperannuationLines>     
  </Payslip>  
</Payslips>  

Example of adding a pay slip Deduction Line

<Payslips xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>621cffb4-38cc-43dd-9c0b-c9e0e1b0f578</PayslipID>  
    <DeductionLines>  
      <DeductionLine>          
        <DeductionTypeID>0c29b630-4e53-453d-a2e7-e8e97a95f636</DeductionTypeID>  
        <CalculationType>FIXEDAMOUNT</CalculationType>          
        <Amount>15.00</Amount>  
      </DeductionLine>  
    </DeductionLines>  
  </Payslip>  
</Payslips> 

Example of adding a pay slip Reimbursement Line

<Payslips>  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>621cffb4-38cc-43dd-9c0b-c9e0e1b0f578</PayslipID>  
    <ReimbursementLines>  
      <ReimbursementLine>  
        <ReimbursementTypeID>bd246b96-c637-4767-81cf-851ba8fa93c2</ReimbursementTypeID>  
        <Description>Test Description</Description>  
        <Amount>10.00</Amount>  
      </ReimbursementLine>  
    </ReimbursementLines>  
  </Payslip>  
</Payslips> 

Example of adding a pay slip Leave Accrual Line

<Payslips>  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>621cffb4-38cc-43dd-9c0b-c9e0e1b0f578</PayslipID>  
    <LeaveAccrualLines>  
      <LeaveAccrualLine>  
        <LeaveTypeID>dc182d9a-a270-4f4e-acd7-af702d5a4382</LeaveTypeID>  
        <NumberOfUnits>8.0000</NumberOfUnits>  
        <AutoCalculate>false</AutoCalculate>  
      </LeaveAccrualLine>  
    </LeaveAccrualLines>  
  </Payslip>  
</Payslips>  

Example of adding a Payslip Manual Adjustment Tax Line

<Payslips>  
  <Payslip>  
    <EmployeeID>509d776f-6826-4873-8d17-fea3a2a750c0</EmployeeID>  
    <PayslipID>621cffb4-38cc-43dd-9c0b-c9e0e1b0f578</PayslipID>     
    <TaxLines>  
      <TaxLine>  
        <PayslipTaxLineID>c60410a7-6536-412d-9039-eed4d942e14f</PayslipTaxLineID>  
        <Description>Test Description</Description>  
        <Amount>100.00</Amount>  
      </TaxLine>  
    </TaxLines>  
  </Payslip>  
</Payslips>