A little rough but seems to work, feedback appreciated: GitHub - liliakai/discourse-chargebee
After installing, generate an api key in Discourse for the system user and configure a webhook in Chargebee that points at
The intended use case is a paywalled Discourse instance using Chargebee as a third party billing service. Hence, the following event handlers:
When a customer is created, they are invited to Discourse. If they accept the invitation, their chargebee customer id is associated with the resulting Discourse user. This is handled by storing
chargebee_id on the invite and then cloning it over to the resulting User in an
When a subscription is cancelled, the corresponding Discourse User is suspended.
When a subscription is reactivated, the corresponding Discourse User is unsuspended.