Skip to main content
Integrate your New Expensify workspace with Xero to automatically sync expenses, tracking categories, customers, and tax rates between both platforms.

Security Requirements

Two-Factor Authentication Required: You must enable 2FA on your Expensify account before connecting to Xero.
The Xero integration requires enhanced security through two-factor authentication:
// Source: src/components/ConnectToXeroFlow/index.tsx
function ConnectToXeroFlow({policyID}: ConnectToXeroFlowProps) {
    const {translate} = useLocalize();
    const {environmentURL} = useEnvironment();
    const [account] = useOnyx(ONYXKEYS.ACCOUNT);
    const is2FAEnabled = account?.requiresTwoFactorAuth;
    const isUserValidated = account?.validated;

    useEffect(() => {
        if (!is2FAEnabled) {
            setIsRequire2FAModalOpen(true);
            return;
        }
        openLink(getXeroSetupLink(policyID), environmentURL);
    }, []);

    if (!is2FAEnabled) {
        return (
            <RequireTwoFactorAuthenticationModal
                onSubmit={() => {
                    const validatedUserForwardTo = getXeroSetupLink(policyID);
                    if (isUserValidated) {
                        Navigation.navigate(ROUTES.SETTINGS_2FA_ROOT.getRoute(backTo, validatedUserForwardTo));
                        return;
                    }
                    Navigation.navigate(
                        ROUTES.SETTINGS_2FA_VERIFY_ACCOUNT.getRoute({
                            backTo,
                            forwardTo: ROUTES.SETTINGS_2FA_ROOT.getRoute(backTo, validatedUserForwardTo),
                        }),
                    );
                }}
                isVisible={isRequire2FAModalOpen}
                description={translate('twoFactorAuth.twoFactorAuthIsRequiredDescription')}
            />
        );
    }
}

Setup

1

Enable Two-Factor Authentication

Go to Settings > Security and enable 2FA on your Expensify account
2

Connect to Xero

Navigate to Workspace Settings > Accounting and select Xero
3

Authorize Connection

You’ll be redirected to Xero to authorize the connection
4

Select Organization

Choose which Xero organization to connect
5

Configure Settings

Set up import and export preferences

Import Settings

Configure what data to import from Xero:
// Source: src/pages/workspace/accounting/xero/XeroImportPage.tsx
const sections = [
  {
    description: translate('workspace.accounting.accounts'),
    action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_CHART_OF_ACCOUNTS.getRoute(policyID)),
    title: translate('workspace.accounting.importAsCategory'),
    subscribedSettings: [CONST.XERO_CONFIG.ENABLE_NEW_CATEGORIES],
  },
  {
    description: translate('workspace.xero.trackingCategories'),
    action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_TRACKING_CATEGORIES.getRoute(policyID)),
    title: importTrackingCategories ? translate('workspace.accounting.imported') : translate('workspace.xero.notImported'),
    subscribedSettings: [
      CONST.XERO_CONFIG.IMPORT_TRACKING_CATEGORIES,
      ...getTrackingCategories(policy).map((category) => `${CONST.XERO_CONFIG.TRACKING_CATEGORY_PREFIX}${category.id}`),
    ],
  },
  {
    description: translate('workspace.xero.customers'),
    action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_CUSTOMER.getRoute(policyID)),
    title: importCustomers ? translate('workspace.accounting.importTypes.TAG') : translate('workspace.xero.notImported'),
    subscribedSettings: [CONST.XERO_CONFIG.IMPORT_CUSTOMERS],
  },
  {
    description: translate('workspace.accounting.taxes'),
    action: () => Navigation.navigate(ROUTES.POLICY_ACCOUNTING_XERO_TAXES.getRoute(policyID)),
    title: importTaxRates ? translate('workspace.accounting.imported') : translate('workspace.xero.notImported'),
    subscribedSettings: [CONST.XERO_CONFIG.IMPORT_TAX_RATES],
  },
];

Chart of Accounts

Import your Xero chart of accounts as expense categories in Expensify. This provides consistency across both platforms.

Tracking Categories

Xero tracking categories can be imported as:
  • Tags: For expense-level tracking
  • Report Fields: For report-level tracking
Tracking categories allow you to segment expenses by department, project, location, or any custom dimension you’ve set up in Xero.
Xero supports up to two tracking categories. If you have multiple tracking categories configured in Xero, you can choose which ones to import and how to map them.

Customers

Import Xero customers as tags for expense categorization. This is useful for client billing and job costing.

Tax Rates

Import Xero tax rates to ensure accurate tax tracking on expenses. Tax rates sync automatically and apply to eligible expense categories.

Export Settings

Configure how expenses are exported to Xero:

Preferred Exporter

Select which workspace admin exports expenses to Xero. This user’s credentials will be used for all exports.

Export Date

Choose which date to use when creating Xero transactions:
  • Date Created: When the expense was created in Expensify
  • Date Exported: When the expense is exported to Xero
  • Date Submitted: When the report was submitted

Purchase Bill Status

Set the default status for purchase bills exported to Xero:
  • Draft: Bills require manual approval in Xero
  • Awaiting Approval: Bills enter the approval workflow
  • Awaiting Payment: Bills are approved and ready for payment

Bank Account

Select which Xero bank account to use for reimbursable expenses.

Advanced Settings

Auto-Sync

Enable automatic syncing to keep data synchronized:
// Source: src/pages/workspace/accounting/xero/advanced/XeroAutoSyncPage.tsx
// Auto-sync runs at configured intervals to:
// - Import new accounts, tracking categories, customers, and tax rates
// - Export approved expenses to Xero
// - Update expense status based on Xero transactions
Choose how often to sync:
  • Hourly: For high-volume workspaces
  • Daily: Standard recommendation
  • Weekly: For lower-volume operations
Select Cash or Accrual basis for Xero exports
Choose the Xero account for invoice receivables
Select the Xero account for bill payments

Organization Configuration

When you connect to Xero, you select an organization. The integration displays the current organization name:
// Source: src/pages/workspace/accounting/xero/XeroImportPage.tsx
const currentXeroOrganizationName = useMemo(
  () => getCurrentXeroOrganizationName(policy ?? undefined), 
  [policy]
);

// Display in header
<ConnectionLayout
  headerTitle="workspace.accounting.import"
  headerSubtitle={currentXeroOrganizationName}
/>
To switch organizations, disconnect and reconnect with a different Xero account.

Tracking Categories Configuration

Xero tracking categories require special mapping configuration:
// Source: src/pages/workspace/accounting/xero/XeroMapTrackingCategoryConfigurationPage.tsx
// Map each Xero tracking category to:
// - Expensify tags
// - Report fields
// - Custom mappings
1

Enable Tracking Categories

In Import settings, toggle on Tracking Categories
2

Choose Import Type

Select Tags or Report Fields for each tracking category
3

Map Categories

Configure how tracking category values map to Expensify

Troubleshooting

Common Issues:
  • 2FA not enabled: You must enable two-factor authentication before connecting
  • Invalid credentials: Re-authenticate with Xero if your password changes
  • Missing tracking categories: Ensure they’re active in Xero
  • Tax rate errors: Verify tax rates are configured correctly in Xero

Best Practices

  1. Keep 2FA Active: Never disable two-factor authentication while using Xero integration
  2. Regular Syncing: Enable auto-sync to maintain data consistency
  3. Review Mappings: Periodically check that tracking categories and accounts are mapped correctly
  4. Test Exports: Run test exports to verify configuration before going live
  5. Monitor Sync Status: Check the connection page regularly for errors

Support

For help with Xero integration:
  • Contact Expensify Concierge for connection issues
  • Visit the Xero integration help center for detailed guides
  • Check Xero’s documentation for platform-specific questions

Build docs developers (and LLMs) love