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

# Connecting your accounting system

> Connect Xero once, then send payroll journals, invoices and credit notes straight to it — each one when you decide to, never on its own.

Payroll ends in your accounts either way. The question is whether somebody downloads a file and imports it, or whether Flow Payroll hands it over directly. Connect an accounting system once and both the payroll journal and the billing module can send to it, each from its own screen, each when a person presses send.

<Note>
  **What is supported today.** Xero. The connection is made once for the organisation and serves both payroll journals and billing. Every export file still exists and still works, so the manual route is always there.
</Note>

## How it works in one paragraph

You connect the employer's Xero account once, under **Settings → Integrations**. From then on a journal template can be told to post through it, and invoices and credit notes can be sent to it from the billing screens. Nothing goes across on its own: closing an invoice sends nothing, finalising a journal sends nothing, and each send asks you to confirm. What Xero says back — the document it created, the number it gave it, whether it has been paid — comes back and shows against the thing you sent.

## Connect Xero

<Steps>
  <Step title="Open Integrations">
    Go to **Settings** and open the **Integrations** tab. Xero appears in the catalogue with what it can do.
  </Step>

  <Step title="Sign in at Xero">
    Click **Connect**. Xero asks you to sign in on its own site and to allow Flow Payroll access. You are signing in to Xero, not giving Flow Payroll your Xero password: we never see it.
  </Step>

  <Step title="Choose the organisation">
    If your Xero login reaches more than one organisation, pick the one this employer's payroll belongs to. Get this wrong and documents land in someone else's books, so it is worth a second look. The connection then shows as **Connected**.
  </Step>
</Steps>

<Warning>
  Each Xero organisation can be connected once. Connecting one you disconnected earlier picks up that connection again, with its history and the journal templates and billing that use it.

  A connection in use stays tied to its Xero organisation. If you choose a different organisation while reconnecting it, the sign-in is refused and the message names the organisation it expects. To send to another organisation, connect it separately and point your journal template or billing at it. Documents already sent carry the id Xero gave them, and quietly repointing a connection would strand them.
</Warning>

## Sending the payroll journal

A journal template decides what the journal contains; the connection decides where it goes.

<Steps>
  <Step title="Point the template at the connection">
    In **Settings → Journals**, open a template and use the accounting control in the header card to link it to the Xero connection.
  </Step>

  <Step title="Map your accounts">
    With the connection in place, the account-code and tax-rate pickers read live from Xero, so you choose from the codes that actually exist rather than typing them. Split levels map onto Xero's tracking categories.
  </Step>

  <Step title="Send it">
    Complete the pay run as usual. The journal's card offers **Send**, which posts it to Xero as a draft manual journal for somebody to approve in the ledger. A journal that does not balance is refused before anything leaves.
  </Step>
</Steps>

<Note>
  Re-issuing a pay run's journal sends a new one and voids the one it replaces, so a pay run leaves one entry in the ledger rather than two. Sending the same journal twice is refused.
</Note>

## Sending invoices and credit notes

Billing picks its connection once for the organisation, the way a journal template picks one per template.

<Steps>
  <Step title="Point billing at the connection">
    Go to **Settings → Billing → Accounting system** and choose the connection next to Xero. Until you do, the billing screens have nothing to send through, and a send is refused with "no accounting system is linked".
  </Step>

  <Step title="Send from the billing screens">
    The send action then appears on invoices and credit notes.
  </Step>
</Steps>

With that in place:

* **Invoices** are sent one at a time or in bulk from the invoice list and detail views. Once Xero has one, a **Download PDF** button appears — that document is rendered by Xero, not by Flow Payroll.
* **Credit notes** are sent the same way. A credit note allocated against an invoice carries its allocations with it, so the customer's balance in Xero is right in one step rather than two.
* **Clients** are sent as Xero contacts, either on their own or carried along with the first document that names them.
* **Attachments** on an invoice or its line items follow the invoice once Xero has it. Xero holds ten files per document; over that, the document template decides whether the extras are dropped or merged.

## What comes back

Flow Payroll reads back what Xero says about documents it holds — paid, voided, the number Xero gave them — and shows it on the invoice or credit note. This is read on a schedule and refreshed straight after anything you send, rather than by asking Xero every time a list is opened.

## If something fails

A send that Xero refuses shows the reason against the document, in plain words rather than Xero's own wording. The usual causes:

* **The contact has no email address**, and the document was set to be emailed.
* **Too many attachments** for what Xero will hold against one document.
* **Xero asked us to slow down.** Sending carries on by itself in a few minutes; nothing is lost.
* **The connection needs attention.** Xero sign-ins expire and can be revoked at Xero's end. Reconnect under **Settings → Integrations**.

Correct the cause, then send again. Sending is never automatic, so nothing retries behind your back in a way that could duplicate a document.

## Disconnecting

A connection that a journal template or billing still uses can't be disconnected; point those at another connection first.

Disconnecting under **Settings → Integrations** removes Flow Payroll from that Xero organisation's connected apps and destroys the stored sign-in immediately. Other Xero organisations connected with the same Xero login keep working. The history of what was sent stays, so you can still see what went where.

<Warning>
  Disconnecting does not remove any documents from Xero. Documents already sent are in the customer's own Xero account and are governed by their relationship with Xero, not by Flow Payroll.
</Warning>

## Where to go next

<CardGroup cols={2}>
  <Card title="Payroll journals" icon="book" href="/guides/pay-runs/payroll-journals">
    Build the template that decides what the journal contains.
  </Card>

  <Card title="Invoices and billing" icon="file-invoice" href="/guides/bureau/invoices-and-billing">
    Raise invoices and credit notes for the businesses you run payroll for.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.