ProgramMatek: Simplifying Woocommerce Xero Integration

Connecting your Woocommerce store with Xero can streamline your invoicing process and help you stay organized. With the Woocommerce Xero Integration plugin from ProgramMatek, you can easily create invoices in Xero for all sales on your Woocommerce site. Additionally, this integration tracks and sends data on items, shipping, discounts, and tax to your Xero records, ensuring that everything is accurately balanced.

Requirements for Integration

Before you can get started with the integration, there are a few requirements to keep in mind:

  • cURL and curlSSL modules need to be installed on your server. If you’re unsure whether these modules are installed, reach out to your hosting provider for assistance.
  • Make sure you have a valid SSL certificate for your website.
  • Enable strong customer authentication, preferably using two-step authentication.
  • Ensure that your host follows industry-accepted security standards, including proper encryption of sensitive data, hosting data in low-risk areas, and implementing secure monitoring and reporting systems.
  • Your Woocommerce store must be running version 6.0 or higher.
  • Your WordPress platform should be version 5.6 or higher.
  • Your server must have PHP version 7.0 or higher.

How to Install the Integration

Installing and activating the Woocommerce Xero Integration plugin is a straightforward process. Just follow these steps:

  1. Download the .zip file from your Woocommerce account.
  2. Go to your WordPress Admin, navigate to “Plugins” > “Add New,” and click on “Upload Plugin.”
  3. Choose the file you downloaded in the previous step and click “Choose File.”
  4. Click “Install Now” and then “Activate” the extension.

For more detailed information on plugin installation and activation, refer to the “Install and Activate Plugins/Extensions” guide.

Setting Up the Connection

To establish a connection between your Woocommerce store and Xero account, you need to complete two main steps:

  1. Create a private Xero application in your Xero developer portal.
  2. Connect your Woocommerce store to your Xero application.

Please note that a single Xero app can only support a maximum of 25 OAuth connections and connect to two organizations. Keep this in mind as you proceed with the setup.

To create a private Xero application, visit the Xero developer portal’s “My Apps” section. Click on the “New app” button, and you’ll be prompted to fill in various fields, such as the app name, integration type, company or application URL, and redirect URI. Make sure to choose an app name that is easy to remember and does not include any symbols that may cause connection issues.

See also  Generate Unique Barcodes for WooCommerce Orders

Once you’ve configured the settings for your Xero application, click “Create app.” You’ll then have the option to add your site’s privacy policy and terms and conditions URLs.

To connect your Woocommerce store to the Xero application, follow these steps:

  1. Click on the “Configuration” tab in the Xero developer portal.
  2. Copy the “Client id” provided and paste it into the corresponding field in your Woocommerce Xero admin settings page.
  3. Return to the Xero application settings and generate a secret. Copy the generated secret and paste it into the “Client Secret” field in your Woocommerce Xero settings.
  4. Save the changes in both the Xero application settings and your Woocommerce Xero settings.

Once you’ve completed these steps, you should see the “Sign in with Xero” button activated on your Woocommerce Xero page. Clicking this button will redirect you to the Xero sign-in page, where you can grant access to the application and choose the organization you want to connect.

If everything is successful, you’ll be redirected back to the Woocommerce Xero page, confirming the status of the connection.

Setting Up Account Codes and Tax Rates

To ensure accurate invoicing in Xero, you need to associate account codes with invoices and payments in your company’s Chart of Accounts. This step is crucial and cannot be skipped. You can access the Chart of Accounts in your Xero dashboard under “Accounting” > “Chart of Accounts.”

Xero provides a standard set of account codes that you can modify as needed. It’s also possible to add additional accounts if required. The following are some account codes you should configure:

  • Sales Account: This account collects all sales of items from your store.
  • Shipping Account: This account tracks all shipping charges.
  • Fees Account: Use this account to represent the fees generated by the WooCommerce Fees API.
  • Payment Account: This account collects all payments made. If it doesn’t exist in Xero by default, you’ll need to create it as an “Account Type > Bank” or enable payments for this account.
  • Rounding Account: This account captures all rounding corrections.

Make sure to enter the correct account codes under “WooCommerce > Xero” within your site. The account codes you enter may differ from the sample codes provided here, so customize them to match your Xero account.

Additionally, ensure that the tax rate associated with your Xero account matches the tax rate setup in Woocommerce.

Customizing Integration Settings

The Woocommerce Xero Integration plugin offers various settings that you can customize to match your business needs. Here are a few important settings:

See also  How to Integrate FedEx Shipping with WooCommerce

Send Invoices

This setting controls when the invoice is created or updated in Xero. You can choose from the following options:

  • Manual: You’ll manually send the invoice using the Order Actions menu.
  • On creation: As soon as the order is created, the invoice is created in Xero.
  • Payment completion: The invoice is created in Xero once the payment clears.
  • On order completion: The invoice is created or updated when the order status is set to “Completed.”

We recommend selecting “Payment Completion” for optimal workflow.

Send Payments

The “Send Payments” setting determines how Xero marks the associated invoice when payment is received. You have the following options:

  • Manual: You’ll manually update the invoice with payment information.
  • Payment completion: The invoice is updated with payment details once the payment is received in Woocommerce.
  • Order completion: The invoice is updated with payment information once the order status is changed to “Completed.”

If you synchronize payments through other means, such as PayPal to Xero integration, you may need to send payments manually.

Other Settings

There are several other settings you can configure, including:

  • Treat Shipping As: Choose whether the costs associated with shipping line items should be treated as revenue or expenses in Xero. Make sure this setting matches the account type in your Xero Chart of Accounts.
  • Treat Fees As: Specify whether additional fees on your orders should be treated as income or expenses in Xero. Align this setting with the appropriate account type in your Xero Chart of Accounts.
  • Xero Branding Theme: Select a default branding theme for Xero invoices. This setting is available if you’re using version 1.7.46 or higher of the Xero plugin.
  • Match Zero Value Tax Rates: This option allows you to explicitly match a WooCommerce tax-exempt (0%) rate with a Xero tax-exempt (0%) rate.
  • Orders with Zero Total: Enable this option to export invoices for orders with a grand total of zero.
  • Send Inventory Items: If enabled, the WooCommerce product SKU will be sent to Xero as an Item Code field, allowing you to adjust inventory numbers in Xero when items are sold.
  • Use Customer Email in Contact Name: Append customer email to contact name for uniqueness and to avoid duplicates in Xero.
  • Debug: Activate this option to enable logging for the extension. You can find the log file under “/wc-logs/”.

These settings offer flexibility and control over how your Woocommerce store integrates with Xero.

See also  Setting Different Prices for Different Users in WooCommerce

Creating Invoices and Payments

Once the integration is set up, all orders placed in your Woocommerce store will be copied to your Xero account as “Awaiting Payment” invoices. When the payment is completed, the invoice will be updated and marked as “Paid.” You can find all invoices under “Business” > “Invoices” in Xero.

Each order in Woocommerce includes various fields that are sent to the Xero invoice, such as billing information, order date and number, product details, quantities, prices, shipping charges, discounts, tax totals, and the grand total.

Please note that invoices are always created with an “AUTHORIZED” status, and the tax type depends on your Woocommerce settings.

Managing Coupons and Discounts

The Woocommerce Xero Integration plugin handles coupons and discounts with ease. When a coupon is applied to an order, the discount amount is sent to Xero and displayed on each line item of the invoice. The coupon code itself is not visible in Xero.

Whether you’re offering percentage discounts or fixed-amount discounts, the integration accurately reflects them on Xero invoices. You can even use multiple coupons simultaneously, and the discounts will be applied accordingly.

Troubleshooting and Support

While the Woocommerce Xero Integration from ProgramMatek is designed to work seamlessly, you may encounter issues or errors in certain situations. Here are a few common troubleshooting tips:

  • Verify that all required account codes are filled out in the Woocommerce Xero settings page.
  • Double-check that the Xero keys provided in the Woocommerce Xero settings match your app’s credentials.
  • If you encounter an error related to token rejection or an inactive organization, ensure that you have selected the correct organization during the Xero application creation process.
  • If you need to void invoices manually when orders are refunded, you can disable the automatic voiding feature by adding a code snippet to your child theme’s functions.php file or using a code snippets plugin.
  • If you’re experiencing issues with tax rates or tax exemptions, ensure that your Woocommerce tax rates and names match those in Xero. Clearing transients or waiting for transients to expire can also help sync new tax rates from Xero.
  • For more specific issues or errors, check the Woocommerce order notes section for error messages and consult the Woocommerce Xero integration documentation for further troubleshooting steps.

Remember that ProgramMatek offers support for the Woocommerce Xero Integration, ensuring you have the assistance you need to resolve any integration-related issues.


The Woocommerce Xero Integration from ProgramMatek simplifies the process of connecting your Woocommerce store with Xero. By automating the creation of invoices, tracking and sending data, and seamlessly integrating these platforms, you can streamline your financial operations and focus on growing your business. Explore the features and settings offered by the Woocommerce Xero Integration plugin and take advantage of this powerful tool today.