KamoCRM

Add PlatformAdmin controller + service for comp plan grants

FeatureBillingService
Shipped
20 ஏப்ரல், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing