ml-connector
Exact OnlineChargebee

Exact Online and Chargebee integration

Exact Online tracks all financial transactions in one place; Chargebee handles recurring billing and subscription lifecycle. Connecting them ensures that every subscription, customer, and invoice in Chargebee flows into Exact Online's general ledger and accounts receivable without manual reconciliation. Customer records stay aligned across both systems, and invoices created by Chargebee's billing engine post into Exact Online so your accounting is always current.

How Exact Online works

Chargebee exposes customers, subscriptions, invoices, credit notes, transactions, and payment sources through a REST API using HTTP Basic Auth with an API key. It publishes webhooks for over 200 event types across customers, subscriptions, invoices, and payments, with automatic retries up to 2 days. The API accepts GET for reads and POST for writes, returns JSON, and enforces per-plan rate limits (Starter 150 requests per minute, Performance 1000 per minute, Enterprise 3500 per minute). Chargebee is region-locked at account creation and provides separate API keys for test and live sites. Offset-based pagination caps page size at 100 records.

How Chargebee works

Exact Online is a cloud ERP covering accounting, purchasing, sales, inventory, and HR, built on a REST API with OData v3 query syntax and OAuth 2.0 Authorization Code Grant. Access tokens expire after 10 minutes; refresh tokens rotate on each refresh and must be used at least once every 30 days. The API uses region-specific base URLs (Netherlands, Belgium, UK, Germany, France, Spain, USA) and requires a division ID for all calls. Exact Online supports webhooks with HMAC-SHA256 signatures for significant resources including Accounts, SalesInvoices, GLAccounts, and TransactionLines. All related entities must be fetched in separate requests since the API does not support the $expand parameter.

What moves between them

Chargebee customer, subscription, and invoice events flow into Exact Online via webhook notifications. When a subscription is created or renewed, ml-connector creates a sales invoice in Exact Online and posts revenue recognition entries to the GL. When a customer is created or updated, ml-connector syncs the account record to Exact Online's Accounts entity. Changes to subscriptions (upgrades, downgrades, cancellations) trigger invoice adjustments or credit notes in Exact Online. The sync is primarily one-way from Chargebee into Exact Online, with Exact Online as the accounting authority; subscription events drive the timing.

How ml-connector handles it

ml-connector receives Chargebee webhook payloads, verifies the request authenticity by re-fetching via the Chargebee API, and transforms customer and subscription records into Exact Online's account and sales invoice schemas. It stores the Chargebee API key and Exact Online OAuth refresh token encrypted, refreshing the OAuth token when it approaches the 10-minute expiry. For each invoice event, ml-connector maps Chargebee subscription line items to Exact Online items and GL accounts, creating a Sales Invoice with the correct GL line allocations. It resolves the customer from Chargebee to the Exact Online account by email or external ID. Division ID is fetched once per customer and cached. Rate limits are respected per Chargebee's plan tier; if 429 is returned, ml-connector backs off exponentially. Every record carries a full audit trail showing the source webhook event, transformation, and GL posting status.

A real-world example

A mid-market SaaS company runs Chargebee for subscription billing and Exact Online for accounting. Previously, the finance team exported monthly invoices from Chargebee and manually created GL entries in Exact Online, then spent time reconciling customer records between the two systems. Sales people often saw outdated customer status in Exact Online because account updates happened only at month-end batch runs. With Chargebee and Exact Online connected, each subscription event triggers an immediate update: new customers are added to accounts receivable, invoices post to the GL automatically with the correct revenue accounts and dimensions, and subscription changes (upgrades, downgrades, cancellations) flow as GL adjustments. The finance team can now produce accurate monthly revenue reports directly from Exact Online without leaving the ERP.

What you can do

  • Create and update customer accounts in Exact Online as Chargebee customers are added or modified.
  • Post Chargebee invoices to Exact Online's sales ledger with correct GL account and cost center allocation.
  • Map Chargebee subscription line items to Exact Online items so billing aligns with inventory and revenue accounts.
  • Sync subscription events (new, renewal, upgrade, downgrade, cancellation) as invoice changes in Exact Online in near real-time.
  • Authenticate Chargebee with HTTP Basic Auth and Exact Online with OAuth 2.0, managing token refresh and division ID resolution.

Questions

Which direction does data move between Exact Online and Chargebee?
Data moves primarily from Chargebee into Exact Online. Chargebee customer, subscription, and invoice events trigger the creation or update of accounts, sales invoices, and GL entries in Exact Online. Exact Online acts as the accounting system of record, so financial entries are not written back to Chargebee.
How does ml-connector handle Chargebee's webhook delivery and Exact Online's division ID requirement?
ml-connector receives Chargebee webhook notifications and verifies authenticity by re-fetching the record via the Chargebee API. For each customer, it fetches the division ID from Exact Online's /api/v1/current/Me endpoint once and caches it. All subsequent API calls to Exact Online use the cached division ID, reducing latency and API calls.
What happens if a subscription event arrives while the Exact Online OAuth token is near expiry?
ml-connector tracks the OAuth access token's 10-minute lifetime and proactively refreshes it before expiry. If a token refresh fails or a call returns 401, ml-connector uses the refresh token to re-authenticate immediately. The refresh token itself is rotated on each refresh and must be used at least once every 30 days.

Related integrations

Connect Exact Online and Chargebee

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

Get started