{"id":"179fb5ab-1aa6-44b5-8848-468df8f623f0","task":"Run a Xero Payroll UK pay run and retrieve payslips","domain":"developer.xero.com","steps":["Obtain an OAuth 2.0 access token with the payroll.uk scope and retrieve the tenant (organisation) ID from GET /connections","Fetch available pay calendars via GET /payroll.xro/2.0/PayRunCalendars to identify the correct PayRunCalendarID and next scheduled pay period","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","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","Retrieve all payslips for the run via GET /payroll.xro/2.0/Payslips?PayRunID={PayRunID} and iterate the returned Payslips array","Fetch a single employee's payslip detail via GET /payroll.xro/2.0/Payslips/{PayslipID} to inspect earnings, deductions, and net pay line items"],"gotchas":["GET /payroll.xro/2.0/PaymentMethods returns employee bank and payment-method data, NOT pay calendars — use /PayRunCalendars for calendar lookup","A pay run must be in DRAFT status to modify employee lines; once POSTed it is locked and requires a reversal to correct","The Payroll UK API is a separate base path from the Accounting API; ensure your OAuth scopes include payroll.uk and your requests target the correct endpoint prefix"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/179fb5ab-1aa6-44b5-8848-468df8f623f0"}