chargebee
Python wrapper for the Chargebee Subscription Billing API
What it is and what it does
Chargebee is the official Python client for Chargebee's subscription billing platform. It wraps the Chargebee REST API, allowing developers to manage customers, subscriptions, invoices, and other billing entities directly from Python code. The library supports both synchronous and asynchronous HTTP operations via httpx, with configurable timeouts, retry logic, and idempotency keys for safe request retries.
The SDK provides typed request and response objects, resource-specific and global enums, custom field support, and filtering for list operations. It includes built-in retry handling for transient errors (5xx status codes) with exponential backoff, rate-limit awareness via Retry-After headers, and methods to wait for long-running operations like exports and time-travel requests to complete.
Use it for:
- Build a SaaS platform that manages customer subscriptions, billing cycles, and payment methods through Chargebee.
- Automate customer creation, plan changes, and invoice management in a subscription-based business.
- Integrate Chargebee billing data into internal dashboards or reporting systems via async API calls.
- Handle idempotent payment operations safely by using idempotency keys to prevent duplicate charges.
- Export large customer or transaction datasets and wait for completion before processing results.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python client library for integrating with the Chargebee subscription billing API, supporting both synchronous and asynchronous HTTP requests.
Yes. The library is actively maintained, has low install friction, requires only httpx as a dependency, and is the official client for Chargebee's API. It supports modern Python (3.11+) and offers both sync and async patterns. No known vulnerabilities. License treatment is unclear, so verify licensing terms with your legal team before use in commercial projects.
Install
chargebee on PyPI
pip
pip install chargebeeuv
uv add chargebeepoetry
poetry add chargebeeInstalling chargebee
Before you install
Low install friction with a single runtime dependency (httpx). Actively maintained with a release 15 days ago. Requires Python 3.11 or later.
Quickstart
pip install chargebee
from chargebee import Chargebee
cb_client = Chargebee(api_key="your_api_key", site="your_site")
response = cb_client.Customer.create(
cb_client.Customer.CreateParams(first_name="John", email="john@test.com")
)
print(response.customer)
Requires Python 3.11 or later; API key and site name from Chargebee account required to initialize client.
Verify before relying
- Whether the library's async support is production-ready or still experimental beyond version 3.9.0
- Scope and stability of custom field support across different Chargebee account configurations
- Rate limiting behavior and retry defaults when retry logic is disabled
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — httpx |
| Maintenance | actively maintained — 15 days since the last release |
| First released | |
| Downloads | 1,065,312/month — #4,416 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: chargebee-3.27.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
beanstreamProvides a Python client library for the…
permissive · top 15,000 on PyPI
orb-billingA Python client library for the Orb billing…
permissive · top 5,000 on PyPI
mixpanelOfficial Python library for server-side…
permissive · top 5,000 on PyPI
recurlyOfficial Python client library for Recurly's V3…
unclear · top 15,000 on PyPI
minfraudPython client library for MaxMind's minFraud…
permissive · top 15,000 on PyPI
stripeProvides Python bindings to the Stripe API,…
permissive · top 1,000 on PyPI
looker-sdkProvides a Python client library for…
permissive · top 5,000 on PyPI
taxjarPython client library for the TaxJar Sales Tax…
permissive · top 15,000 on PyPI
stigg-sidecar-sdkPython SDK for interacting with Stigg Sidecar,…
unclear · top 15,000 on PyPI
razorpayPython client library for the Razorpay payment…
permissive · top 5,000 on PyPI