Phase 6: Stripe Subscriptions

phase-wkq-6-stripe-subscriptions Phase

phase
Goal: Recurring $200/month billing via Stripe Subscriptions. Admin payment dashboard. Parent self-serve via Customer Portal.
Owner: Dev agent
Repo: forgejo_admin/basketball-api, forgejo_admin/westside-app
Depends on: phase-wkq-2-keycloak-auth

Scope

  • SubscriptionStatus enum, 3 Player fields (subscription_status, stripe_customer_id, stripe_subscription_id)
  • 6 subscription endpoints: setup, create, list, overview, cancel, mine
  • 4 webhook handlers: invoice.paid/failed, subscription.updated/deleted
  • Admin /admin/payments: stat cards, monthly revenue, player list with status badges, create/cancel
  • Player profile "Manage Payment" → Stripe Customer Portal

Deliverables

  • PRs: #84 (basketball-api), #35 (westside-app). Issues: #83, #34 closed.
  • 26 subscription tests, 242 total passing
  • Limitation: Hardcoded $200/month. Tiered pricing ($160/$180/$200) and split payment in Phase 14.

Provenance

Phase 9a–b from original tryout prep plan.