ml-connector
OdooChargebee

Odoo and Chargebee integration

Odoo runs your order-to-cash cycle. Chargebee manages subscription billing and revenue recognition. Connecting the two keeps your customer records in agreement and moves invoices from Odoo into Chargebee without re-keying. When a customer is created in Odoo, they appear as a billable entity in Chargebee. When an Odoo invoice is issued, Chargebee has a matching charge record to pursue payment and track revenue. The integration handles the very different APIs and keeps both systems authoritative for what they own.

How Odoo works

Odoo exposes customers, invoices, sales orders, and payments through XML-RPC or JSON-2 APIs against a tenant-specific base URL. Authentication uses an API key paired with username login, and calls respect the invoking user's Odoo access rights. Odoo Online and Odoo.sh use SaaS base URLs, while self-hosted instances use custom domains. Polling with a high-water-mark timestamp on write_date is the production-grade sync method, since Odoo's built-in webhooks via Automated Actions are not signature-verified. The API is scheduled for migration away from XML-RPC and JSON-RPC in Odoo 22, but JSON-2 is the long-term supported transport.

How Chargebee works

Chargebee is a REST API with HTTP Basic Auth using an API key as the username and an empty password. It exposes customers, subscriptions, invoices, transactions, and payment sources, and can also push events via outbound webhooks across 200+ event types. The API is region-locked at account creation and rate-limited per plan tier from 150 to 3500 requests per minute. Chargebee uses offset-based pagination with a max page size of 100. Test and live sites have separate API keys. Chargebee has no native procurement or GL objects, so the integration focuses on customer billing and revenue data.

What moves between them

Customer records flow from Odoo into Chargebee so subscription and billing records have a matching customer entity on both sides. Odoo invoices are read and mapped to Chargebee charges, allocated to the matching Chargebee customer. Payment records from Odoo invoices sync to Chargebee transactions to keep payment status aligned. The flow runs on a schedule you control tied to your billing cycle, with retries on rate-limit responses.

How ml-connector handles it

ml-connector stores the Odoo instance URL and API key encrypted and uses XML-RPC or JSON-2 as specified. It polls Odoo at your chosen cadence using write_date filters to find changed customers and invoices, then translates each to its Chargebee equivalent. Chargebee authentication uses HTTP Basic Auth with the API key and empty password, and calls are routed to the region-specific Chargebee endpoint (chargebee.com, eu.chargebee.com, or au.chargebee.com) as configured. Chargebee rate limits return HTTP 429 per tier, so ml-connector backs off and retries. A new Odoo customer maps to a new Chargebee customer with matching name and email. An Odoo invoice maps to a Chargebee invoice or charge depending on the invoice type. Odoo line items are assigned to Chargebee items based on product code. Payment records from Odoo are replayed as Chargebee transactions if the records support it. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A SaaS company uses Odoo for order management and finance across multiple regions and uses Chargebee for recurring subscription billing and dunning. Before the integration, the finance team exported Odoo invoices and customer records weekly and manually entered them into Chargebee, matching on email to avoid duplicates. Month-end close required cross-checking customer and revenue totals between the two platforms by hand. With Odoo and Chargebee connected, each invoice generated in Odoo flows to Chargebee automatically, customer records stay in sync, and revenue is reconciled at the source without manual re-entry or duplicate hunting.

What you can do

  • Create Chargebee customers from Odoo customers, keeping email and contact information aligned.
  • Sync Odoo invoices to Chargebee as charges and track invoice line items as billable line items.
  • Map Odoo customers to Chargebee subscriptions so billing and customer records match on both sides.
  • Handle Odoo's XML-RPC and JSON-2 API transports, and Chargebee's HTTP Basic Auth with region-specific endpoints.
  • Poll Odoo on your billing cycle with retries and a full audit trail on every customer and invoice record.

Questions

Which direction does data move between Odoo and Chargebee?
Customer records and invoices flow from Odoo to Chargebee. A new Odoo customer triggers a new Chargebee customer, and each Odoo invoice generates a matching charge record in Chargebee. Payment records from Odoo invoices also sync to Chargebee transactions to align payment status. The integration keeps subscription and customer references synchronized on both sides.
How does ml-connector handle the difference between Odoo's polling and Chargebee's webhooks?
ml-connector polls Odoo on a schedule you choose, using write_date filters to find changed customers and invoices since the last run. Chargebee can also push events via webhooks if configured, which ml-connector can receive and act on. The polling approach gives you full control over sync timing tied to your billing cycle.
What if Odoo and Chargebee disagree on a customer or invoice record?
ml-connector records every read, write, and transformation in a full audit trail. If a record fails to write to Chargebee, the job is stored with the payload and can be replayed once the issue is fixed. Customer records are matched on email to avoid duplicates, and invoice line items are keyed on Odoo product code to ensure consistent item assignment.

Related integrations

Connect Odoo and Chargebee

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

Get started