Skip to content

basalt / dashboard/src / computeBillingMetrics

Function: computeBillingMetrics() ​

> computeBillingMetrics(subscriptions, plans): BillingMetrics

Defined in: dashboard/src/metrics.ts:33

Computes billing metrics from a snapshot of subscriptions and the plan catalog. MRR counts only active subscriptions with a numeric price; trials and custom-priced plans contribute 0 (they are not recurring revenue yet).

Parameters ​

subscriptions ​

SubscriptionRecord[]

plans ​

Record<string, PlanDefinition>

Returns ​

BillingMetrics

Released under the MIT License.