Xero integration · key: xero

Xero API integration and durable workflows

AccountingKit connects to Xero through OAuth 2.0 with explicit accounting-organization selection, normalizing thirteen resource families (contacts, items, invoices, quotes, payments, purchase orders, credit notes, accounts, tax rates, and more) with idempotent writes, opt-in file attachments, verified Xero webhooks, and durable multi-step workflows.

Facts checked

Provider key xero · 13 resource families

Capability summary

AuthenticationOAuth 2.0 with rotating refresh tokens, an explicit organization picker, and a Xero app you register and own.
WebhooksSignature-verified X-Xero-Signature callbacks followed by authoritative live reads plus hourly reconciliation.
AttachmentsList, upload (up to 6 MiB), and download on quotes, purchase orders, and invoices via opt-in accounting.attachments scope.
Financial reportsLive Profit and Loss report (accrual or cash basis) with opt-in reporting consent.
Provider actionsDocument PDFs (invoices, quotes, POs), invoice and quote online URLs, invoice email delivery, organization deep link, and cancellation.
SynchronizationInvoice, quote, and full reconciliation via durable operations; choice of 30-day cached mode or zero-retention live reads.

Key capabilities

Quote to invoice and linked supplier POs

Accept a Xero quote, raise a linked customer invoice, and create one durable purchase order per supplier with cross-linked references and step-level retry safety.

Opt-in attachments and online URLs

Pass attachments: true on a connect session to upload, list, or download files on quotes, POs, and invoices. Separately, fetch the shareable online invoice URL or a Xero deep link to a quote.

Verified webhooks plus invoice due-date alerts

Receive signed AccountingKit events for invoice.paid, invoice.payment_changed, invoice.due_soon, invoice.overdue, and quote.status_changed without polling Xero directly.

Lossless provider-native escape hatch

Keep normalized payloads for portable code, and reach for provider_options.xero or provider_data writes when you need Xero-specific fields.

Supported resources and operations

Normalized resourceXero objectReadWriteNotes
OrganizationsOrganisationYesRead-onlyRead-only plus organization deep link.
ContactsContactYesYesCustomers and suppliers; idempotent upsert recipe.
ItemsItemYesYesSKU catalog read, create, update, and item.upsert recipe.
InvoicesInvoiceYesYesPDF, online URL, email delivery, cancel, settlements, attachments.
QuotesQuoteYesYesPDF, online URL, attachments, status-change webhooks, accept-to-invoice.
Purchase ordersPurchaseOrderYesYesStandalone or created per supplier during quote conversion; PDF and attachments.
PaymentsPaymentYesYesNormalized payment recording with allocations.
Credit notes, overpayments, prepaymentsCreditNote, Overpayment, PrepaymentYesRead-onlyCustomer credit notes and settlements mapped onto invoices.
Accounts, tax rates, branding themesAccount, TaxRate, BrandingThemeYesRead-onlyAccounts writable through provider-native payloads.

Example API request

Every write requires an Idempotency-Key header and returns a normalized response shape shared across all six providers. Read the full Xero technical guide for setup steps and field mappings, or validate payloads with our remote MCP server.

curl --request POST "https://api.accountingkit.dev/v1/automations" \
  --header "Authorization: Bearer $ACCOUNTINGKIT_API_KEY" \
  --header "Idempotency-Key: accept-quote-814" \
  --header "Content-Type: application/json" \
  --data '{
    "connection_id": "00000000-0000-0000-0000-000000000000",
    "recipe": "quote.accept_and_create_invoice",
    "input": {
      "quote_resource_id": "00000000-0000-0000-0000-000000000000",
      "external_reference": "deal_814",
      "purchase_orders": [
        {
          "supplier_contact_id": "supplier-contact-id",
          "line_items": [{"description": "Server hardware", "quantity": 2, "unit_amount": 1850}]
        }
      ]
    }
  }'

Operational details and known limits

Operational behavior

  • Bring your own Xero developer app on every plan so Xero connection quotas, branding, and certification remain under your organization.
  • Every write requires an Idempotency-Key header (retained 30 days) so retried requests never duplicate Xero invoices or purchase orders.
  • Per-connection provider budgets prevent one busy Xero tenant from throttling another tenant.

Not supported in this release

  • Supplier credit notes are excluded from the customer credit_notes resource.
  • Normalized account writes return a validation error; use the provider-native Xero write path for accounts.
  • Zero-retention connections support live point reads and search, not cached list endpoints or background sync.

Common questions

How does AccountingKit prevent duplicate Xero invoices on retries?

Every write endpoint requires an Idempotency-Key header scoped to your organization and environment for 30 days. Concurrent retries receive a conflict while the first write is in flight, and completed retries return the original result with Idempotent-Replayed: true.

Can I attach a PDF to a Xero quote or invoice through AccountingKit?

Yes. Pass attachments: true when creating a connect session so Xero requests the accounting.attachments scope, then upload, list, or download files up to 6 MiB on quotes, purchase orders, and invoices.

Can I use my own Xero developer app credentials?

Yes. You register your Xero client ID, client secret, and webhook key in AccountingKit Provider apps, encrypted with AES-256-GCM under Google Cloud KMS.

Other accounting integrations