Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.commenda.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Xero integration connects your Xero account to Commenda for automatic transaction syncing and real-time indirect tax calculation. Commenda pulls your invoices, credit notes, contacts, and items, then calculates and applies the correct indirect tax on your Xero documents.

Supported features

FeatureStatus
Transaction syncingSupported
Tax calculationSupported
Real-time webhooksSupported

Data models

Commenda syncs the following data from Xero:
  • Invoices — accounts receivable invoices with line items
  • Invoice credit notes — credits issued against invoices
  • Bills — accounts payable purchase bills
  • Bill credit notes — credits received against bills
  • Cash refunds — refund transactions
  • Contacts — customer and vendor profiles with addresses
  • Items — your product and service catalog

How tax calculation works

When you create or update an invoice in Xero, Commenda automatically:
  1. Receives a webhook notification from Xero
  2. Fetches the full invoice and associated contact details
  3. Determines the shipping address from the contact’s address records
  4. Calculates the applicable indirect tax
  5. Creates or updates Commenda-specific tax codes in your Xero account and applies them to the invoice
Commenda dynamically creates tax codes in Xero for each effective tax rate, so your tax reporting stays accurate.
Tax calculation is supported for accounts receivable invoices (ACCREC), accounts receivable credit notes (ACCRECCREDIT), and cash refunds. Bills and bill credit notes are synced for data tracking but are not processed for tax calculation.

How Commenda updates Xero documents

When Commenda calculates tax on a Xero invoice or credit note, it appends a single tax line item to the document and applies the calculated tax rate to your existing line items. Your original line items remain intact — Commenda does not overwrite the account codes you set on them.

Tax line item

The appended tax line uses the following values:
FieldValue
DescriptionUS Sales Tax
Quantity1
Unit amountThe total calculated tax
Account codeSales Tax
Tax typeThe Commenda-managed tax code for the applicable rate (for example, Sales Tax 8.25%)
Because the tax line carries a stable description, you can filter or report on Commenda-applied tax across your Xero documents by searching for US Sales Tax.

Sales Tax liability account

The first time Commenda needs to write a tax line to a Xero document, it creates a dedicated liability account in your chart of accounts:
FieldValue
NameSales Tax
CodeSales Tax
TypeLIABILITY
DescriptionCommenda Tax Account
This account is used as the destination for collected sales tax, which is the standard accounting treatment for indirect tax payable to a tax authority. Commenda reuses this account for all subsequent tax lines.
If you previously had a Commenda-created SALES account named Commenda Tax (code COMMENDA) from an earlier version of the integration, Commenda will create the new Sales Tax liability account alongside it. New tax lines will use the liability account. You can leave the old account in place or archive it once historical reporting is complete.

Address resolution

Xero does not store addresses at the invoice level. Instead, Commenda resolves the tax jurisdiction by looking at the contact’s addresses:
  1. STREET address — treated as the shipping address
  2. POBOX address — treated as the billing address
Commenda uses the shipping (STREET) address when available. If no shipping address exists, it falls back to the billing (POBOX) address.

Connecting Xero

1

Start the connection

From your Commenda dashboard, navigate to integrations and select Xero. Commenda generates a secure connection link.
2

Authorize access

Click the connection link to open Xero’s authorization page. Sign in and grant Commenda access to your accounting data.
3

Configure sync settings

Choose which data models to sync, set the sync frequency, and specify how far back to pull historical data.
4

Verify the connection

After authorization, Commenda begins the initial data sync. Check the sync status on your dashboard to confirm data is flowing.

VAT-specific handling

When syncing transactions from Xero, Commenda automatically detects and applies VAT-specific tax treatments based on Xero’s tax type codes:

Reverse charges

If a line item uses the REVERSECHARGES tax type in Xero, Commenda sets the tax remitter type to BUYER on the synced transaction. This indicates that the buyer, not the seller, is responsible for remitting the tax — a common requirement for cross-border B2B transactions in VAT jurisdictions.

VAT-exempt transactions

Line items with EXEMPTINPUT or EXEMPTOUTPUT tax types in Xero are automatically marked with the EXEMPT_PRODUCT exemption reason. This ensures that exempt items are excluded from tax calculations and do not count toward registration thresholds.

Customer tax identification

Commenda syncs the tax number from Xero contacts into the business_identification_number field on the corresponding customer record. This is useful for storing VAT IDs and other tax registration numbers required for compliance in certain jurisdictions. When syncing invoices, Commenda also fetches the associated contact and includes their tax number as the customer_business_identification_number on each transaction line item. This means you can see the customer’s VAT ID or tax registration number directly on each synced transaction without needing to look up the customer separately.

Known behaviors

  • Lock dates are respected — Commenda skips invoices dated before your Xero organisation’s period lock date or end-of-year lock date
  • Commenda skips invoices with paid, voided, or deleted status for tax calculation
  • Xero does not support shipping lines or shipping amounts on documents, so Commenda does not calculate shipping tax separately
  • Commenda creates tax codes dynamically in Xero as it encounters new tax rates

Next steps