What this layer controls
- Recurring billing, dunning and involuntary churn
- Points, tiers and redemption economics
- Who is at risk, and what happens to them
- Whether the programme is net-positive after rewards cost
What it looks like when it is wrong
These are the symptoms that show up in a marketing report or a Monday meeting. Each one has a technical cause in this layer, and each is cheaper to fix before it has a quarter of history behind it.
- Churn is reported monthly with no cohort view
- Involuntary churn from failed cards is not separated from voluntary churn
- Points liability is not on any balance sheet
- Win-back emails go to customers who already returned
- Nobody can say what the programme costs per retained customer
An open-source stack for this layer
Every project below is open source and self-hostable, with the licence the project publishes today. This is a reference build, not a recommendation to run all of it: pick the layers your stack is missing.
| Layer | Project | Licence | What it does |
|---|---|---|---|
| Subscriptions | WooCommerce Subscriptions (or platform-native) | GPL-3.0 | Recurring orders, dunning and status transitions. |
| Billing engine | Stripe Billing API | API terms | Recurring invoices and retry logic when the card fails. |
| Cohorts | dbt-core + warehouse | Apache-2.0 | Cohort retention and churn-reason models, with tests. |
| Lifecycle | Mautic | GPL-3.0 | Win-back and at-risk journeys driven by cohort membership. |
| Loyalty | Your own points ledger | n/a | An append-only ledger beats a plugin option row when you need to audit liability. |
Evaluation checklist
Answer each of these about your current stack. A ‘no’ is a work item, and the count is a fair summary of the layer’s health.
- Is churn split into voluntary and involuntary?
- Does dunning retry on a schedule with a real card-update flow?
- Is points liability measurable and reported?
- Are win-back audiences excluded once they return?
- Is programme ROI computed net of rewards, not gross?
- Does every retention message have a measured incremental effect?
What to instrument
Numbers that make the layer’s health visible before a customer complains.
- Cohort retention at 30/90/365 days
- Involuntary churn share
- Repeat purchase rate
- Programme cost per retained customer
Where this fits
Scope. This page describes the category and an open-source way to build it. It does not publish 5 Kings’ internal method, client data or vendor terms, and it is not an endorsement of every project listed: check the licence and the maintenance activity against your own constraints before you adopt one.