Beta. The Chargebee connector is built and tested against Chargebee's documented webhook events. It has not yet run against a live Chargebee site in production. Try it on a test site first.
Chargebee
Connect Chargebee so its subscriptions grant and end CashSDK entitlements and its payments, renewals and refunds land in one revenue view.
Chargebee handles subscription billing, dunning, and revenue operations at scale, with quoting, proration, and tax integrations for teams with complex pricing. Connect it to CashSDK and RevOps keeps its billing engine while your app reads one entitlement model, and Chargebee's payments land in a single revenue view.
CashSDK maps each Chargebee subscription to an entitlement by its first item price (or plan). Add-ons are not mapped on their own. Revenue is the invoice total Chargebee reports for each payment.
How it works#
Connect Chargebee from your app's Marketplace page with an API key, your site name and a webhook username and password.
Each Chargebee item price (or plan) ID matches a CashSDK product and the entitlement it unlocks.
Successful payments and renewals become revenue, a refunded payment comes off by its amount, and subscription events grant and end access.
Connect Chargebee#
In Chargebee, go to Settings → Configure Chargebee → API Keys and create a read-only key. Copy it.
In the dashboard, open your app's Marketplace page, choose Chargebee
and select Connect. Pick Sandbox for a test site or Production for
your live site. Enter the key, your site name (acme-test), and a username and
password for the webhook's Basic authentication. Credentials are stored
encrypted at rest.
Copy the connection's webhook URL from the Connected list and add it in
Chargebee under Settings → Configure Chargebee → Webhooks with the same
Basic authentication username and password. Send payment_succeeded,
payment_refunded and the subscription events: subscription_created,
subscription_activated, subscription_changed, subscription_renewed,
subscription_cancelled, subscription_reactivated, subscription_paused
and subscription_resumed.
Back in CashSDK, select Activate on the connection.
Map your catalog#
Payments for prices your app does not sell are skipped, so for each Chargebee item
price create a product in CashSDK whose identifier is the
item price ID (or the plan ID on Chargebee's older catalog) and attach the
entitlement it unlocks. To point an ID at an existing
product instead, map it with map_marketplace_catalog
(prompt setup).
- A subscription grants access while Chargebee reports it
active,in_trialornon_renewing. Anon_renewingsubscription keeps access until its term ends. Any other status ends it. - A refunded payment comes off your revenue, a partial refund only by its amount. A refund of the whole payment also ends the access that payment gave.
Who gets access#
Set cashsdk_user_id in the subscription's meta_data, or in a custom field named
cf_cashsdk_user_id. CashSDK reads it from the subscription events and remembers
it for that subscription. Without it, the Chargebee customer ID stands in for the
user. Link it to the right user with the link_marketplace_user tool on the
MCP server.
Test and go live#
With a Sandbox connection to your Chargebee test site, create a test subscription. Confirm the payment appears under Transactions and the entitlement is granted to your test user.
Add a Production connection with your live site's key, its own webhook and credentials. Your CashSDK publishable key does not change.