Add PlatformAdmin controller + service for comp plan grants

FeatureBillingService
Shipped
April 20, 2026 at 7:43 PM UTC
Author
Kamo
Commit
620164f

- PlatformAdminController at /api/billing/platform (class-level @PlatformAdminOnly) - GET /orgs, GET /orgs/{orgId} - POST /orgs/{orgId}/grants, PATCH|DELETE /orgs/{orgId}/grants/{subId} - GET /plans (includes isPublic=false) - GET /events - PlatformAdminService: grant creates COMP SubscriptionRecord, cancels prior active sub, emits SubscriptionEvent **************** 5s idempotency - @PlatformAdminOnly + HandlerInterceptor: allow god-mode-active OR (TeamMember.isOrganizationOwner AND Organization.isTopLevel, re-read from DB) - SubscriptionRenewalScheduler: COMP branch cancels on expiry (COMP_EXPIRED) and never calls Stripe - BillingAdminService: MRR/ARR aggregation excludes paymentMethod=COMP - Long ids exposed as String (CockroachDB unique_rowid precision)

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing