Billing
What it is
Section titled “What it is”Billing manages subscription plans, usage metering, and trial state for each organization. Foundry offers three tiers — Crucible, Forge, and Foundry — with limits on seats, programs, and sandbox sessions per month.
Why it matters
Section titled “Why it matters”Billing controls access to platform capacity. Usage tracking ensures teams stay within their plan limits, while trial management lets new organizations evaluate the platform before committing.
Key concepts
Section titled “Key concepts”- Plan tiers:
crucible,forge,foundry— each with different limits and pricing- Plan fields:
displayName,tagline,monthlyPriceUsd,overageRateUsd, limits (maxSeats,maxPrograms,maxSessionsPerMonth), andfeatureslist
- Plan fields:
- Subscription states:
trialing,active,past_due,canceled,unpaid,incomplete,paused - Trial tracking: Sessions used vs. limit, programs used vs. limit, trial start/end, conversion status
- Usage period:
sandboxSessionCount,overageSessionCount,totalAiCostUsdper billing period - Subscription card:
SubscriptionCardshows the current plan, status, period dates, and cancel-at-period-end flag - Usage dashboard:
UsageDashboardvisualizes session usage, AI costs, and overage counts - Upgrade flow:
UpgradeFlowguides plan upgrades through Stripe - Trial banner:
TrialBannershows remaining trial sessions and conversion CTA - Plan limit banner:
PlanLimitBannerwarns when approaching or exceeding plan limits - Overage warning modal:
OverageWarningModalalerts when overage charges are accruing - Performance analytics:
PerformanceAnalyticswithLatencyPercentileCardandModelComparisonTablefor AI usage insights - Billing settings tab:
BillingSettingsTabintegrates into the Settings page
How to use it
Section titled “How to use it”- Navigate to [Program] > Settings > Billing tab.
- View the Subscription Card for current plan and status.
- Review the Usage Dashboard for session counts and AI costs.
- If approaching limits, the Plan Limit Banner or Overage Warning Modal will appear.
- Click Upgrade to move to a higher tier via the upgrade flow.
- During trial, the Trial Banner shows remaining capacity.
Data model
Section titled “Data model”This feature uses the following tables:
subscriptions— Organization subscription records with plan, status, Stripe IDstrials— Trial state per organization with usage countersusagePeriods— Per-period usage aggregation