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
| Feature | Status |
|---|---|
| Transaction syncing | Supported |
| Tax calculation | Supported |
| Real-time webhooks | Supported |
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:- Receives a webhook notification from Xero
- Fetches the full invoice and associated contact details
- Determines the shipping address from the contact’s address records
- Calculates the applicable indirect tax
- Creates or updates Commenda-specific tax codes in your Xero account and applies them to the invoice
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:| Field | Value |
|---|---|
| Description | US Sales Tax |
| Quantity | 1 |
| Unit amount | The total calculated tax |
| Account code | Sales Tax |
| Tax type | The Commenda-managed tax code for the applicable rate (for example, Sales Tax 8.25%) |
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:| Field | Value |
|---|---|
| Name | Sales Tax |
| Code | Sales Tax |
| Type | LIABILITY |
| Description | Commenda Tax Account |
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:- STREET address — treated as the shipping address
- POBOX address — treated as the billing address
Connecting Xero
Start the connection
From your Commenda dashboard, navigate to integrations and select Xero. Commenda generates a secure connection link.
Authorize access
Click the connection link to open Xero’s authorization page. Sign in and grant Commenda access to your accounting data.
Configure sync settings
Choose which data models to sync, set the sync frequency, and specify how far back to pull historical data.
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 theREVERSECHARGES 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 withEXEMPTINPUT 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 thebusiness_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