Run a Xero Payroll UK pay run and retrieve payslips

domain: developer.xero.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain an OAuth 2.0 access token with the payroll.uk scope and retrieve the tenant (organisation) ID from GET /connections
  2. Fetch available pay calendars via GET /payroll.xro/2.0/PayRunCalendars to identify the correct PayRunCalendarID and next scheduled pay period
  3. Create a pay run by POSTing to /payroll.xro/2.0/PayRuns with the PayRunCalendarID and PayRunPeriodStartDate; the response returns a PayRunID and individual PayRunEmployeeDetails
  4. Post the pay run by updating its Status to POSTED via PUT /payroll.xro/2.0/PayRuns/{PayRunID}; Xero locks the pay run and generates payslips
  5. Retrieve all payslips for the run via GET /payroll.xro/2.0/Payslips?PayRunID={PayRunID} and iterate the returned Payslips array
  6. Fetch a single employee's payslip detail via GET /payroll.xro/2.0/Payslips/{PayslipID} to inspect earnings, deductions, and net pay line items

Known gotchas

Related routes

Retrieve Xero Payroll NZ employees and payslips
xero.com · 5 steps · unrated
Create and process a Xero Payroll AU pay run
xero.com · 5 steps · unrated
Create and submit a Xero Payroll AU pay run including superannuation lines
developer.xero.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans