A membership is a bundle of prepaid entitlements the customer pays for upfront and consumes over a fixed period. Unlike a single gift card or a single package, a membership is itemised: it lists exactly which services and products are included, in what quantity, at what retail value. That itemisation is what lets the clinic answer the only question that matters at renewal time: did this membership actually make us money?
For staff#
Selling a membership#
- Open Sales → + New sale → Membership.
- Pick the plan and the period (3, 6, or 12 months are typical).
- Review the selected membership's configured coverage, discount, validity, and session limit with the patient.
- Take payment through an enabled method; automatic payment-link sending and installment charging are not supplied by this form.
- When the invoice is paid, the membership card activates immediately. The buyer sees it in their account, and the patient profile shows the active card on the Memberships tab.
Using a membership at a visit#
- The patient books a covered service. Reception (or the patient portal) marks the booking as "use my membership."
- The provider delivers the service and marks the session Done.
- The system records the visit against the card: one entitlement consumed, the share of the paid amount moves from liability to revenue, and the cost of what was actually delivered (provider time, materials) lands on the books as cost of service.
- The patient sees the remaining balance on their Memberships tab. Reception can see it on the patient profile.
Automatic discount on paid invoices#
Some memberships do not consume sessions — they grant a
discount tier on any future invoice. When reception
adds a line item to a new invoice for the patient, the system
checks whether the patient holds an active membership whose
bundled products include that line's product. If yes, the
line silently gets linked to the membership, the
membership-discount property kicks in, and
Invoice.total_amount already reflects the discount
before the invoice is even saved. Reception sees the discount
as a separate line in the invoice summary; no manual selection
is needed.
- The most-recent active membership wins when a customer holds overlapping tiers — protects against accidentally locking in an older tier's discount after an upgrade.
- If reception explicitly passes a different membership on the line (rare — usually only in backfills), that explicit choice always wins.
- The discount is recomputed every time a line is added or quantity changes, so a freshly added line after a mid-invoice membership upgrade picks up the new tier.
The membership is finished#
- If everything was used inside the period, the card is marked Fully consumed.
- If the period ends with unused entitlements, the card expires. Anything still unrecognised on the books moves to breakage revenue on the day of expiry.
- The card stays on the patient profile as history, never disappears.
For clinic managers#
Designing a membership that pays#
Two numbers decide whether a membership works:
- Bundle discount. The face value of the included services and products versus what the customer pays. A 10 to 25 percent bundle discount is normal; deeper cuts the margin too quickly.
- Expected utilization. If you sell unlimited consultations for six months, expect somewhere between 40 and 70 percent of the theoretical maximum. The renewal rate is the leading signal that the offer is priced right.
Reading the P&L report#
The Memberships P&L report shows one row per sold card with these columns:
- Paid amount. What the customer paid for the card.
- Recognised revenue. The share that has actually been earned as the customer used the card.
- Recognised COGS. The cost of what was actually delivered (provider time, materials, retail goods consumed).
- Gross margin. Recognised revenue minus recognised COGS.
- Utilization %. Recognised revenue divided by paid amount. The early warning for churn.
- Breakage revenue. After expiry, the unused portion.
A row with negative gross margin and high utilization means the membership is underpriced. A row with low utilization at month 3 of a 6-month card means the customer is not coming in; a phone call from CRM is in order.
For admins#
Configuring entitlements#
Each membership is a digital product in the catalog. Inside it, you list entitlements: which product or service is included, how many of them, and at what retail unit value. The retail unit value is what drives the revenue split when a visit happens. If a membership includes 4 physio sessions worth 200 AED each and 200 AED of retail credit, a single physio session recognises 200 / 1000 of the paid amount as revenue.
- Set included quantity to 0 for an unlimited entitlement. The cap then becomes the membership period itself.
- Multiple entitlements are normal. Mix services, retail credit, and percentage discounts in the same card.
- Entitlements snapshot onto the card at activation. Editing the entitlements in the catalog later affects only future sales; cards already sold keep what the customer agreed to.
Accounts on the books#
- At sale: cash debits, Membership Liability (215000) credits, VAT Output (212000) credits the tax.
- At consumption: Membership Liability debits, Service Revenue (per product) credits, COGS debits, Inventory or Service Materials credits.
- At expiry of unused balance: Membership Liability debits, Breakage Revenue (415000) credits.
If the tenant has not seeded the new accounts, the system falls back to Package Liability (213000) for the sale, and the reversal accounts follow the same fallback so the books always balance.
The per-entitlement revenue split#
Each consumption posts the share of the paid amount that corresponds to the entitlement actually used. The formula is:
recognised_revenue = paid_amount × (entitlement_unit_value × consumed_qty / Σ entitlement_value)
The values are read from the entitlement snapshot frozen at activation, never from the live catalog. So if a Bronze card includes 4 physio at 200 AED each and 200 AED of retail credit, the total entitlement value is 1000 AED. A single physio session covers 200 / 1000 of the paid amount and recognises that share as revenue. Editing the catalog later does not retroactively rewrite revenue math on cards that are already sold.
Breakage on expiry#
The nightly sweep_expired_memberships task scans for active licenses whose expiration_date has passed. For each one it computes breakage = paid_amount − Σ recognised_revenue, flips the license to Expired, and emits products.membership.expired.v2. The accounting listener posts the breakage pair: Membership Liability (215000) → Breakage Revenue (415000). The post is refused (and the license stays Expired without a GL entry) if there is no resolvable purchasing branch on the license, so the tenant always knows where to look.
Settings that affect the workflow#
- Subscription duration on the digital product. 3, 6, 12 months are typical.
- Auto-renew. A flag on the license that has no engine wired today. Leaving it on does not cause anything to happen at expiry. Treat it as a placeholder until the recurring-billing engine ships. To renew a member today, reception manually rings the patient, takes payment via the normal sale flow, and the new invoice activates a fresh license.
- Visit coverage. Check the patient's eligible active membership through the visit membership action; do not assume a booking-priority setting creates automatic scheduling priority.
- Membership consumption permission. Required to apply a membership to an invoice line; defaults to reception roles.
Where we are today#
The membership consumption and accounting plumbing is live. When a session covered by a membership is marked Done, the membership consumes one entitlement, the per-entitlement share of the paid amount recognises as revenue, and the matching COGS posts. The nightly breakage sweep flips overdue licenses to Expired and posts the unused portion to breakage revenue. The roadmap items still open:
- The Memberships P&L report on the frontend (the data is there, the page is not).
- Recurring billing (card-on-file, auto-charge, retry cycle). Today auto-renew is a flag, not an engine. See "When a renewal payment fails" below.
- Family sharing and dependant model.
- Tier upgrade and downgrade with mid-period pro-ration.
When a renewal payment fails, the manual fallback#
If a patient's card was on file with an external provider and the recurring charge failed, the clinic finds out at the next visit when the license shows Expired. The manual re-sale workflow:
- Reception sees the expired license on the patient's Memberships tab.
- Take payment as a normal sale and pick the same membership SKU.
- The new invoice activates a new license with a fresh entitlement snapshot.
- Escalate any proposed date exception to the administrator and finance; there is no standard staff goodwill-extension action in the membership sale form.
Both a package and a membership cover this service#
If a patient holds both a sales package and an active membership that cover the same service, the system does not auto-pick. The operator chooses at booking time which line the session bills against. Rule of thumb: pick the one that expires sooner. It is the one that becomes breakage if unused.
Common questions#
- "We refunded a session, then re-delivered it. Did the membership consume twice?" Yes, and that is intentional.
consume_membership_entitlementdeliberately does not idempotency-guard the second consume because a refund-and-re-deliver is a legitimate scenario. The refund event reverses the first consumption's revenue split before the second one fires, so the books balance. - "Why is the entitlement frozen at activation?" Because the revenue-split formula reads from
entitlement_snapshoton the license, not from the live catalog. Editing the catalog after a sale is normal (you might rename a service, fix a unit value, add a new entitlement for next month's sales). The snapshot keeps already-sold cards consistent with what the customer agreed to.
Related#
- Sales packages for the bundle-of-credits pattern.
- Gift cards for the prepaid stored-value pattern.
- Accounting posting from sales for the GL details.
