Xero logo

Xero

ERP & FinanceOAuth 2.0Live

Connect your customers' Xero organisations so your product can read and write invoices, contacts, and ledger entries without handling OAuth tokens yourself. The customer's Xero advisor or admin consents on Xero's screen; Askel manages token refresh and the per-org Xero-Tenant-Id.

What you can do

Create and update invoices

POST new sales invoices or bills to a customer's Xero organisation, or update draft invoices to approved status. Covers line items, tax types, account codes, and due dates.

Read contacts and manage the contact list

Fetch the customer's contact directory, create new contacts, and update existing records. Contact data includes name, email, phone, postal address, and tax number.

Read chart of accounts

Pull the account list with codes, types, and tax types so your product can present valid account codes when creating journal entries or allocating invoice lines.

Post manual journal entries

Create journal lines against specific account codes for adjustments, accruals, or reconciliation entries that originate in your product and need to land in Xero's ledger.

Fetch bank transactions and reconciliation state

Read bank transactions imported into Xero and their reconciliation status. Useful for cash-flow dashboards or payment-matching workflows running inside your product.

Read reports: balance sheet and profit and loss

Fetch Xero's built-in financial reports as structured data. Lets your product show consolidated financials without requiring the customer to export PDFs or CSV files.

Sample use case

Auto-generating Xero invoices from your product's subscription events

You sell a B2B subscription management platform. A new customer, Dunmore Recruitment Ltd, wants every subscription event in your product (new signup, upgrade, cancellation) to create or void a corresponding invoice in their Xero organisation. Dunmore's finance team uses Xero exclusively; they do not want to re-enter billing data by hand.

  1. 1

    Dunmore's admin connects Xero

    Dunmore's Xero advisor clicks Connect Xero in your product. Askel redirects to Xero's consent screen. The advisor selects Dunmore Recruitment Ltd from the organisation picker, approves the requested scopes, and Xero issues a refresh token and a Xero-Tenant-Id.

  2. 2

    Xero account codes mapped

    Askel reads Dunmore's chart of accounts. Your product's onboarding wizard shows the account list and Dunmore's finance manager maps subscription revenue to account 200 (Sales) and tax to their applicable rate.

  3. 3

    Contact sync

    Askel reads Dunmore's Xero contact list. Your product links each of Dunmore's end-customers to their matching Xero contact ID. New customers without a Xero contact are created automatically via the Contacts API.

  4. 4

    Subscription event triggers invoice creation

    When a new subscription is activated in your product, Askel POSTs an invoice to Dunmore's Xero org with the correct contact, line items, account code, tax type, and due date. The invoice appears in Xero as a draft, ready for Dunmore to review and approve.

  5. 5

    Cancellation voids the invoice

    When a subscription is cancelled within the billing period, your product calls Askel to void the corresponding draft invoice in Xero. No manual step is required from Dunmore's finance team.

Authentication

OAuth 2.0

The customer's Xero advisor or admin consents on Xero's standard OAuth screen and selects the specific organisation to connect. Xero issues a refresh token and a Xero-Tenant-Id for that organisation. Askel stores the refresh token and the tenant ID; access tokens are minted per request and expire after 30 minutes. Multiple Xero organisations can be connected separately by repeating the flow.

Data flow

How Askel sits between your product and the customer's system

Data flow between Customer's Xero organisation, Askel, and Your productCustomer's Xero organisationAPI endpointAskelauth · mapping · driftYour productyour backend
InvoicesContactsAccount codesJournal entriesBank transactions

FAQ for Xero

Does this work for all Xero editions (Starter, Standard, Premium)?+
Yes. The Xero API is consistent across all subscription editions. Some features such as multi-currency invoicing require a Premium plan on the customer's side, but Askel reads and writes whatever the edition supports and returns Xero's own error when a feature is unavailable on the plan.
What Xero OAuth scopes does Askel request?+
The default set is accounting.transactions, accounting.contacts, and accounting.reports.read. If your workflow includes journal entries, accounting.journals.read is added. The full scope list is shown on the consent screen before the customer approves.
Can a customer connect multiple Xero organisations?+
Yes. Each Xero organisation requires its own OAuth connection because Xero issues a separate Xero-Tenant-Id per organisation. Askel supports multiple connections under the same customer record, and your product can target the correct organisation per workflow.
What happens when Xero's access token expires?+
Xero access tokens expire after 30 minutes. Askel automatically refreshes them using the stored refresh token before each API call. If the refresh token itself is revoked (for example, by the customer revoking consent in Xero), Askel surfaces a credential-expired alert on the customer's connection page.
Ready to ship integrations faster?customers faster?implementations faster?
Join onboarding teams delivering integrations without the engineering queue,
catching drift before it breaks, and hitting go-live dates.
Security & Compliance
ISO 27001 Certified
GDPR Compliant

© 2025 Askel.ai. All rights reserved.