Problem
The web admin dashboard subscription routes hardcode two Stripe price IDs (STRIPE_UNLIMITED_MONTHLY_PRICE_ID, STRIPE_UNLIMITED_ANNUAL_PRICE_ID). All other products are invisible to the dashboard.
Missing products (5 of 7)
- Omi Unlimited v2
- Operator
- Omi Architect
- Omi Plus
- Neo
- Enterprise
Affected routes
| Route |
Impact |
revenue/route.ts |
MRR/ARR undercounted — only sums 2 price IDs |
subscriptions/route.ts |
Subscription count misses 5 products |
mrr-trends/route.ts |
Historical MRR trend chart undercounts |
subscription-trends/route.ts |
New subscription trend misses 5 products |
profitability/route.ts |
Per-platform MRR and conversion undercounted |
app-subscriptions/route.ts |
Subs from missing products leak into "non-Omi" bucket |
Status filter too narrow
revenue and subscriptions routes query only status: 'active'. Standard SaaS MRR should include active + past_due (Stripe is still retrying payment; subscription is intact). trialing should be excluded from MRR but shown separately.
Root cause
Code was written when Omi had one product (Unlimited monthly + annual). As new products launched, these routes were never updated.
Correct approach
- Query all subscriptions without price-ID filtering (
stripe.subscriptions.list with status: 'active' and status: 'past_due')
- Group by product using
item.price.product — no hardcoded product IDs
- Compute MRR per product: monthly as-is, annual ÷ 12 (detect via
price.recurring.interval)
- Show trialing subscriptions as a separate pipeline metric, not in MRR
- New products added to Stripe appear automatically — no env var or code change needed
by AI for @beastoin
Problem
The web admin dashboard subscription routes hardcode two Stripe price IDs (
STRIPE_UNLIMITED_MONTHLY_PRICE_ID,STRIPE_UNLIMITED_ANNUAL_PRICE_ID). All other products are invisible to the dashboard.Missing products (5 of 7)
Affected routes
revenue/route.tssubscriptions/route.tsmrr-trends/route.tssubscription-trends/route.tsprofitability/route.tsapp-subscriptions/route.tsStatus filter too narrow
revenueandsubscriptionsroutes query onlystatus: 'active'. Standard SaaS MRR should includeactive+past_due(Stripe is still retrying payment; subscription is intact).trialingshould be excluded from MRR but shown separately.Root cause
Code was written when Omi had one product (Unlimited monthly + annual). As new products launched, these routes were never updated.
Correct approach
stripe.subscriptions.listwithstatus: 'active'andstatus: 'past_due')item.price.product— no hardcoded product IDsprice.recurring.interval)by AI for @beastoin