Overview
The Xero integration syncs approved timesheets from TimeLeaf to Xero as timesheet entries. Each sync creates one timesheet record per employee per pay period. The integration supports AU, NZ, and UK Xero API endpoints. This feature is available on the Professional plan and above.
Connecting via OAuth
- Go to Settings > Integrations > Xero.
- Click Connect to Xero.
- You are redirected to Xero's OAuth consent screen. Sign in with your Xero admin account.
- Authorize TimeLeaf to access your Xero organization.
- If your Xero account has multiple tenants, select the organization to connect (see Tenant Selection below).
- You are redirected back to TimeLeaf. The connection status shows as Connected.
TimeLeaf requests scopes for payroll timesheet read/write and employee read access. Tokens refresh automatically.
Xero tenant selection
If your Xero login has access to multiple organizations (tenants), TimeLeaf prompts you to select which one to connect during the OAuth flow.
To switch tenants after connecting:
- Go to Settings > Integrations > Xero.
- Click Change Organization.
- Select the new tenant from the list.
- Confirm the switch. Employee mappings are reset since employees differ between tenants.
Earnings rate configuration
Xero uses earnings rates (also called pay items) to categorize hours. TimeLeaf needs to map its hour types to your Xero earnings rates.
Setting up mappings
- Go to Settings > Integrations > Xero > Earnings Rates.
- TimeLeaf loads your available earnings rates from Xero.
- Map each TimeLeaf hour type to a Xero earnings rate:
| TimeLeaf type | Example Xero earnings rate |
|---|---|
| Regular hours | Ordinary Hours |
| Overtime (1.5x) | Overtime 1.5x |
| Overtime (2.0x) | Double Time |
| Leave hours | Annual Leave, Sick Leave (map per leave type) |
- Click Save Mappings.
If an earnings rate is not mapped, those hours are excluded from the sync and a warning is logged.
How timesheets sync
When timesheets are approved in TimeLeaf, the integration creates or updates Xero timesheets:
- One timesheet per employee per pay period is created in Xero.
- Each timesheet contains line items broken down by earnings rate and day.
- Timesheets are created in Draft status in Xero so your payroll team can review before processing.
Sync triggers
- Automatic. runs when a timesheet is approved in TimeLeaf.
- Manual. go to Reports > Payroll Export, select the period, and click Sync to Xero.
If multiple timesheets for the same employee and period are approved, TimeLeaf updates the existing Xero timesheet rather than creating a duplicate.
Employee mapping
TimeLeaf matches employees to Xero by email address during initial setup. For unmatched employees:
- Go to Settings > Integrations > Xero > Employee Mapping.
- Match each unmapped TimeLeaf employee to their Xero employee record.
- Save the mappings.
AU / NZ / UK API support
Xero provides region-specific payroll APIs. TimeLeaf detects your organization's region automatically based on the connected tenant and uses the correct API endpoint:
| Region | API |
|---|---|
| Australia | Xero Payroll AU |
| New Zealand | Xero Payroll NZ |
| United Kingdom | Xero Payroll UK |
Earnings rate names and structures vary by region. TimeLeaf loads the correct set of earnings rates based on your tenant's region.
Xero's payroll API availability depends on your Xero subscription. Ensure your Xero plan includes payroll for the integration to function.
Sync log
View all sync activity under Settings > Integrations > Xero > Sync Log. Each entry shows the employee, pay period, status (synced, failed), and a link to the Xero timesheet. Failed syncs include error details from the Xero API for troubleshooting.