Linking Chargebee as a source

The Chargebee connector syncs your billing data – customers, subscriptions, invoices, events, and more – into PostHog, so you can analyze revenue and billing activity alongside your product data.

Prerequisites

You need a Chargebee account and a read-only API key. We recommend creating a dedicated read-only key for this integration.

Adding a data source

  1. In PostHog, go to the Sources tab of the data pipeline section.
  2. Click + New source and click Link next to this source.
  3. Enter your credentials (see Configuration below) and click Next.
  4. Select the tables you want to sync, choose a sync method and frequency, then click Import.

Once the syncs are complete, you can start querying this data in PostHog.

When linking Chargebee, you'll need:

  • API key – in your Chargebee dashboard, go to Settings > Configure Chargebee > API keys, then click + Add API Key and select Read-Only Key. Copy the value of the newly created key.
  • Site name (subdomain) – found in the top-left of your dashboard. It's the same as the subdomain of your dashboard (the part before .chargebee.com).

Sync modes

Each table can be synced in one of several modes, depending on what the source supports:

  • Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
  • Incremental – only new or updated rows are synced on each run, using a cursor field (such as an updated_at timestamp). Cheaper than a full refresh, but deletes aren't captured.
  • Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
  • Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.

See sync methods for a full explanation of how each mode works and how to choose between them.

Configuration

OptionTypeRequired
API keypasswordYes
Site name (subdomain)textYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
Customers

A Chargebee customer, who owns subscriptions, invoices, and payment methods.

Incremental, Full refreshupdated_at
Events

An event recording a change in Chargebee (subscription created, payment failed, etc.).

Incremental, Full refreshoccurred_at
Invoices

A statement of charges issued to a customer for subscriptions or one-off items.

Incremental, Full refreshupdated_at
Orders

An order created from an invoice to fulfill physical or digital goods.

Incremental, Full refreshupdated_at
Subscriptions

A customer's recurring billing arrangement against one or more plans.

Incremental, Full refreshupdated_at
Transactions

A record of money movement — a payment, refund, or credit applied to a customer.

Incremental, Full refreshupdated_at

Troubleshooting

If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.

Community questions

Was this page useful?

Questions about this page? or post a community question.