Xero

ToolByIronHubVersion0.1.0

Xero Accounting API integration. Reads contacts, invoices, accounts, payments, bank transactions, items, credit notes, the organisation, and financial reports; creates and updates contacts, invoices, and payments. Multi-tenant: every action except list_connections takes a tenant_id (discover ids via list_connections). Created invoices default to DRAFT and create actions accept an idempotency key. Authenticated with a user-authorized Xero OAuth2 token presented as a Bearer header against api.xero.com, with the Xero-tenant-id header set per call.

Install
$ironclaw ironhub install xero

Description

Xero Accounting API integration for the IronClaw agent runtime. Compiles to a wasm32-wasip2 sandboxed tool that talks to api.xero.com with credentials injected by the host.

What it does

A single xero.invoke capability dispatches a tagged-union action:

  • Read: list_connections, get_organisation, list_contacts, get_contact, list_invoices, get_invoice, list_accounts, list_payments, list_bank_transactions, list_items, list_credit_notes, get_report.
  • Write: create_contact, update_contact, create_invoice, update_invoice, create_payment.
  • Escape hatch: xero_request for any Accounting API endpoint not named above, bounded to /api.xro/2.0/ and /connections.

Multi-tenant

A connected Xero login can reach several organisations. Every action except list_connections requires a tenant_id; the tool sets it as the Xero-tenant-id header. Call list_connections to discover the ids.

Auth

Authorization-code OAuth2. The host obtains and refreshes the token (the tool declares the offline_access and granular accounting.* scopes) and injects it as a Bearer header. The tool never sees the token. See xero-tool.capabilities.json for setup.

Write safety

Invoices are created as DRAFT unless an explicit Status is supplied; create actions accept an idempotency_key; and validation failures are surfaced as errors even when Xero returns HTTP 200.

Build

cargo build --target wasm32-wasip2 --release

The module is emitted at target/wasm32-wasip2/release/xero_tool.wasm. The release generates the extension manifest from xero-tool.capabilities.json and references the module there as wasm/xero-tool.wasm.

Access & Credentials

Credential method

OAuth 2.0

Credential accounts
XeroRequired

OAuth 2.0

xero_oauth_token

Network & Permissions

Network destinations
api.xero.com
Effects
Can write external dataFinancial

Implementation

WIT Interface0.3.0
Source Pathtools/xero
Technical tags
WASM toolOAuthHTTP allowlist

Resources

Review implementation and setup instructions before installing.