ml-connector
QuickBooks OnlineWooCommerce

QuickBooks Online and WooCommerce integration

WooCommerce powers your online store. QuickBooks Online runs your accounting. Connecting them keeps your books synchronized with actual sales as orders arrive. New customer signups and completed orders in WooCommerce post into QuickBooks Online as invoices and customer records without manual re-entry. ml-connector handles the different authentication models, webhook signature validation, and the mapping from e-commerce order data to accounting entries.

How QuickBooks Online works

QuickBooks Online exposes vendors, customers, employees, items, accounts, invoices, bills, purchase orders, and journal entries through the QuickBooks Online Accounting API v3, authenticated with OAuth 2.0 authorization code flow. Access tokens expire in one hour; refresh tokens rotate every 24 to 26 hours with a five-year maximum lifetime. The API requires a realm_id (company identifier) from the OAuth callback. QuickBooks Online supports both webhooks (push notifications on create, update, delete) and polling via a CDC endpoint with 30-day history, though webhook payloads contain only the entity ID and operation and must be fetched in full via GET.

How WooCommerce works

WooCommerce exposes orders, refunds, customers, products, taxes, coupons, and payment gateway records through the REST API on the customer's WordPress domain, requiring no shared base URL. Authentication is API key (consumer key and consumer secret pair) via HTTP Basic Auth. WooCommerce communicates through webhooks (push model) with topics for order creation, update, deletion, customer events, and product changes. Webhooks are disabled after five consecutive non-2xx responses and must be manually re-enabled. Each API key is scoped to a WordPress user; if that user is deleted, the key becomes inactive.

What moves between them

Orders and customers flow from WooCommerce into QuickBooks Online. When a WooCommerce order is placed or updated, ml-connector receives the webhook notification, fetches the full order details from WooCommerce, and posts an invoice into QuickBooks Online with line items mapped to QBO items and the customer mapped to a QBO customer record. Customer records created or updated in WooCommerce are synchronized into QuickBooks Online so your customer master stays aligned between the two systems. The flow is read-only to WooCommerce; ml-connector does not write orders back to the store.

How ml-connector handles it

ml-connector stores the WooCommerce API key encrypted and authenticates every request with HTTP Basic Auth using the consumer key and secret. On the QuickBooks Online side, it obtains an OAuth2 access token during the initial link and refreshes it when expiration approaches or when a call returns a 401. When a WooCommerce webhook fires (order.created, order.updated, customer.created, customer.updated), ml-connector validates the HMAC-SHA256 signature using the webhook secret, then fetches the full record from WooCommerce and posts it to QuickBooks Online. Orders become invoices with line items mapped to QBO items and tax mapped to QBO tax codes. Customers are created or updated in QuickBooks Online with their email and billing address from WooCommerce. Because WooCommerce webhooks can be disabled if ml-connector returns five consecutive non-2xx responses, it implements exponential backoff on transient errors and carefully distinguishes client errors (bad data, missing mapping) from server errors (quota, temporary outage). Every record carries a full audit trail so a failed post can be replayed once the underlying cause is fixed.

A real-world example

A small-to-mid-size retailer runs WooCommerce on their WordPress site and uses QuickBooks Online for bookkeeping. Before the integration, the bookkeeper manually exported orders from WooCommerce every few days, created matching invoices in QuickBooks Online, and re-entered customer billing addresses and payment terms. With WooCommerce and QuickBooks Online connected, each order automatically becomes an invoice in the accounting system the moment it completes, the customer master stays current, and reconciliation is instant. The bookkeeper reclaims hours per week previously spent on data entry and can focus on analysis instead.

What you can do

  • Post WooCommerce orders into QuickBooks Online as invoices with line items and tax mapped automatically.
  • Keep customer master data synchronized between WooCommerce and QuickBooks Online.
  • Authenticate WooCommerce with API key credentials and QuickBooks Online with OAuth2 tokens, refreshing automatically.
  • Validate WooCommerce webhook signatures and post orders on webhook trigger with exponential backoff for transient errors.
  • Maintain a full audit trail of every order and customer sync with replay capability for failed postings.

Questions

Which direction does data move between WooCommerce and QuickBooks Online?
Orders and customers move from WooCommerce into QuickBooks Online. Each WooCommerce order becomes an invoice in QBO, and WooCommerce customer records sync to QBO customer master data. The flow is read-only to WooCommerce; ml-connector does not write orders or customer records back to the store.
What happens if a WooCommerce webhook fails to post to QuickBooks Online?
ml-connector implements exponential backoff for transient errors (timeouts, 5xx responses) and distinguishes them from client errors (bad data, missing item mapping). If a webhook is disabled after five consecutive non-2xx responses, the integration maintains a full audit trail so the order can be replayed into QuickBooks Online once the underlying cause is fixed.
How does the integration handle OAuth token expiry in QuickBooks Online?
ml-connector automatically refreshes the OAuth2 access token when it approaches expiration and when a call returns a 401 Unauthorized response. Refresh tokens rotate every 24 to 26 hours, and the integration tracks expiry so a renewal does not cause an outage.

Related integrations

Connect QuickBooks Online and WooCommerce

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

Get started