Multitenant Billing
Billing for tenants, independent of any payment provider: plans and their quotas, the provider hook that adapters implement (checkout links, webhooks, renewals, cancellations, refunds), applying a subscription's plan to an account, and a reconcile job that compares accounts with the provider.
Runs on: tenants (level 4). Providers are separate extensions, e.g. tenant-billing-ls for Lemon Squeezy.
Build it. Nothing is published here yet. PocketHost's own billing (in its legacy Node mothership) is split between this extension and the Lemon Squeezy adapter. See Create your own extension.
Install · Configure · Use · Integrations · Example
Install
Not available yet: Multitenant Billing isn't in pocketone and has no Go module to add to a custom build.
Configure
Nothing to configure yet. Plans and their quotas will be set here when it ships.
Use
Nothing to use yet. It is planned to apply each subscription's plan to its account and to check accounts against the payment provider on a schedule.
Integrations
It is planned to run on tenants. Payment providers plug in through its provider hook as separate extensions; tenant-billing-ls is the Lemon Squeezy one.
Example
No example yet; it will come with the extension.
License
MIT
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.