Skip to Content
AccountingKitDocs
Integrations

Xero

Production-ready Xero API integration: OAuth with explicit tenant selection, thirteen resource families, lossless native writes, attachments, and verified webhooks.

Available

Thirteen resource families, lossless native writes, attachments, verified webhooks, and Xero-rendered documents.

Connections run through a Xero app your organization registers and owns, on every plan.

Capability summary

AreaSupport
AuthenticationOAuth 2.0, refresh-token rotation, explicit tenant selection, disconnect
ReadsCached lists and live point reads
WritesContacts, items, invoices, quotes, payments, and purchase orders; accounts natively only
Read-only resourcesOrganizations, tax rates, branding themes, credit notes, overpayments, prepayments
AttachmentsList, upload, and download on quotes, purchase orders, and invoices (opt-in scope)
SynchronizationInvoice, quote, and full reconciliation through durable operations
WebhooksSignature-verified Xero events followed by live provider reads
Native actionsPDFs, invoice/quote online URLs, invoice email, organization deep link, cancellation

Connect Xero

Register the application

Add the exact callback and webhook URLs shown by the AccountingKit provider-app draft. Test and live apps remain isolated.

Store credentials

Submit the client ID, client secret, and webhook key through the console. Secrets are encrypted before persistence and are never returned to the browser.

Verify and connect

Verification checks credentials, OAuth redirects, webhook configuration, and scopes before the app can become active. Create a connect session only after verification succeeds.

Normalized resources

ResourceListGetCreate / updateProvider actions
Organizations✓✓—Deep link
Contacts✓✓✓—
Items✓✓✓—
Invoices✓✓✓PDF, online URL, email, cancel, files
Credit notes✓✓——
Overpayments✓✓——
Prepayments✓✓——
Quotes✓✓✓PDF, online URL (deep link), files
Payments✓✓✓—
Purchase orders✓✓✓PDF, files
Accounts✓✓Native—
Tax rates✓✓——
Branding themes✓✓——

Native marks a resource that accepts writes only through the provider-native body. Accounts use Xero's account-specific transport (PUT /Accounts to create, POST /Accounts/{AccountID} to update), so a normalized account payload is rejected with accounts is read-only in v1.

Attachments (files above) are opt-in: pass "attachments": true when creating a connect session to request the accounting.attachments scope. Existing connections keep working without it; calling an attachment endpoint without that scope returns 409 with details.reason: "missing_scope".

For lossless Xero document payloads, exact search behavior, payment transitions, and cancellation rules, read the provider-native Xero API.

Credit notes and settlements

Xero customer credit notes support cached listing, live get, and exact live search through the credit_notes resource. Supplier credits are excluded. overpayments and prepayments expose their provider type in data.extensions.xero.type, including receive and spend transactions. All three resources are read-only, including provider-native requests. A full sync includes them; an invoice-only sync keeps its existing scope. No extra point reads are made for every invoice.

const capabilities = await client.getCapabilities(connectionId)
const credits = await client.searchResources(connectionId, 'credit_notes', {number: 'CN-100'})
const credit = await client.getResourceByProviderId(connectionId, 'credit_notes', creditNoteId)
const invoice = await client.getResourceByProviderId(connectionId, 'invoices', invoiceId)

Credit-note data includes contact, line items, status, currency, totals, remaining_credit, and allocations[]. Allocations identify the invoice by provider_id and include allocation_id, number, amount, currency, date, and deletion status where provided. allocated_amount sums the explicit active allocations; it is not total minus remaining credit, because refunds also reduce remaining credit. refunds[] lists the returned refund payments separately. Overpayments and prepayments expose the same allocation and refund fields. Payment reads also include allocations[], identifying the document paid or refunded.

Invoice data.settlements[] identifies each payment, credit note, overpayment, or prepayment using type, provider_id, allocation_id, number, amount, currency, date, and status. Amounts are decimal strings in the document currency, not bank-account currency. Invoice credit entries use Xero's applied amount, never the credit's full value. Embedded credit document dates are not allocation dates: date is null unless an explicit matching allocation provides it. All provider IDs are scoped to the connection; they are not AccountingKit resource UUIDs.

settlements_status, allocations_status, and refunds_status describe the returned detail:

  • complete: all applicable detail was returned with identifiable documents and amounts. Invoice settlement amounts also reconcile with AmountPaid and AmountCredited.
  • partial: some detail was supplied, but collections, IDs, or amounts are missing, or invoice totals do not reconcile.
  • not_available: the provider response omitted the relevant collections.

Null means unknown, not zero. These statuses describe the current provider snapshot, not a history of all reversals. Deleted entries are preserved when Xero returns them and excluded from totals. Old cached records may omit these fields until refreshed. Use a live get for current detail; synced_at and provider_updated_at on the response describe freshness.

Invoice lifecycle events add contact_provider_id, amount_credited, settlements, and settlements_status to their invoice snapshot when available. Existing amount_paid, event names, and payment transition rules are unchanged. A Xero PAID status can result from credits; it does not by itself prove cash was received. Credit-note-specific customer events, allocation change events, and financial write actions are not part of this release.

GET /v1/connections/:connection_id/capabilities returns CRUD availability based on implemented resources, granted scopes, connection state, and retention mode. Provider-side user permissions and accounting validations can still reject a request. companies in this canonical manifest corresponds to the operational organizations endpoint. The manifest currently describes CRUD and sync support; existing native actions remain documented above. Zero-retention connections support live get/search, not cached listing or sync.

Support for other providers is deferred until their allocation semantics and read paths are implemented and verified. See the Xero credit-note API and invoice API for provider fields.

On this page