Skip to main content

Integration

Connect WooCommerce to Xero

Sync WooCommerce orders, refunds, and variable products into Xero as invoices. Tax, shipping, and subscription renewals handled automatically.

WooCommerce
Xero

Integration

What This Integration Does

This integration sends WooCommerce order data into Xero as invoices the moment a payment clears, handling the product variations, tax classes, shipping methods, and coupon discounts that make WooCommerce-to-accounting sync more complex than it first appears. Refunds become credit notes. Subscription renewals — if you use WooCommerce Subscriptions — flow through as recurring invoices without any additional manual work. The goal is a Xero ledger that accurately represents your WooCommerce trading activity without anyone translating between the two systems.

WooCommerce stores often carry complexity that simpler ecommerce platforms do not: variable products with different prices per variation, multiple tax classes across product categories, mixed physical and digital goods with different tax treatments, and coupon stacking. This integration handles all of it, mapping WooCommerce’s data model into Xero’s accounting structure correctly.

The Workflow

The integration hooks into WooCommerce’s order lifecycle through its REST API and webhook system. When an order status changes to “processing” or “completed” — indicating payment has been received — the system reads the full order data and builds a Xero invoice.

Contact matching runs first. The integration searches Xero’s contacts by email address. For stores with a mix of guest and registered customers, guest orders are either assigned to a default “WooCommerce Guest Sales” contact or grouped into a daily summary, depending on your preference. Registered customers get individual Xero contacts that persist across orders, building a purchase history your accountant can reference.

Line items require the most careful mapping. A WooCommerce variable product — say, a T-shirt in size Large and colour Blue — arrives with both the parent product name and the variation attributes. The integration maps this to the correct Xero item and income account, preserving the variation detail in the description field so your accountant can see exactly what sold. Different product categories can map to different revenue accounts: clothing to one account, accessories to another, digital downloads to a third.

Tax handling respects WooCommerce’s tax class system. Standard-rated products, reduced-rated products, and zero-rated products each map to the corresponding Xero tax rate. For stores selling internationally with WooCommerce’s geolocation-based tax calculation, the integration reads the calculated tax from the order rather than recalculating it, ensuring the Xero invoice matches what the customer was actually charged.

Coupons and discounts are applied at the line-item level in Xero. A percentage coupon that reduces the entire order is distributed across line items proportionally. A fixed-amount coupon on a specific product appears as a discount on that line item only. This preserves the gross-to-discount-to-net breakdown that proper revenue reporting requires.

WooCommerce Subscriptions orders are handled as a special case. The initial subscription order creates a Xero invoice like any other order. Renewal orders — generated automatically by WooCommerce Subscriptions — trigger the same webhook and create their own invoices, giving you a clear record of recurring revenue in Xero without conflating it with one-time sales.

Before and After

Before: The store owner runs a WooCommerce sales report, exports it, and spends time reformatting the data before entering it into Xero. Variable products cause confusion because the export often shows the parent product without the variation, leading to generic line items that mean nothing in an accounting context. Coupons appear as negative line items that need to be allocated manually. Subscription renewals are mixed in with regular sales and there is no easy way to separate recurring revenue from one-time purchases. The Xero ledger is always days or weeks behind the actual trading position.

After: Every WooCommerce order reaches Xero within minutes, with variations described, coupons allocated, tax classified, and subscriptions distinguishable from one-time sales. The Xero profit and loss report reflects today’s trading, not last week’s. Your accountant can report on revenue by product category, track discount impact, and separate subscription income from one-off sales — all from data that arrived automatically.

Who Needs This

This integration is designed for WooCommerce stores that have moved past the stage where manual bookkeeping is feasible — typically stores with variable products, multiple tax classes, or subscription revenue that make the order-to-invoice translation genuinely complex. It is especially relevant for stores running WooCommerce Subscriptions, where recurring revenue needs to be tracked separately from one-time sales for accurate financial forecasting. The common trigger is a store owner realising that their WooCommerce data and their Xero data have drifted apart, and that reconciling them is a project in itself.

How We Build This

We build this as a custom API integration between WooCommerce’s REST API and Xero’s OAuth 2.0 API. Unlike generic WooCommerce-to-Xero plugins that offer limited mapping and break on complex product structures, this integration is configured for your specific catalogue, tax setup, and accounting structure. Product-to-account mappings, tax class translations, coupon handling rules, and subscription detection logic are all defined to match your business. Webhook processing runs through a queue with retry logic, and Xero token management is automatic. For platform-specific details, see our WooCommerce API and Xero API pages.

Connect Your WooCommerce Store to Xero

If your WooCommerce order data is too complex for a generic plugin and too voluminous for manual entry, a custom integration is the answer. We map your product catalogue, tax classes, and account structure, then build the connection so every sale is in Xero before your accountant needs it. Get in touch to discuss your store’s setup.

Ready to Connect Your Systems?

We build custom API integrations that handle your data reliably at scale. No Zapier, no workarounds.

Discuss Your Integration View All Integrations