Rewrite BillingService onto Account-based entities

RefactorBillingService
Shipped
April 27, 2026 at 10:36 PM UTC
Author
Kamo
Commit
c984b72

The BillingService is now Account-centric. Member-driven flows (e.g. "add a card", "subscribe to a plan") now go through an Account that auto-creates for the member when one doesn't yet exist; the Account holds Stripe customer id, one or more cards, subscriptions, licenses, invoices, and a billing config. Renamed/replaced services: - BillingGroupService -> AccountBillingService - BillingGroupMemberService -> AccountBillingMemberService - BillingGroupSubscriptionService -> AccountSubscriptionService - **************** -> AccountPaymentMethodService - BillingGroupInvoiceService -> AccountInvoiceService - LicenseService (rebalanceGroup -> rebalanceAccount) - StripeCustomerManager (operates on Account) - StripeWebhookService (Account-scoped webhook handlers) - PlatformAdminService (rolls up by Account, not by Group) Renamed/replaced controllers: - BillingGroupController -> AccountBillingController Endpoints now mounted at **************** AccountUid is a Long (CockroachDB int64) carried as path variable; payment method primary marker renamed from "default" to "primary". Renamed/replaced DTOs: - BillingGroupDto -> AccountBillingDto - BillingGroupMemberDto -> AccountBillingMemberDto - BillingGroupLicenseDto -> AccountLicenseDto - BillingGroupSubscriptionDto -> AccountSubscriptionDto - BillingGroupRequests -> AccountBillingRequests - PlatformGroupSummary -> PlatformAccountSummary EntitlementInvalidator: invalidateGroup(UUID) replaced by invalidateAccount(Long); pub/sub payload changed from "GROUP:{uuid}" to "ACCOUNT:{accountUid}". Removed: every BillingGroup* file in this service.

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