Skip to content

Chargebee

Chargebee is a subscription billing and revenue management platform that handles recurring billing, invoicing, payments, and subscription lifecycle management.

URI format

The URI format for Chargebee is as follows:

plaintext
chargebee://<site>?api_key=<api-key-here>

URI parameters:

  • site: your Chargebee site name (the subdomain in https://<site>.chargebee.com).
  • api_key: the Chargebee API key used for authentication.

Chargebee authenticates with HTTP Basic Auth using the API key. You can create an API key in the Chargebee dashboard under Settings > Configure Chargebee > API Keys. See the Chargebee API reference for more details.

Here's a sample command that copies Chargebee customers into a DuckDB database:

sh
ingestr ingest \
  --source-uri 'chargebee://acme-test?api_key=test_xxx' \
  --source-table 'customers' \
  --dest-uri duckdb:///chargebee.duckdb \
  --dest-table 'dest.customers'

Tables

Chargebee source allows ingesting the following resources:

TablePKInc KeyInc StrategyDetails
customersidupdated_atmergeCustomer records, including billing details, contact info, and custom fields.
subscriptionsidupdated_atmergeRecurring subscriptions, including status, billing cycle, and subscription items.
invoicesidupdated_atmergeInvoices generated for subscriptions and one-off charges, including line items and amounts.
transactionsidupdated_atmergePayment, refund, and credit transactions linked to invoices.
ordersidupdated_atmergeOrders generated for invoices, including fulfillment status and shipping details.
eventsidoccurred_atmergeActivity events such as subscription and customer changes, useful for change-style ingestion.

Use these exact names as the --source-table parameter in the ingestr ingest command.

sh
ingestr ingest \
  --source-uri 'chargebee://acme-test?api_key=test_xxx' \
  --source-table 'subscriptions' \
  --dest-uri duckdb:///chargebee.duckdb \
  --dest-table 'dest.subscriptions' \
  --interval-start '2024-01-01' \
  --interval-end '2024-01-31'