Integration

Xero Payroll NZ integration

Xero Payroll for New Zealand organisations (Payroll NZ API 2.0). Manage employees with their employment, tax and KiwiSaver settings, leave set-up, leave, opening balances, pay templates, salary and wages, working patterns and payment methods; timesheets and their lines (approve, revert); pay run calendars, pay runs and payslip lines; earnings rates, deductions, superannuation, reimbursements and leave types; read statutory deductions and settings. Only NZ payroll organisations answer it (see Xero Payroll AU and UK). IRD numbers and bank account numbers are left out of every response. Authentication is Xero OAuth 2.0 with the payroll scopes; call list_connections first and pass its tenantId as Xero-Tenant-Id.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Xero Payroll NZ.Built from the 72 Xero Payroll NZ tools below, on the connection you add once.

Common Xero Payroll NZ use cases

  • Find the tenantId before any accounting call
  • Choose between several connected organisations

What you can do with Xero Payroll NZ

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Leave type, 5 operations

  • create_employee_leave_typeCreate employee leave typePOSTAssigns a leave type to an employee with its accrual settings (schedule of accrual, units accrued, maximum, opening balance).
  • create_leave_typeCreate leave typePOSTCreates a leave type for the organisation: name, isPaidLeave and showOnPayslip.
  • get_leave_typeGet leave typeGETReturns one leave type.
  • list_employee_leave_typesList employee leave typesGETLists the leave types assigned to an employee with their accrual settings and the leaveTypeID that create_employee_leave needs.
  • list_leave_typesList leave typesGETLists the leave types of the organisation, 100 per page. Set ActiveOnly to true to leave out inactive ones.

Salary and wage, 5 operations

  • create_employee_salary_and_wageCreate employee salary and wagePOSTCreates a salary and wages record for an employee (earnings rate, units per week, annual salary, effective date, status, Salary or Hourly).
  • delete_employee_salary_and_wageDelete employee salary and wageDELETEDeletes a salary and wages record of an employee.
  • get_employee_salary_and_wageGet employee salary and wageGETReturns one salary and wages record of an employee.
  • list_employee_salary_and_wagesList employee salary and wagesGETLists the salary and wages records of an employee (earnings rate, units per week, rate, annual salary, effective date, status Active, Pending or History), 100 per page.
  • update_employee_salary_and_wageUpdate employee salary and wagePUTUpdates a salary and wages record of an employee. The required fields must all be sent: read the current values with get_employee_salary_and_wage and send them back with your change.

Employee, 4 operations

  • create_employeeCreate employeePOSTCreates a payroll employee and returns it with its employeeID. Add employment details with create_employment.
  • get_employeeGet employeeGETReturns one payroll employee: name, date of birth, gender, address, contact details, job title, engagement type, start and end dates, payroll calendar.
  • list_employeesList employeesGETLists payroll employees, 100 per page. Filter with filter (for example firstName==John,lastName==Smith). Returns each employeeID, name, contact details and employment dates.
  • update_employeeUpdate employeePUTUpdates a payroll employee. The required fields must all be sent: read the current values with get_employee and send them back with your change.

Leave, 4 operations

  • create_employee_leaveCreate employee leavePOSTCreates a leave record for an employee: leaveTypeID (from list_employee_leave_types), description (max 50 characters), startDate and endDate (YYYY-MM-DD).
  • delete_employee_leaveDelete employee leaveDELETEDeletes a leave record of an employee. Returns the deleted leave.
  • list_employee_leavesList employee leavesGETLists the leave records of an employee (leave type, description, dates, periods with their status).
  • update_employee_leaveUpdate employee leavePUTUpdates a leave record of an employee. The required fields must all be sent: read the current values with list_employee_leaves and send them back with your change.

Timesheet, 4 operations

  • create_timesheetCreate timesheetPOSTCreates a timesheet for an employee and payroll calendar period (payrollCalendarID, employeeID, startDate, endDate), optionally with its lines.
  • delete_timesheetDelete timesheetDELETEDeletes a timesheet.
  • get_timesheetGet timesheetGETReturns one timesheet with its lines (date, earnings rate, units).
  • list_timesheetsList timesheetsGETLists timesheets, 100 per page. Filter by filter (employeeId==<id>,payrollCalendarId==<id>), status, startDate and endDate, and sort with sort.

Working pattern, 4 operations

  • create_employee_working_patternCreate employee working patternPOSTCreates a working pattern for an employee: effectiveFrom (YYYY-MM-DD) and workingWeeks, each giving the hours for monday to sunday.
  • delete_employee_working_patternDelete employee working patternDELETEDeletes a working pattern of an employee.
  • get_employee_working_patternGet employee working patternGETReturns one working pattern of an employee with its working weeks (hours per day).
  • list_employee_working_patternsList employee working patternsGETLists the working patterns of an employee with their payeeWorkingPatternID and effective date.

Deduction, 3 operations

  • create_deductionCreate deductionPOSTCreates a deduction type for the organisation (name, category, liability account, fixed amount or percentage of gross).
  • get_deductionGet deductionGETReturns one deduction type.
  • list_deductionsList deductionsGETLists the deduction types set up for the organisation (name, category, liability account, calculation), 100 per page.

Earning, 3 operations

  • create_employee_earnings_templateCreate employee earnings templatePOSTAdds an earnings line to an employee pay template: earningsRateID (from list_earnings_rates) with numberOfUnits and ratePerUnit, or a fixedAmount.
  • delete_employee_earnings_templateDelete employee earnings templateDELETEDeletes an earnings line from an employee pay template.
  • update_employee_earnings_templateUpdate employee earnings templatePUTUpdates an earnings line of an employee pay template (units, rate per unit or fixed amount). Read the line first with get_employee_pay_template and send the values to keep.

Earnings rate, 3 operations

  • create_earnings_rateCreate earnings ratePOSTCreates an earnings rate: name, earningsType, rateType (RatePerUnit, MultipleOfOrdinaryEarningsRate or FixedAmount), typeOfUnits and expenseAccountID.
  • get_earnings_rateGet earnings rateGETReturns one earnings rate.
  • list_earnings_ratesList earnings ratesGETLists the earnings rates of the organisation (name, earnings type, rate type, units, expense account) with the earningsRateID that pay templates, salaries and timesheets need.

Line, 3 operations

  • create_timesheet_lineCreate timesheet linePOSTAdds a line to a timesheet: date (YYYY-MM-DD), earningsRateID and numberOfUnits, optional trackingItemID.
  • delete_timesheet_lineDelete timesheet lineDELETEDeletes a line from a timesheet.
  • update_timesheet_lineUpdate timesheet linePUTUpdates a timesheet line. The required fields must all be sent: read the current values with get_timesheet and send them back with your change.

Pay run, 3 operations

  • create_pay_runCreate pay runPOSTCreates a pay run for a payroll calendar (payrollCalendarID from list_pay_run_calendars), with optional period and payment dates and pay run type (Xero documents Scheduled as the supported type).
  • get_pay_runGet pay runGETReturns one pay run with its payslips and totals. Bank account numbers in payment lines are not returned.
  • list_pay_runsList pay runsGETLists pay runs, 100 per page, with period, payment date, status (Draft or Posted), type and totals. Filter with status.

Pay run calendar, 3 operations

  • create_pay_run_calendarCreate pay run calendarPOSTCreates a pay run calendar: name, calendarType, periodStartDate and paymentDate (YYYY-MM-DD).
  • get_pay_run_calendarGet pay run calendarGETReturns one pay run calendar.
  • list_pay_run_calendarsList pay run calendarsGETLists the pay run calendars (name, calendar type, current period dates, payment date) with the payrollCalendarID that employments and timesheets need.

Pay slip, 3 operations

  • get_payslipGet payslipGETReturns one payslip with its earnings, leave, deduction, reimbursement, superannuation, tax and payment lines. Bank account numbers are not returned.
  • list_payslipsList payslipsGETLists the payslips of one pay run (PayRunID required, from list_pay_runs), 100 per page, with earnings, deductions, tax and payment lines. Bank account numbers are not returned.
  • update_payslipUpdate payslipPUTUpdates payslip lines. Send every line type the payslip has, each with all its lines: Xero deletes any line left out. Read the payslip with get_payslip first and send its lines back with your change.

Reimbursement, 3 operations

  • create_reimbursementCreate reimbursementPOSTCreates a reimbursement type: name and accountID.
  • get_reimbursementGet reimbursementGETReturns one reimbursement type.
  • list_reimbursementsList reimbursementsGETLists the reimbursement types of the organisation (name, account), 100 per page.

Superannuation, 3 operations

  • create_superannuationCreate superannuationPOSTCreates a superannuation type: name, category (KiwiSaver, ComplyingFund or Other), liability and expense accounts, calculationTypeNZ with percentage or standardAmount.
  • get_superannuationGet superannuationGETReturns one superannuation type.
  • list_superannuationsList superannuationsGETLists the superannuation types of the organisation (KiwiSaver, complying funds, other), 100 per page.

Opening balance, 2 operations

  • create_employee_opening_balancesCreate employee opening balancesPOSTSets the opening balances of an employee: an array of periods, each with periodEndDate, daysPaid, unpaidWeeks and grossEarnings.
  • get_employee_opening_balancesGet employee opening balancesGETReturns the opening balances of an employee (period end date, days paid, unpaid weeks, gross earnings).

Payment method, 2 operations

  • create_employee_payment_methodCreate employee payment methodPOSTSets how an employee is paid (Cheque, Electronically or Manual) and, for electronic payment, the bank accounts. Account numbers are not echoed back in the response.
  • get_employee_payment_methodGet employee payment methodGETReturns how an employee is paid (Cheque, Electronically or Manual) and the bank account names and sort codes. Bank account numbers are not returned by this tool.

Statutory deduction, 2 operations

  • get_statutory_deductionGet statutory deductionGETReturns one statutory deduction.
  • list_statutory_deductionsList statutory deductionsGETLists the statutory deductions of the organisation (name, category, liability account), 100 per page.

Tax, 2 operations

  • get_employee_taxGet employee taxGETReturns the NZ tax record of an employee: tax code, special rates, student loan, KiwiSaver settings and ESCT rate. The IRD number is not returned by this tool.
  • update_employee_taxUpdate employee taxPOSTSets an employee's NZ tax record (IRD number, tax code, KiwiSaver, student loan, ESCT rate). Read it with get_employee_tax and send the values to keep; that tool hides the IRD number, so pass irdNumber only when the user gives it.

Approve, 1 operation

  • approve_timesheetApprove timesheetPOSTApproves a timesheet. Takes no body; returns the timesheet.

Connection, 1 operation

  • list_connectionsList connectionsGETList the Xero organisations this connection is authorized for. Call it first: every payroll tool needs one of the returned tenantId values as its Xero-Tenant-Id.

Employment, 1 operation

  • create_employmentCreate employmentPOSTAdds employment details to an employee: payrollCalendarID, startDate and engagementType (fixedTermEndDate for a fixed-term engagement).

Leave balance, 1 operation

  • list_employee_leave_balancesList employee leave balancesGETReturns the leave balances of an employee, per leave type (name, balance, type of units).

Leave period, 1 operation

  • list_employee_leave_periodsList employee leave periodsGETReturns the leave periods of an employee between startDate and endDate (pay period dates, units, status).

Leave setup, 1 operation

  • create_employee_leave_setupCreate employee leave setupPOSTCreates the leave set-up of an employee (holiday pay, annual and sick leave opening balances and accrual). The vendor says it is required before viewing, configuring and requesting leave for the employee.

Pay template, 1 operation

  • get_employee_pay_templateGet employee pay templateGETReturns the pay template of an employee: its earnings lines (earnings rate, units, rate per unit or fixed amount) with their payTemplateEarningID.

Pay template earning, 1 operation

  • create_employee_earnings_templatesCreate employee earnings templatesPOSTAdds several earnings lines to an employee pay template in one call. Same line fields as create_employee_earnings_template.

Revert to draft, 1 operation

  • revert_timesheetRevert timesheetPOSTReverts a timesheet to draft. Takes no body; returns the timesheet.

Settings, 1 operation

  • get_settingsGet settingsGETReturns the payroll settings, including the accounts payroll posts to.

Tracking category, 1 operation

  • get_tracking_categoriesGet tracking categoriesGETReturns the tracking categories payroll uses for employee groups and timesheets.

Use Xero Payroll NZ from Claude Code, Cursor or Codex

Connect Xero Payroll NZ in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Xero Payroll NZ operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Xero Payroll NZ

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Xero Payroll NZ once

    Add your Xero Payroll NZ connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Xero Payroll NZ integration FAQ

What can you do with the Xero Payroll NZ integration?

LiveContext exposes 72 operations on Xero Payroll NZ, covering leave type, salary and wage, employee and leave. Common uses include Find the tenantId before any accounting call and Choose between several connected organisations.

Popular integrations

Browse the whole catalog