> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/finance-payments/xero.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Xero

Xero is online accounting software. Create and manage accounts, contacts, invoices, credit notes, items, payments and bank transactions.

![Xero logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-094a4f6e7d4b089fc1446a307e5c3b593b7ecc72%2Fxero.png?alt=media)

|                    |                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------ |
| **Category**       | [Finance and payments](https://docs.fastn.ai/connectors/catalog/finance-payments.md) |
| **Website**        | [xero.com](https://xero.com)                                                         |
| **Authentication** | OAuth 2.0                                                                            |
| **Slug**           | `xero`                                                                               |
| **On fastn.ai**    | [Embed Xero in your product](https://fastn.ai/integrations/xero)                     |

## Setup

Your customers sign in to Xero through Fastn's own OAuth app, so nothing needs setting up first. To show your own app on the consent screen instead, add your OAuth app on the connector's **Auth** tab under **Manage providers**.

## Connect in Fastn

Your customers connect Xero from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Xero**.
2. Select **Connect** on the Xero card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Xero and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Xero's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Create Account</td><td><code>createAccount</code></td><td>Create a new account in the chart of accounts. Xero uses PUT to create.</td></tr><tr><td>Create Bank Transaction</td><td><code>createBankTransaction</code></td><td>Create a spend or receive money bank transaction. Xero uses PUT to create.</td></tr><tr><td>Create Bank Transfer</td><td><code>createBankTransfer</code></td><td>Create a transfer of money between two bank accounts. Xero uses PUT to create.</td></tr><tr><td>Create Contact</td><td><code>createContact</code></td><td>Create a new contact. Xero uses PUT to create new records.</td></tr><tr><td>Create Credit Note</td><td><code>createCreditNote</code></td><td>Create a credit note (ACCRECCREDIT or ACCPAYCREDIT). Xero uses PUT to create.</td></tr><tr><td>Create Invoice</td><td><code>createInvoice</code></td><td>Create a new invoice. Type ACCREC (sales) or ACCPAY (bill). Xero uses PUT to create.</td></tr><tr><td>Create Item</td><td><code>createItem</code></td><td>Create a new item. Xero uses PUT to create.</td></tr><tr><td>Create Payment</td><td><code>createPayment</code></td><td>Apply a payment to an invoice or credit note. Xero uses PUT to create.</td></tr><tr><td>Create Purchase Order</td><td><code>createPurchaseOrder</code></td><td>Create a new purchase order. Xero uses PUT to create.</td></tr><tr><td>Create Quote</td><td><code>createQuote</code></td><td>Create a new quote. Xero uses PUT to create.</td></tr></tbody></table>

<details>

<summary>View 38 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Delete Account</td><td><code>deleteAccount</code></td><td>Delete an account by AccountID.</td></tr><tr><td>Delete Item</td><td><code>deleteItem</code></td><td>Delete an item by ItemID.</td></tr><tr><td>Delete Payment</td><td><code>deletePayment</code></td><td>Delete (reverse) a payment by setting its Status to DELETED. POST to /Payments/{id}.</td></tr><tr><td>Email Invoice</td><td><code>emailInvoice</code></td><td>Send an invoice to the contact via email. POST with empty body to /Invoices/{id}/Email.</td></tr><tr><td>Get Account</td><td><code>getAccount</code></td><td>Retrieve a single account by AccountID.</td></tr><tr><td>Get Balance Sheet Report</td><td><code>getBalanceSheet</code></td><td>Retrieve the Balance Sheet report as at an optional date.</td></tr><tr><td>Get Bank Transaction</td><td><code>getBankTransaction</code></td><td>Retrieve a single bank transaction by BankTransactionID.</td></tr><tr><td>Get Contact</td><td><code>getContact</code></td><td>Retrieve a single contact by ContactID.</td></tr><tr><td>Get Credit Note</td><td><code>getCreditNote</code></td><td>Retrieve a single credit note by CreditNoteID.</td></tr><tr><td>Get Invoice</td><td><code>getInvoice</code></td><td>Retrieve a single invoice by InvoiceID or InvoiceNumber.</td></tr><tr><td>Get Item</td><td><code>getItem</code></td><td>Retrieve a single item by ItemID.</td></tr><tr><td>Get Organisation</td><td><code>getOrganisation</code></td><td>Retrieve details of the connected Xero organisation.</td></tr><tr><td>Get Payment</td><td><code>getPayment</code></td><td>Retrieve a single payment by PaymentID.</td></tr><tr><td>Get Profit and Loss Report</td><td><code>getProfitAndLoss</code></td><td>Retrieve the Profit and Loss report for an optional date range.</td></tr><tr><td>Get Purchase Order</td><td><code>getPurchaseOrder</code></td><td>Retrieve a single purchase order by PurchaseOrderID.</td></tr><tr><td>Get Quote</td><td><code>getQuote</code></td><td>Retrieve a single quote by QuoteID.</td></tr><tr><td>Get Trial Balance Report</td><td><code>getTrialBalance</code></td><td>Retrieve the Trial Balance report as at an optional date.</td></tr><tr><td>List Accounts</td><td><code>listAccounts</code></td><td>Retrieve the chart of accounts.</td></tr><tr><td>List Bank Transactions</td><td><code>listBankTransactions</code></td><td>Retrieve all bank transactions (spend/receive money).</td></tr><tr><td>List Bank Transfers</td><td><code>listBankTransfers</code></td><td>Retrieve all bank transfers between accounts.</td></tr><tr><td>List Connections</td><td><code>listConnections</code></td><td>List the Xero organisations (tenants) the connected access token is authorised for. Returns one entry per tenant with its tenantId, tenantName and tenantType. This is the only endpoint that yields the tenantId that every other Xero action requires in its Xero-Tenant-Id header, so call it first.</td></tr><tr><td>List Contacts</td><td><code>listContacts</code></td><td>Retrieve all contacts in the connected Xero organisation. Supports optional where/order/page filters.</td></tr><tr><td>List Credit Notes</td><td><code>listCreditNotes</code></td><td>Retrieve all credit notes.</td></tr><tr><td>List Currencies</td><td><code>listCurrencies</code></td><td>Retrieve all currencies set up in the organisation.</td></tr><tr><td>List Invoices</td><td><code>listInvoices</code></td><td>Retrieve all invoices (sales ACCREC and bills ACCPAY). Supports where/order/page filters.</td></tr><tr><td>List Items</td><td><code>listItems</code></td><td>Retrieve all inventory/products &#x26; services items.</td></tr><tr><td>List Payments</td><td><code>listPayments</code></td><td>Retrieve all payments applied to invoices and credit notes.</td></tr><tr><td>List Purchase Orders</td><td><code>listPurchaseOrders</code></td><td>Retrieve all purchase orders.</td></tr><tr><td>List Quotes</td><td><code>listQuotes</code></td><td>Retrieve all quotes.</td></tr><tr><td>List Tax Rates</td><td><code>listTaxRates</code></td><td>Retrieve all tax rates.</td></tr><tr><td>Update Account</td><td><code>updateAccount</code></td><td>Update an existing account by AccountID. Xero uses POST to update.</td></tr><tr><td>Update Bank Transaction</td><td><code>updateBankTransaction</code></td><td>Update a bank transaction by BankTransactionID. Xero uses POST to update.</td></tr><tr><td>Update Contact</td><td><code>updateContact</code></td><td>Update an existing contact by ContactID. Xero uses POST to update.</td></tr><tr><td>Update Credit Note</td><td><code>updateCreditNote</code></td><td>Update an existing credit note by CreditNoteID. Xero uses POST to update.</td></tr><tr><td>Update Invoice</td><td><code>updateInvoice</code></td><td>Update an existing invoice by InvoiceID. Xero uses POST to update.</td></tr><tr><td>Update Item</td><td><code>updateItem</code></td><td>Update an existing item by ItemID. Xero uses POST to update.</td></tr><tr><td>Update Purchase Order</td><td><code>updatePurchaseOrder</code></td><td>Update a purchase order by PurchaseOrderID. Xero uses POST to update.</td></tr><tr><td>Update Quote</td><td><code>updateQuote</code></td><td>Update an existing quote by QuoteID. Xero uses POST to update.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Contact Created or Updated</td><td><code>CONTACT</code></td><td>Fires when a contact is created or updated. eventCategory=CONTACT; eventType is CREATE or UPDATE; resourceId is the ContactID.</td></tr><tr><td>Invoice Created or Updated</td><td><code>INVOICE</code></td><td>Fires when an invoice is created or updated. eventCategory=INVOICE; eventType is CREATE or UPDATE; resourceId is the InvoiceID.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/finance-payments/xero.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
