Web application / Xero

Xero: hybrid microfrontends, tenant routing and the bank-reconciliation API gap

How Xero combines a 66-microfrontend shell with classic .aspx/.ashx banking endpoints, and why public REST and MCP stop short of bank-feed matching.

Contract model · conceptual sequence, not a claim about internal deployment
  1. Identity + xero-tenant-id route
  2. Public REST / MCP transaction write
  3. Web-only bank statement match
01 / EMPIRICAL RECORD

Investigation question

Why can an OAuth2 accounting integration or official Xero MCP server create bank transactions and manual journals, yet still hit a hard wall on unreconciled bank-feed lines and OK matching?

02 / EMPIRICAL RECORD

Observed

Static AST analysis of public go.xero.com/assets/*.js and edge.xero.com bundles alongside XeroAPI/Xero-OpenAPI (v19.1.0, 15 specs) and unauthenticated RFC 9728 discovery on https://api.xero.com/.well-known/oauth-protected-resource/mcp/v1 reveals a split architecture. While navigation and newer surfaces run inside edge.xero.com’s 66-microfrontend React shell (xero-blue-navigation), core cashbook reconciliation (/Bank/BankReconcile.aspx) and Cash Coding (/FastCodingSaveProxy.ashx, /ajax/bankinglookup/getbankrules) remain classic server-rendered .aspx/ExtJS/.ashx endpoints. On the machine-facing plane, POST https://api.xero.com/mcp/v1 (405 on GET, confirming Streamable HTTP) advertises 22 OAuth2 scopes under identity.xero.com (accounting.invoices, accounting.banktransactions, accounting.manualjournals, etc.)—and zero bankfeeds or finance.bankstatementsplus scopes. Likewise, @xeroapi/xero-mcp-server@0.0.16 (51 tools) and @xeroapi/xero-command-line@0.0.8 (69 commands) expose accounting CRUD but no endpoint to list unreconciled bank-feed StatementLines or click OK to reconcile them.

03 / EMPIRICAL RECORD

Inferred

Xero’s API-versus-UI gap is structural, not an oversight in the CLI or MCP wrapper: BankFeeds (bankfeeds.xro/1.0 and 2.0) and BankStatementsPlus (finance.xro/1.0) are partner-gated financial-institution APIs, while final statement-line matching (BankReconcile.aspx / FastCodingSaveProxy.ashx) lives exclusively in the web session. Consequently, safe close automation should never scrape .ashx cookies; instead, it can diff exported bank CSV/OFX statements locally against GET /BankTransactions, /Payments, /BankTransfers, and /Journals, then write penny-matched BankTransactions or BankTransfers (Idempotency-Key) so Xero’s web UI highlights green 1:1 matches for one-click human confirmation.

04 / METHODOLOGICAL BOUNDARY

Unknown & limitations

No live Xero tenant ledger, bank feed, or accounting record was mutated for this article. Partner-only bankfeeds.xro / finance.xro approval criteria, internal statement-matching heuristics, and tenant-specific rate-limit burst enforcement were not exercised.

05 / EMPIRICAL RECORD

Architecture

Xero spans four layers: (1) identity.xero.com OIDC/OAuth2 authorization followed by GET https://api.xero.com/connections to resolve organization tenantId values passed on every API call via xero-tenant-id; (2) edge.xero.com hosting a 66-MFE modern React shell; (3) go.xero.com serving classic .NET .aspx/ExtJS modules and .ashx AJAX handlers for bank reconciliation and fast cash coding; and (4) api.xero.com hosting 15 versioned REST domains (api.xro/2.0, assets.xro/1.0, projects.xro/2.0, files.xro/1.0, regional payroll.xro, and partner-gated bankfeeds.xro / finance.xro) plus hosted /mcp/v1.

06 / EMPIRICAL RECORD

Domain & data models

Two Xero Accounting (api.xro/2.0, 235 operations in xero_accounting.yaml v19.1.0) conventions regularly trip generic clients: (1) HTTP verb inversion — PUT (PUT /BankTransactions, PUT /Invoices, PUT /BankTransfers, PUT /ManualJournals) is create-only, whereas POST creates or updates existing records; and (2) GET /Journals exposes the immutable double-entry general-ledger audit stream (JournalNumber cursor) distinct from editable source ManualJournals or BankTransactions.

07 / EMPIRICAL RECORD

Workflows & state machines

A deterministic reconciliation workflow without browser-cookie automation: (1) ingest local bank/card CSV or OFX statement exports alongside GET /BankTransactions, GET /Payments, GET /BankTransfers, and GET /Journals; (2) detect unreconciled diffs, duplicate transfers, and Suspense orphans offline; (3) preview and create exact gross-minus-fee split BankTransactions (PUT /BankTransactions with Idempotency-Key) so human reviewers confirm green 1:1 matches in BankReconcile.aspx.

08 / EMPIRICAL RECORD

API & protocol surfaces

15 OpenAPI 3.0 specs (Xero-OpenAPI v19.1.0), hosted Streamable HTTP MCP (POST https://api.xero.com/mcp/v1, RFC 9728 protected resource metadata, 22 non-bankfeed OAuth scopes), @xeroapi/xero-mcp-server@0.0.16 (51 stdio tools: 25 list, 11 create, 13 update, 1 get, 1 delete), @xeroapi/xero-command-line@0.0.8 (69 commands), and XeroAPI/xoauth (12 local PKCE token commands).