ml-connector
MYOBChargebee

MYOB and Chargebee integration

MYOB manages your accounting and customer records. Chargebee manages your recurring billing and payment collection. Connecting the two keeps your billing system in sync with your accounting ledger. New customers entered into MYOB automatically flow into Chargebee, and sales invoices from MYOB can be pushed to Chargebee as billing records. ml-connector handles MYOB's dual authentication requirement and keeps both systems aligned on a polling schedule you control.

How MYOB works

MYOB AccountRight Live API v2 exposes contacts (suppliers, customers, employees), purchase and sales invoices, purchase orders, customer and supplier payments, general ledger accounts, and inventory items through REST with OData v3 query parameters. Cloud access is via https://api.myob.com/accountright/{company_file_id}, and MYOB also supports local AccountRight desktop app instances at http://localhost:8080. Authentication requires three headers on every call: an OAuth2 Bearer token that expires in 20 minutes, an x-myobapi-key, and an x-myobapi-cftoken header containing Base64-encoded company file username and password. MYOB has no webhooks, so data is read by polling using OData $filter on LastModified timestamps. API limits are 8 requests per second and 1,000,000 requests per day per key; maximum page size is 1000 records ($top=1000).

How Chargebee works

Chargebee is a subscription billing SaaS that manages customers, subscriptions, invoices, credit notes, transactions, and payment sources via REST over HTTPS. The API uses HTTP Basic Auth with an API key as the username and an empty password, Base64-encoded in the Authorization header. Test and live sites have separate API keys and are accessed via region-specific base URLs (https://{site}.chargebee.com/api/v2/, or .eu. or .au. variants). Chargebee can both receive API writes (POST for creates, form-urlencoded parameters) and push events outbound via webhooks for over 200 event types across customers, subscriptions, invoices, and payments, with automatic retries up to 2 days. Rate limits depend on plan tier: Starter 150 requests per minute, Performance 1000 per minute, and Enterprise 3500 per minute, with page-size limits of 100 records per call.

What moves between them

Customer records flow one direction: from MYOB contacts (suppliers and customers) into Chargebee customers on a polling schedule. Sales invoices from MYOB map to Chargebee invoices, so MYOB billing records are reflected in your Chargebee ledger. Contact names, email, and billing addresses are synced from MYOB; invoice amounts, dates, and line items are pushed from MYOB into Chargebee as new invoice records or updates to existing ones. The sync runs on a schedule you define; no real-time push is possible because MYOB has no webhook system.

How ml-connector handles it

ml-connector stores MYOB's OAuth2 access token and company file credentials encrypted. On each poll cycle, it refreshes the OAuth2 token if it is within 5 minutes of expiry to avoid token-expired 401 errors mid-request. Every API call includes the x-myobapi-cftoken header with the company file credentials Base64-encoded. When Chargebee returns a 429 rate limit, ml-connector backs off and retries with exponential jitter. Contacts are mapped to Chargebee customers by email address or MYOB UID to avoid duplicates; invoices are linked to the matching customer and written as new invoice records or updated if the same invoice UID already exists in Chargebee. All contacts and invoices carry a LastModified timestamp in MYOB, so ml-connector uses OData $filter to poll only changed records since the last sync, minimizing API calls. Every record carries a full audit trail and can be replayed if a downstream write to Chargebee fails.

A real-world example

A small professional services firm in Australia uses MYOB to manage their accounting, customers, and invoicing. They have recently started a recurring subscription model and chosen Chargebee to manage recurring billing and payment collection. Before the integration, the finance team manually exported customer lists and invoices from MYOB each week and re-entered them into Chargebee by hand. With MYOB and Chargebee connected, new customers added to MYOB automatically appear in Chargebee within the polling window, and the monthly invoices MYOB generates flow directly into Chargebee as billing records. The two systems stay in sync with no manual data entry.

What you can do

  • Sync MYOB contacts into Chargebee customers, mapped by email address or UID to prevent duplicates.
  • Push MYOB sales invoices into Chargebee as subscription invoices with line items and amounts.
  • Handle MYOB OAuth2 token refresh every 20 minutes and the required company file credential header on every API call.
  • Poll MYOB for changes using OData LastModified filters to minimize API calls and respect the 8 req/sec rate limit.
  • Retry on Chargebee rate limits (150 to 3500 req/min depending on tier) with exponential backoff and a full audit trail per record.

Questions

Which direction does data move between MYOB and Chargebee?
Customers and invoices flow one direction: from MYOB into Chargebee. MYOB contacts (customers and suppliers) are synced to Chargebee customers, and MYOB sales invoices are pushed to Chargebee as invoice records. Chargebee payment and subscription events are read-only in this integration, so no data flows back to MYOB.
How does ml-connector handle MYOB's dual authentication requirement?
MYOB requires both an OAuth2 Bearer token and a company file credential header (x-myobapi-cftoken) on every API call. ml-connector stores both encrypted, refreshes the OAuth2 token when it approaches expiry (20-minute window), and includes the company file credentials Base64-encoded on every request. If the company file token expires or is invalid, the API returns 401 and ml-connector surfaces the error.
What happens if MYOB or Chargebee rate-limits the connection?
MYOB enforces 8 requests per second and 1,000,000 requests per day per API key. Chargebee's limits range from 150 to 3500 requests per minute depending on your subscription tier. ml-connector respects both by checking response headers, backing off with exponential jitter when it receives a 429, and retrying. Long-running syncs of large contact or invoice lists may need scheduling outside peak hours.

Related integrations

Connect MYOB and Chargebee

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

Get started