> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipeline.software/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoice Synchronisation with Xero

> Invoice Synchronisation with Xero - Pipeline knowledge base.

## Invoice Synchronisation with Xero

When Pipeline is connected to Xero, invoices are automatically synchronised so your accounting records stay up to date.

### What Gets Synced

The following invoice data is sent from Pipeline to Xero:

* Invoice number and reference
* Customer/contact details
* Invoice date and due date
* All line items (description, quantity, unit amount, tax, account code)
* Currency code
* Invoice status (Draft, Submitted, Paid)

### How Sync Works

**Pipeline to Xero (automatic):**

* When you create an invoice in Pipeline, it is automatically created in Xero
* When you update an invoice, the changes sync to Xero
* When you delete an invoice, it is voided in Xero (Xero does not allow true deletion)

**Xero to Pipeline (via webhooks):**

* When an invoice is updated in Xero (e.g., marked as paid), Pipeline receives a notification
* Payment data is automatically fetched and displayed in Pipeline
* Status changes in Xero are reflected in Pipeline

> **Screenshot:** An invoice detail page showing the sync status with Xero, with payment information that has been synced back from Xero.

### Important Notes

* **Invoices created directly in Xero are not synced to Pipeline** — the sync is initiated from Pipeline
* Sync happens in the background via a job queue, so there may be a short delay
* All dates are handled in UTC to prevent timezone conversion issues

### Out-of-Sync Detection

If an invoice is modified in both Pipeline and Xero, the system detects the conflict and marks the invoice as **out of sync**. This happens when:

* The gross total, net total, or tax amount differs
* The invoice date or due date was changed in Xero
* The number of line items differs

When out of sync, further automatic syncing is paused to prevent data loss. You will need to review and resolve the discrepancy manually.
