ml-connector
Microsoft Dynamics GPChargebee

Microsoft Dynamics GP and Chargebee integration

Microsoft Dynamics GP runs receivables, the general ledger, and finance on a server the customer hosts. Chargebee runs recurring billing, invoicing, and payment collection. Connecting the two means each subscription invoice, the payment recorded against it, and any credit note flow into Dynamics GP as receivables documents and ledger entries without re-keying, and the GP customer master stays in agreement with Chargebee billing customers. ml-connector handles the very different APIs on each side and moves the data on a schedule you control. Because Chargebee has no general ledger of its own, the GL stays in Dynamics GP where it belongs.

How Microsoft Dynamics GP works

Microsoft Dynamics GP is on-premises, so there is no shared cloud endpoint. On GP 2015 and later it exposes customers, receivables invoices, GL accounts, and GL transactions through the SBA REST API at a tenant and company URL on the customer's own server, and older installs use the SOAP Web Services interface instead. Both authenticate with Windows credentials mapped to a GP user in Active Directory, with no OAuth or API keys. The company name in the URL is the SQL Server database name, not the display name. GP has no webhooks of any kind, so records are read by polling, and many write operations only work on unposted (Work) transactions because posted records are read-only.

How Chargebee works

Chargebee exposes customers, subscriptions, invoices, payments, transactions, and credit notes through its REST API v2 at a site-specific subdomain selected by region (US, EU, or AU). Authentication is HTTP Basic Auth where the API key is the username and the password is empty, with separate keys for the test site and the live site. Lists use offset-based pagination capped at 100 records per page. Chargebee pushes events such as invoice_generated, payment_succeeded, and credit_note_created by webhook, but it sends no HMAC signature, so endpoints are secured with basic auth or a secret token in the URL and the event is re-fetched by id to confirm it. Chargebee has no vendor, purchase order, or GL account objects.

What moves between them

The flow runs from Chargebee into Microsoft Dynamics GP. ml-connector reads paid and posted invoices, the payments recorded against them, and credit notes from Chargebee and posts them into GP as receivables invoices, cash receipts, and credit documents, mapped to the matching GP customers and GL accounts. Customer records flow the same direction so the GP customer master reflects Chargebee billing customers, with the billing email, company, and currency carried across. Because Chargebee has no general ledger, GL postings stay in Dynamics GP and ml-connector never writes ledger entries back into Chargebee, which is treated as the billing source of record.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Chargebee side it sends the API key as the Basic Auth username with an empty password, and derives the correct US, EU, or AU base URL from the configured region so a key is never sent to the wrong data center. On the GP side it accepts the full SBA or SOAP endpoint URL per customer along with the Windows domain, user, and the company database name, since GP is on-premises and publishes no shared address, and it reaches that server through the customer's firewall opening or a local agent. Because GP has no webhooks and is the write target, ml-connector takes Chargebee invoice_generated, payment_succeeded, and credit_note_created webhooks as triggers and re-fetches each event by id rather than trusting the pushed body, then falls back to a scheduled poll to backfill anything a webhook missed. Customers are mapped first, so every invoice references a GP customer that already exists. Each new receivables document is written into an unposted GP batch so posted records stay read-only, and the target fiscal period must be open or GP rejects the write. Chargebee returns HTTP 429 with a Retry-After header when a rate limit is hit, which ml-connector honors with exponential backoff, while GP writes are paced to a few parallel calls so polling does not slow the customer's SQL Server. Chargebee has no idempotency-key header, so ml-connector dedupes on the Chargebee event id and a BullMQ jobId, and GP itself rejects a duplicate document number rather than silently double-booking. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A subscription software company with roughly 120 employees bills its customers monthly in Chargebee and keeps its books in Microsoft Dynamics GP on a server hosted by its IT partner. Before the integration, an accountant exported the Chargebee invoice and payment registers each month and hand-keyed the receivables totals into GP, which left invoices posted days late, customer records drifting apart between the two systems, and the first part of every close spent chasing differences between billed revenue and the AR balance in the ledger. With Microsoft Dynamics GP and Chargebee connected, each paid invoice and its payment flow into GP within the polling window, posted to an unposted batch for review and matched to the right customer and account, and credit notes post as credit documents. The re-keying step is gone and close starts with receivables already reconciled.

What you can do

  • Post Chargebee invoices, payments, and credit notes into Microsoft Dynamics GP as receivables and GL documents.
  • Keep the GP customer master aligned with Chargebee billing customers, including email, company, and currency.
  • Bridge Chargebee Basic Auth and the Windows-authenticated GP SBA or SOAP endpoint on the customer's server.
  • Take Chargebee webhooks as triggers, re-fetch each event by id, and write into unposted GP batches only.
  • Dedupe on the Chargebee event id and a jobId, honor Retry-After backoff, and keep a full audit trail on every record.

Questions

Which direction does data move between Microsoft Dynamics GP and Chargebee?
The flow is Chargebee into Microsoft Dynamics GP. Invoices, payments, credit notes, and customer records move from Chargebee into GP as receivables documents, cash receipts, and customers. Chargebee has no general ledger of its own, so the GL stays in Dynamics GP and ml-connector never writes ledger entries back into Chargebee.
How does the integration reach an on-premises Dynamics GP server, and does it use webhooks?
Dynamics GP is on-premises with no cloud endpoint, so ml-connector connects to the customer's SBA REST or SOAP Web Services URL using the Windows domain account mapped to a GP user, reached through a firewall opening or a local agent. GP has no webhooks, so it is only the write target. Chargebee does the pushing: its invoice and payment webhooks trigger the sync, and a scheduled poll backfills anything that was missed.
How does the integration avoid posting duplicate or invalid documents in GP?
Chargebee has no idempotency-key header, so ml-connector deduplicates on the unique Chargebee event id and a BullMQ jobId before it writes, and it re-fetches each event by id rather than trusting the pushed payload. New documents are written into unposted GP batches so posted records stay protected, the target fiscal period must be open, and GP itself rejects a duplicate document number rather than silently double-booking.

Related integrations

Connect Microsoft Dynamics GP and Chargebee

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

Get started