Skip to content

Subscriptions & Plans

Subscriptions link a Member to a SubscriptionPlan and track billing periods, renewal behavior, and lifecycle status.

Subscription Plans

A SubscriptionPlan defines the terms of a membership offering:

FieldDescription
NameDisplay name (e.g., "Full Member")
CodeUnique identifier (e.g., FULL)
MonthlyPriceBase monthly price
QuarterlyPriceOptional quarterly discount price
AnnualPriceOptional annual discount price
IsActiveWhether new subscriptions can use this plan
BenefitsList of PlanBenefit items describing what is included

Billing Periods

CodeDescription
monthlyBilled each month
quarterlyBilled every 3 months
annualBilled once per year

Subscription Lifecycle

Creation

Subscriptions are created during enrollment (POST /api/members/enroll) or directly via POST /api/members/{id}/subscriptions. The system computes StartedAt, EndsAt based on billing period, and stores the price at time of creation.

Statuses

StatusCodeMeaning
ActiveactiveSubscription is current and valid
ExpiredexpiredEnd date has passed with no renewal
CanceledcanceledExplicitly terminated by staff or member

Renewal

Subscriptions with AutoRenew = true are processed nightly by ProcessAutoRenewalsJob. The job:

  1. Finds active subscriptions expiring within 24 hours with AutoRenew = true
  2. Creates a new subscription starting at the current end date
  3. Sends a renewal confirmation notification
  4. Updates the member status back to active if needed

Expiry Reminders

CheckExpiringSubscriptionsJob runs daily and sends renewal reminder emails to members whose subscriptions expire within the next 7 days.

Manual Operations

OperationEndpointPermission
View subscriptionGET /api/members/{id}/subscriptionssubscriptions:read
Change planPOST /api/members/{id}/subscriptions/{sid}/change-plansubscriptions:change_plan
RenewPOST /api/members/{id}/subscriptions/{sid}/renewsubscriptions:renew
CancelPOST /api/members/{id}/subscriptions/{sid}/cancelsubscriptions:cancel

Plan Management

MethodPathPermissionDescription
GET/api/plansplans:readList all plans
POST/api/plansplans:writeCreate a new plan
GET/api/plans/{id}plans:readGet plan details
PUT/api/plans/{id}plans:writeUpdate plan
DELETE/api/plans/{id}plans:deleteDeactivate plan

Business Rules

  • A plan cannot be deleted if it has active subscriptions — it can only be deactivated (new signups disabled).
  • Price changes on a plan do not retroactively affect existing subscriptions. The price is captured at subscription creation time.
  • Changing a subscription's plan (change-plan) cancels the current subscription and creates a new one with the new plan, prorating when configured.

Frontend Routes

RouteViewPermission
/club/plansPlansViewplans:read
/club/plans/newPlanCreateViewplans:write
/club/plans/:idPlanDetailViewplans:read
/club/members/:id/subscriptionMemberSubscriptionViewsubscriptions:read