Guide · Chargebee Integration Architecture

Before you choose a connector, decide which system owns the renewal date.

Integration architecture in a subscription stack is not really about transport. It is about ownership: which system is authoritative for each attribute, what happens when two of them disagree, and how you find out that they have. This guide is the reference we design against — the ownership matrix, the topology patterns, and the anti-patterns.

Reference Architecture
SYSTEMS OF RECORD CRM Owns commercial intent Chargebee Owns the subscription Product · Usage Ledger · Revenue Gateway · Instruments TWOPIR ARCHITECTURE LAYER Ownership One owner per field Boundaries drawn Topology Event vs batch Hub vs point-to-point Consistency Reconcile · Detect Repair paths ONE OWNER PER FIELD · EVERY EVENT IDEMPOTENT 2πr AN ARCHITECTURE THAT HOLDS No Contested Fields Every attribute has exactly one authoritative system Drift Is Detected Reconciliation finds it before a customer does Survives Change A new pricing model is configuration, not rework OWN · CONNECT · RECONCILE · EVOLVE
12+
Years CRM & revenue delivery
500+
Clients served worldwide
40+
Consultants & engineers
250+
Deployments delivered

Trusted by 500+ organizations — including SaaS, subscription and usage-based businesses running their quote-to-revenue operations on Salesforce, HubSpot and Chargebee with Twopir Consulting.

Amberscript
RChilli
Spinify
Kacific
Mitratech

Architecture Coverage

  • Salesforce Partner
  • HubSpot Partner
  • System of Record Design
  • Event Topology
  • Idempotency
  • Reconciliation
  • Multi-Entity
  • Usage Pipelines
First Principles

Why subscription stacks drift rather than break

A subscription stack has at least five systems holding overlapping views of the same customer. Architecture is the discipline of deciding, in advance, which view wins.

Chargebee integration architecture is the set of decisions that determine how Chargebee, the CRM, the product, the ledger and the payment gateway share one commercial reality: which system is authoritative for each attribute, how changes propagate between them, how conflicts are resolved, and how divergence is detected.

The transport mechanism — connector, iPaaS, webhook consumer, batch job — is a downstream choice. Picking it first is the most common architectural mistake in this stack, because every transport can be made to work and none of them can compensate for an ownership model that was never agreed.

PrincipleWhat it means in practiceThe failure it prevents
One owner per attributeEvery field has exactly one authoritative system. Others hold read-only copies, explicitly labelled as such.The last-write-wins race, where two systems overwrite each other and both teams stop trusting the record.
Own by lifecycle stage, not by systemThe CRM owns commercial intent up to closed-won; Chargebee owns everything about the live subscription afterwards.Arguments about whether 'the CRM' or 'billing' owns a customer, which have no answer at that altitude.
Events describe facts, not instructionsA webhook says a subscription changed. The consumer decides what that means in its own domain.Brittle coupling where a change in one system's internal model breaks three others.
Assume at-least-once deliveryEvery consumer is idempotent on event id. Duplicate delivery is normal operation.Double provisioning and duplicate charges, which is the single most common production billing bug.
Reconcile continuouslyA scheduled comparison of counts, totals and states between systems, with alerting on variance.Silent drift discovered months later by finance, with no way to date the divergence.
Design for the next pricing modelMappings expressed against catalog concepts rather than specific plan names.An integration that is correct for a commercial model you stopped selling last year.
Guide last reviewed September 2026. Platform capabilities change; these principles do not, but the specifics beneath them should be re-verified.
The Ownership Matrix

Which system is authoritative for what

This is the artefact we produce first on every integration engagement. Your matrix will differ in places — the point is that it exists and is agreed, not that it matches this one exactly.

AttributeAuthoritative systemWho holds a read-only copy, and why
Account identity and hierarchyCRMChargebee, so invoices carry the right legal entity and parent-child billing works.
Commercial intent before closeCRMNobody. Pipeline, forecast and negotiation belong in one place until the deal closes.
Product catalog and price pointsChargebeeCRM, as Products and Price Book Entries, so quoting uses real prices rather than a parallel list.
Subscription state, plan and quantityChargebeeCRM and product, so the rep sees the live plan and the app enforces it.
Billing anniversary and term datesChargebeeCRM, for renewal pipeline and forecasting. This is the field most often contested, and the CRM should not win it.
Entitlements and feature accessChargebeeProduct, which reads entitlements rather than inferring access from plan names.
Usage and consumptionProductChargebee, aggregated into billable units by metered features.
Invoices, credit notes and paymentsChargebeeCRM for context, ledger for accounting. Never edited anywhere but the source.
Payment instrumentsGateway vaultChargebee holds the token reference only. Card data lives in the vault, nowhere else.
Recognised revenueRevRec, posting to the ledgerThe ledger is authoritative for the financial statements; the subledger explains them.
Tax determinationTax engine, such as AvalaraChargebee stores the determination on the invoice as an immutable record of what was applied.
The renewal date is the most frequently contested attribute in this stack. Chargebee should own it, because it is derived from the term and the billing cycle rather than from anyone's intent.
Putting This Into Practice

The engagements that implement this architecture are Chargebee integration services — integration services, connector-first Chargebee API and integration development — and custom development where code is genuinely needed Chargebee migration guide — plus the migration guide if you are moving platforms Chargebee consulting services — all of it inside the wider Chargebee practice

Topology Patterns

Three shapes, and what each one costs

Most stacks use all three in different places. The mistake is choosing one as a standard and forcing every flow through it.

Point-to-point

Direct connections

Each system connects to each other system it needs. Simple at two or three systems, and the supported connectors are exactly this shape done well. Complexity grows quadratically, so it stops scaling quietly rather than obviously.

  • Simplest at small system counts
  • Vendor-maintained where a connector exists
  • No additional platform to run
  • Grows to n-squared links
  • Right for CRM to billing, and little else
Hub and spoke

An integration platform in the middle

Every system connects once to an iPaaS which routes and transforms. Adding the fourth and fifth systems is cheap, error handling is uniform, and a non-engineer can see what is failing.

  • Linear rather than quadratic growth
  • Uniform retry and error handling
  • Visible to operations, not just engineers
  • A licence cost and a skill to maintain
  • Right once four or more systems are involved
Event-driven

Publish once, subscribe many

Chargebee publishes events; interested systems subscribe independently. Adding a consumer changes nothing upstream, which is the property that matters most as the stack grows.

  • Loosely coupled, independently deployable
  • New consumers added without upstream change
  • Every consumer must be idempotent
  • Ordering and replay must be designed for
  • Right for provisioning and product-side reactions
FlowRecommended patternWhy
CRM to billing on closed-wonPoint-to-point via the supported connector.Well-defined, vendor-maintained, and the mapping is stable across pricing changes.
Billing to CRM subscription statePoint-to-point via the same connector.One-directional, read-only at the destination, no conflict surface.
Billing to product provisioningEvent-driven.Latency matters, the logic is yours, and the consumer can evolve independently.
Product usage to billingBatch or streamed pipeline, owned by you.Volume, aggregation and late-arriving events need logic no connector provides.
Billing to ledgerConnector or scheduled batch.Accounting is periodic by nature. Real-time posting adds risk and no value.
Anything crossing three or more systemsHub and spoke.Uniform error handling and one place to change logic beats three bespoke links.
Choose per flow. A single mandated pattern across every integration is an architectural preference, not an architectural decision.
Consistency & Recovery

What to do when systems inevitably disagree

Distributed systems diverge. An architecture is judged by how quickly it notices and how cheaply it repairs, not by whether divergence ever happens.

Idempotency on every consumer

De-duplicate on event id with a retention window covering the full retry period. Chargebee retries a failed webhook with increasing delays for up to two days, up to seven times, so duplicate delivery is a design input rather than an exception.

Idempotency keys on outbound calls

Every create or charge request carries an idempotency key, so a client-side retry after a timeout cannot produce a second subscription or a second charge. A replayed request is flagged as such in the response.

Ordering by version, not arrival

Events can arrive out of order. Consumers compare a resource version or timestamp from the payload against what they already hold, rather than trusting delivery sequence.

Dead-letter queues everywhere

A message that cannot be processed goes to a queue with its payload intact and an alert attached. Acknowledging a failure to stop retries is how a week of missing events becomes a reconciliation project.

Scheduled reconciliation

A periodic comparison of subscription counts, invoice totals, MRR and state between systems, alerting on variance. This is the control that converts silent drift into a report somebody reads.

Replay as a first-class operation

Raw events stored and tooling to reprocess a time range. When something was wrong for a week, correction should be a documented operation rather than a script written under pressure at month end.

Anti-Patterns

Designs that work in staging and fail under load

Each of these is something we have been called in to unwind. They are listed with the replacement rather than just the criticism.

Anti-patternWhy it failsWhat to do instead
Bi-directional sync on a contested fieldTwo writers, no arbiter. The last write wins and both teams lose confidence in the record.One owner, one-directional flow, and a read-only copy labelled as such at the destination.
Billing logic re-implemented in the productProration and price calculation drift apart from the billing system on every pricing change.Read entitlements and prices from the billing record. Let one system own the arithmetic.
Processing the webhook synchronouslySlow downstream work causes a timeout, which causes a retry, which causes duplicate work.Store the event durably, acknowledge with a 2xx immediately, process from a queue.
Polling instead of subscribingWasteful at low frequency and still latent at high frequency, while the platform already publishes the event.Consume webhooks. Reserve polling for reconciliation sweeps, not for state propagation.
Plan names as the integration contractEvery new plan or packaging variant requires code changes in every consumer.Map against catalog concepts — entitlements, product families, item price attributes — not string identifiers.
No environment separationTesting against the live site, or a test site whose catalog has diverged from production.A test site kept structurally aligned with production, refreshed on a schedule and used for every change.
Reconciliation by exception report onlyOnly detects the failures you predicted. The expensive ones are the categories nobody anticipated.Compare totals and counts as well as exceptions, so an unexplained variance surfaces even without a known rule.
One integration owner with no documentationThe architecture leaves when the person does, and the next change is made by someone reverse-engineering it.A written ownership matrix, documented interfaces and a runbook, maintained as part of delivery.
Every anti-pattern here has a replacement that costs less over a two-year horizon, which is the timescale these decisions should be judged on.
Architecting For Scale

What changes when you add a second entity or a second product

Most subscription architectures are designed for the business as it is and quietly assume it will stay that shape. These are the four expansions that break that assumption, and what to decide in advance.

Step 01

A second legal entity

Affects invoice numbering, tax determination, the catalog and the ledger mapping all at once. Decide the entity model before go-live; retrofitting one is a rebuild rather than a configuration change.

Step 02

A second currency

Price points are per currency, and reporting has to decide whether it normalises at transaction rate or period rate. Both are defensible; only one can be the answer, and it should be written down.

Step 03

A second product line

Product families and entitlement structures have to distinguish them without duplicating the whole catalog. This is where a flat catalog design shows its age.

Step 04

Usage-based pricing added later

Introduces a pipeline, a reconciliation obligation and volatility in revenue reporting. It is the single largest architectural change most subscription businesses make after go-live.

Related Work

Architecture engagements from the same practice

Designing the ownership and consistency model across connected commercial systems is the core of Twopir's architecture work.

Case Study

Salesforce & HubSpot Integration

Two overlapping systems of record reconciled with an explicit ownership model, sync direction and conflict rules rather than a bidirectional sync on defaults.

  • Ownership matrix across two platforms
  • Sync direction and conflict resolution
  • Lifecycle stage alignment
  • Consolidated reporting view
Read the Integration Story
Case Study

Salesforce CPQ & Multi-Tool Integration

A multi-system topology designed around the quote-to-fulfilment flow, with data contracts agreed between systems before anything was built.

  • Multi-system topology design
  • Data contract definition
  • Approval and workflow routing
  • Operational reporting across systems
Read the CPQ Case Study
Case Study

Accounting Seed & Salesforce Integration

Financial and operational systems connected with reconciliation designed into the architecture rather than bolted on at close.

  • Bi-directional financial architecture
  • Reconciliation as a designed control
  • Billing automation on the CRM record
  • Reporting across ops and finance
Read the Integration Story
Why Twopir

We design the ownership model before the transport

We help growing and mid-market companies solve complex CRM, integration and business system challenges, and we design the same architectures for enterprise teams across more entities, products and markets.

The ownership matrix comes first

Before any connector is chosen, every attribute gets exactly one authoritative system. It is an unglamorous document and it is why the architectures we design are still correct two pricing models later.

We choose the pattern per flow

Point-to-point for CRM to billing, event-driven for provisioning, batch for the ledger, hub and spoke once four systems are involved. A single mandated pattern is a preference, not a decision.

We design the reconciliation as a control

Scheduled comparison of counts, totals and states with alerting, plus a replay path. Divergence is inevitable in a distributed stack; being unable to detect it is a design choice.

We architect across the CRM boundary

As a Salesforce Partner and HubSpot Partner we design and build both sides. The seam between two vendors is where most integration defects live, and the cheapest fix is to remove the seam.

We document what we design

Ownership matrix, interface contracts, failure behaviour and a runbook, maintained as part of delivery. An architecture that lives in one person's head is a dependency with a notice period.

Common Questions

Architecture questions with direct answers

No single one, which is why the question causes so much argument. Ownership is assigned per attribute and per lifecycle stage: the CRM owns commercial intent up to closed-won, Chargebee owns everything about the live subscription afterwards, the product owns usage, the ledger owns recognised revenue, and the gateway vault owns payment instruments. Trying to nominate one system as the source of truth for everything is the argument that never resolves.

For most fields, no. Bi-directional sync on a contested field is a race where the last write wins and both teams eventually stop trusting the record. The workable pattern is directional by lifecycle stage — the CRM writes to billing at closed-won, billing writes subscription state back for reporting, and the destination copy is read-only and labelled as such.

Chargebee. It is the most frequently contested attribute in this stack and the CRM usually wins the argument politically, which is the wrong outcome. The renewal date is derived from the term and the billing cycle, both of which live in billing, and a CRM edit to it does not change what the customer will actually be invoiced.

Per flow. Event-driven where latency matters and the logic is yours — provisioning, entitlement enforcement, anything the customer experiences immediately. Batch where the destination is periodic by nature, which is most accounting and ledger work: real-time posting to the GL adds operational risk and no business value. Usage pipelines are usually a hybrid, streamed in and aggregated on a schedule.

By scheduling a comparison, because nothing else will tell you. A periodic reconciliation of subscription counts, invoice totals, MRR and subscription state between systems, with alerting on variance. Compare totals and counts as well as known exception rules — exception-only reporting detects the failures you predicted and misses the expensive ones nobody anticipated.

Roughly at the fourth system. Below that, point-to-point connections and the supported connectors are cheaper and simpler. Above it, point-to-point complexity grows quadratically while hub-and-spoke grows linearly, and you also get uniform retry handling, error visibility and a place to change logic without a deployment. The licence is usually cheaper than the third bespoke integration.

At minimum: the ownership matrix, the interface contract for each flow — events consumed, calls made, failure behaviour — the idempotency strategy and its retention window, the reconciliation schedule and what it compares, and a runbook covering replay and failure recovery. Architectures that exist only in one engineer's head are dependencies with a notice period.

Next Step

Get the ownership matrix written, and most integration arguments end

We will review your current topology, produce the ownership matrix, choose the right pattern per flow and design the reconciliation — then build it across Chargebee and the CRM with one team.

Guide last reviewed September 2026 — re-verify platform specifics before relying on them