Skip to main content

Integration

Connect WooCommerce to Xero

A custom WooCommerce Xero integration for UK stores: orders, refunds, custom checkout fields and gateway payouts posted to Xero. See if it fits.

WooCommerce
Xero

Integration

What This Integration Does

A WooCommerce Xero integration posts each paid WooCommerce order into Xero as a sales invoice, turns refunds into credit notes, and carries the product variations, tax classes, shipping lines and coupons across without anyone retyping them. If you run WooCommerce Subscriptions, renewal orders arrive in Xero as their own invoices, so recurring revenue stays separate from one-off sales.

WooCommerce stores carry more variety than most platforms: variable products priced per variation, several tax classes, physical and digital goods on the same order, coupons that stack, and checkout fields added by plugins. The integration maps all of that into Xero’s structure for your store specifically. It’s one of the payment-to-accounting pairings on our integrations overview.

The Workflow

The integration listens to WooCommerce through its REST API and webhooks. When an order moves to “processing” (paid, waiting to be fulfilled) or straight to “completed” for downloads, it reads the full order and builds the Xero invoice.

Contact matching runs first. Registered customers are matched by email and get their own Xero contact, which builds a purchase history your accountant can look back on. Guest orders can go to a single “WooCommerce Guest Sales” contact or be grouped into a daily summary invoice, depending on how your accountant prefers to work.

Line items take the most care. A variable product, say a T-shirt in Large and Blue, arrives with the parent product name and the variation attributes. The integration maps it to the right Xero item and income account and keeps the variation detail in the line description, so the invoice says what was sold. Product categories can map to separate income accounts: clothing to one, accessories to another, downloads to a third.

Tax follows WooCommerce’s tax classes. Standard-rated, reduced-rated and zero-rated products each map to the matching Xero tax rate. Where the store calculates tax by the customer’s location, the integration reads the tax WooCommerce charged rather than working it out again, so the Xero invoice matches what the customer paid to the penny.

Coupons are spread at line level. A percentage coupon on the whole basket is split across the lines in proportion, and a fixed amount on one product discounts only that line, which keeps the gross, discount and net figures your revenue reports depend on.

Custom Order Fields in Xero

Most WooCommerce stores collect something the standard order doesn’t hold: a purchase order number from a trade buyer, a delivery date, a gift message, a VAT number, the branch or sales rep who took the order. Checkout field plugins save these as order meta. Off-the-shelf Xero connectors usually ignore them, because they only know the fields every store has.

A custom integration decides where each field lands. A trade customer’s PO number goes in the invoice Reference, where their accounts team will look for it. A sales channel or region can set one of Xero’s tracking categories (Xero allows two active at a time), so profit and loss reports can be split by it. Anything your accountant only needs to see goes into the line description. We read the fields through the order’s meta_data in the REST API rather than querying the database directly, so nothing breaks when the store moves to WooCommerce’s High-Performance Order Storage.

Take a garden furniture store selling to both homeowners and landscapers. Landscapers enter a job reference at checkout and buy on 30-day terms. With the job reference in the Xero invoice Reference and the customer type set as a tracking category, the store can chase overdue trade invoices by job and see trade margin apart from retail, with no one touching a spreadsheet.

Gateway Payouts and Reconciliation

The money from a WooCommerce order sits with the payment gateway, whether that’s Stripe, PayPal or WooPayments, and each pays out in batches with fees deducted, so the deposit in your Xero bank feed matches no single invoice. The integration records each order payment against a clearing account for its gateway, posts the fees as an expense, and moves the payout total to the bank. When the deposit appears in the feed it matches one transaction, and each clearing account settles to zero. The gateway side works the same way as our Stripe and Xero and PayPal and Xero builds.

A Plugin or a Custom Build

Plugins that connect WooCommerce to Xero exist and suit plenty of stores. If you sell to consumers through one gateway, with a simple tax setup, and your accountant is happy with what the plugin posts, start there and save the build cost.

We get asked to build when a store has outgrown what the plugin assumes. The usual signs:

  • Custom checkout fields that need to reach Xero (PO numbers, job references, branch codes)
  • Trade customers on account terms alongside retail checkout
  • More than one store, or more than one currency, feeding one Xero organisation
  • Income accounts that depend on category, channel or customer group
  • Order data that also has to reach a warehouse, CRM or reporting dashboard
  • A plugin that already fails on some orders and gets fixed by hand each month

Before and After

Before: Someone runs the WooCommerce sales report, exports it and reshapes the spreadsheet before keying it into Xero. The export often shows the parent product without its variation, so invoices carry generic lines that tell the accountant nothing. Coupons appear as negative lines that need allocating by hand. Subscription renewals sit among ordinary sales. A trade buyer’s PO number lives only in WooCommerce, so their accounts team queries every invoice. The Xero ledger is days or weeks behind the store.

After: Each order reaches Xero within minutes of payment, with variations described, coupons allocated, tax classified, custom fields in the right place and subscriptions kept apart. Payouts reconcile in one click. Your accountant can report revenue by category or channel from data that arrived without anyone moving it.

Who Needs This

WooCommerce stores past the point where manual bookkeeping works, usually because of variable products, mixed tax classes, subscription revenue or custom checkout fields. The trigger is often the owner noticing that WooCommerce and Xero no longer agree and that reconciling them has become a project of its own. If you’re on Shopify, the Shopify and Xero integration covers the same accounting flow for that platform, including how shipping charges and carrier costs are split in Xero.

How We Build This

We build it between the WooCommerce REST API and the Xero API over OAuth 2.0, hosted on your infrastructure, so the account mappings, tax translations, coupon rules and field mappings are yours to change. Webhooks pass through a queue with retries, so an order that arrives while Xero is unavailable is posted when it returns. Every order is logged as posted, skipped or retried, which lets your bookkeeper see why an order is missing without asking a developer. This is the same API integration work we do across other platforms. If your books are in QuickBooks, we build the same integration for QuickBooks.

Connect Your WooCommerce Store to Xero

If your WooCommerce orders are too varied for a plugin and too many to key in by hand, tell us how the store is set up. Send the orders a month, the gateways you take payment through and any custom checkout fields, and we’ll tell you whether a plugin will do or a custom WooCommerce Xero integration is worth building.

Written by

Alex

CEO

I’m a software developer and CEO of Digital Royalty, helping growing teams scale their SaaS platforms without losing quality, visibility, or control. I focus on building structured, maintainable systems with clear processes, reporting, and accountability. With over a decade of experience across agency and in-house roles, I specialise in delivering long-term, scalable solutions that support complex, evolving products.

Portrait of Alexander De Sousa, founder of Digital Royalty
Founder-led
“I’ve put everything I know into how this company works — the standards, the method, the care on every project. It runs through the whole team, and I hold us all to it.”

Alexander De Sousa · Founder LinkedIn

Featured on BBC Radio Solent

Get started

Tell us what you need

A few quick questions, then a straight answer from a real person — usually within a few hours.

What happens next

  1. 1 We reply A real person reads your answers and gets back to you, usually within a few hours.
  2. 2 Questions or a short call If anything isn't clear, we ask by email or book a short call. Before any call we audit your website and make the quick fixes it finds, free.
  3. 3 Your fixed quote A clear, fixed price in writing, within 48 hours of any call. There is no obligation to go ahead.

Tell us what you're working on

Whether it's a new site, a platform, or a process that shouldn't be manual any more — we'll tell you honestly if we can help.