ml-connector
MYOBWooCommerce

MYOB and WooCommerce integration

MYOB stores your financial records; WooCommerce sells your products online. Connecting the two keeps your accounting books accurate without manual re-keying. When a customer orders from WooCommerce, their invoice lands in MYOB immediately, priced and taxed correctly. Customer changes in WooCommerce sync back to MYOB, and payments recorded in MYOB update order status in WooCommerce so you have a single source of truth. ml-connector handles the different auth models on each side and moves the data on your schedule.

How MYOB works

MYOB is an Australian/New Zealand accounting software with the MYOB Business API (AccountRight Live API v2) covering cloud accounting with accounts payable, accounts receivable, and general ledger integrations. It exposes contacts, invoices, purchase orders, payments, GL accounts, and journal entries through REST with OData v3 query parameters. Authentication requires OAuth2 Authorization Code plus company file username and password supplied together on every call as three headers: Authorization Bearer token, x-myobapi-key (API Key), and x-myobapi-cftoken (Base64 of CF username:password). Access tokens expire every 20 minutes and refresh tokens last one week. MYOB has no native webhook system, so records are detected by polling with OData $filter on LastModified timestamps. Rate limits are 8 requests per second and 1,000,000 requests per day per API key.

How WooCommerce works

WooCommerce is an open-source e-commerce plugin deployed directly on a customer's WordPress site, managing orders, refunds, customers, products, and payment gateways through REST over HTTPS. Authentication uses API Key pairs (Consumer Key and Consumer Secret) supplied via HTTP Basic Auth. WooCommerce can push changes through webhooks for order created, order updated, customer created, customer updated, product created, and product deleted events. Webhook signatures are validated with HMAC-SHA256 keyed to the webhook secret. Webhooks are automatically disabled after 5 consecutive non-2xx responses and must be manually re-enabled. WooCommerce is self-hosted and has no native ERP features such as vendors, purchase orders, GL accounts, or accounting dimensions.

What moves between them

Orders flow from WooCommerce into MYOB as sales invoices, mapped to the customer contact in MYOB and posted to a designated GL account. Customer changes in WooCommerce (new customers, updates) sync to MYOB contacts, and new contacts created in MYOB sync back to WooCommerce as customers. Payments recorded in MYOB are read back to WooCommerce and matched against orders by transaction reference. The sync runs on a schedule tied to your order and payment volume, with WooCommerce order and customer updates pushed via webhook and MYOB payments pulled by periodic polling.

How ml-connector handles it

ml-connector registers a WooCommerce webhook on setup and validates every inbound notification with HMAC-SHA256 signature verification using the webhook secret. On the MYOB side, it keeps both the OAuth2 access token and the refresh token in encrypted storage, since the token expires every 20 minutes and a 401 mid-flow requires a refresh. The company file credentials are encrypted and appended to every MYOB API call as the x-myobapi-cftoken header alongside the Bearer token. When a WooCommerce order arrives, ml-connector looks up or creates the matching MYOB customer contact, then posts the order line items as a sales invoice with the total amount and tax code. The order maps to a designated income GL account, and line items are tagged with the product SKU for cost of goods tracking. MYOB invoices are read back periodically using OData $filter on LastModified to find new payments or journal entries, and those are matched against WooCommerce orders by reference number to update payment status. WooCommerce does not have purchase order or vendor concepts, so the integration is read-only on the WooCommerce side except for customer creation and payment status updates. If a WooCommerce webhook fails to deliver or MYOB returns a rate-limit 429, ml-connector backs off and retries with exponential jitter.

A real-world example

A small Australian online retailer runs MYOB for accounting and WooCommerce for their online store across multiple product lines. Before the integration, the owner exported the WooCommerce order list every few days and manually created corresponding sales invoices in MYOB, then matched incoming payments by hand to see which orders had been paid. This process was error-prone and took several hours per week. With MYOB and WooCommerce connected, each order automatically becomes an invoice in MYOB with the correct customer, product codes, and tax treatment, and payment confirmations from MYOB flow back to WooCommerce so the order status is always current. The accounting records are ready for month-end reconciliation without re-keying, and the owner can see cash flow in real time across both systems.

What you can do

  • Push WooCommerce orders into MYOB as sales invoices, mapped to customer contacts and income GL accounts.
  • Keep MYOB customer contacts in sync with WooCommerce customer records bidirectionally.
  • Validate WooCommerce webhook signatures and retry failed webhook deliveries with exponential backoff.
  • Refresh MYOB OAuth2 tokens automatically every 20 minutes and handle company file credential rotation.
  • Read MYOB payment records and match them to WooCommerce orders to update payment status and reconcile cash.

Questions

Can MYOB and WooCommerce data move in both directions?
Orders and customers move bidirectionally. WooCommerce orders are pushed to MYOB as invoices, MYOB customers are pulled and synced back to WooCommerce, and new WooCommerce customers are created in MYOB. Payments flow from MYOB back to WooCommerce to update order status. The integration is not symmetric; WooCommerce does not have vendors or purchase orders, so AP records in MYOB are not synchronized to WooCommerce.
How does ml-connector handle MYOB's three-credential authentication and 20-minute token expiry?
Every MYOB API call requires three headers: an OAuth2 Bearer token, the API Key, and the company file credentials encoded as Base64. ml-connector stores the refresh token encrypted and automatically exchanges it for a new access token before it expires, checking expiry in-process rather than waiting for a 401. The company file username and password are also stored encrypted and appended to each request, so you control company file access per customer without sharing credentials.
What happens if WooCommerce webhooks fail or MYOB returns a rate-limit error?
WooCommerce webhooks are automatically disabled by the platform after 5 consecutive non-2xx responses, so ml-connector validates the webhook secret on every request to guard against acceptance of unsigned payloads. MYOB enforces an 8-request-per-second rate limit and 1,000,000 requests per day per API key. ml-connector monitors both limits, backs off with exponential jitter when 429 is returned, and retries the request, ensuring no data is lost during rate-limit conditions.

Related integrations

Connect MYOB and WooCommerce

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started