ml-connector
MYOBShopify

MYOB and Shopify integration

MYOB is where your accounting lives. Shopify is where your sales happen. Connecting the two keeps your revenue records and your customer list in agreement. Every Shopify order becomes an invoice in MYOB, automatically posted to the correct GL accounts based on product category, and customer signups in Shopify sync to MYOB contacts so you have a unified customer master. ml-connector bridges the very different authentication and data models on each side.

How MYOB works

MYOB AccountRight Live API is a REST API that exposes contacts (suppliers, customers, employees), purchase and sales invoices, purchase orders, payments, general ledger accounts, and inventory items through OData v3 query endpoints. Cloud production instances publish from https://api.myob.com/accountright/{company_file_id}/, while desktop AccountRight apps can also run locally. Authentication requires three headers: an OAuth2 bearer token (20-minute expiry, 1-week refresh), an API Key, and Base64-encoded company file credentials. MYOB enforces rate limits of 8 requests per second and 1,000,000 requests per day per API key. MYOB does not support webhooks, so changes are detected by polling with OData filters on LastModified timestamps.

How Shopify works

Shopify Admin API exposes orders, customers, transactions, refunds, and inventory levels through GraphQL and legacy REST endpoints. New integrations prefer GraphQL. All calls authenticate with OAuth2 offline tokens (issued with shpat_ prefix, no expiry). Shopify supports webhooks for orders/create, orders/updated, orders/paid, draft_orders/create, customers/create, and other finance-relevant topics, with deduplication via X-Shopify-Webhook-Id and signature verification. Draft Orders are the closest proxy to purchase orders, though Shopify has no native purchase order or vendor entity. The REST API is now legacy; GraphQL is the recommended path.

What moves between them

Orders and customers flow from Shopify into MYOB. When a Shopify order is placed, ml-connector creates a sales invoice in MYOB with the order line items, posting each line to a GL account determined by the Shopify product category. When payment is received, the transaction is recorded as a customer payment. Customer signups in Shopify create or update contact records in MYOB. Refunds in Shopify become credit notes in MYOB. The sync happens in near real-time via Shopify webhooks for writes and OData polling for reads to handle the MYOB API's lack of push notifications.

How ml-connector handles it

ml-connector stores the Shopify offline token and MYOB OAuth token plus company file credentials encrypted and presents the MYOB credentials on every call as required headers (Authorization, x-myobapi-key, x-myobapi-cftoken). MYOB tokens expire in 20 minutes, so the connector refreshes them proactively and re-authenticates if a call returns 401. Shopify webhooks for orders/create, orders/updated, and customers/create arrive at a registered endpoint, verified by checking the X-Shopify-Webhook-Id signature; the connector returns 401 if the signature is invalid. Products in Shopify carry a category field that maps to MYOB GL accounts via a customer-configured lookup table, so every order line allocates to the correct account. Shopify does not expose native vendors, so supplier records from MYOB are not synced back. MYOB rate limits are 8 requests per second, so ml-connector paces calls and backs off on HTTP 429. Because MYOB has no idempotency header, the connector deduplicates using Shopify order IDs stored in a BullMQ job ID field. Every order carry an audit trail and can be replayed if the GL posting fails.

A real-world example

A mid-sized retail company in Australia or New Zealand runs Shopify for online sales and MYOB for accounting. Before the integration, the finance team exported orders from Shopify daily and manually entered each sale as an invoice in MYOB, matching line items to GL accounts by hand. Mismatches between Shopify revenue and MYOB recorded sales caused reconciliation delays at month-end. With Shopify and MYOB connected, each order posts automatically to the correct account in real time based on product category, customers are automatically added to MYOB contacts, and reconciliation is immediate.

What you can do

  • Create MYOB sales invoices from Shopify orders, automatically mapped to GL accounts by product category.
  • Sync Shopify customers to MYOB contacts and keep them updated on signup and profile changes.
  • Record Shopify transactions and refunds as MYOB customer payments and credit notes.
  • Authenticate MYOB with OAuth2 and company file credentials, and Shopify with offline OAuth tokens, with automatic token refresh.
  • Ingest Shopify webhooks for real-time order creation and updates, with polling on the MYOB side to handle its lack of push notifications.

Questions

Which direction does data move between MYOB and Shopify?
The primary flow is Shopify into MYOB. Orders, customers, and refunds move from Shopify into MYOB as invoices, contacts, and credit notes. Product-to-GL-account mapping is configured once and applied to every order. MYOB supplier records are not synced back to Shopify because Shopify has no vendor entity.
How does MYOB's lack of webhooks affect the integration?
MYOB publishes no webhook system, so ml-connector polls the MYOB API using OData filters on LastModified timestamps to detect changes. Shopify pushes orders and customers to the connector via webhooks in near real-time, while reads from MYOB pull on a schedule to keep the two sides in sync.
Does the MYOB company file credential requirement add complexity?
Yes. MYOB requires both an OAuth2 bearer token and Base64-encoded company file credentials on every API call. The connector stores both encrypted, refreshes the token when it expires every 20 minutes, and re-authenticates if a call returns 401, so the integration handles the two-factor auth requirement transparently.

Related integrations

Connect MYOB and Shopify

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

Get started