MCPcopy
hub / github.com/simstudioai/sim / getPlanTierCredits

Function getPlanTierCredits

apps/sim/lib/billing/plan-helpers.ts:65–72  ·  view source on GitHub ↗
(plan: string | null | undefined)

Source from the content-addressed store, hash-verified

63 * `'pro'` => 4000 credits ($20 at 1:200), `'team'` => 8000 credits ($40 at 1:200).
64 */
65export function getPlanTierCredits(plan: string | null | undefined): number {
66 if (!plan) return 0
67 const match = plan.match(/_(\d+)$/)
68 if (match) return Number.parseInt(match[1], 10)
69 if (plan === 'pro') return 4000
70 if (plan === 'team') return 8000
71 return 0
72}
73
74/**
75 * Get the dollar value of a plan's credit tier.

Callers 13

resolvePlanTierFunction · 0.90
isInboxEntitledPlanFunction · 0.90
hasLiveSyncAccessFunction · 0.90
mapToTeamPlanNameFunction · 0.90
getPerUserMinimumLimitFunction · 0.90
getPlanPricingFunction · 0.90
BillingFunction · 0.90
useUpgradeStateFunction · 0.90
isMaxFunction · 0.85
getPlanTierDollarsFunction · 0.85
getPlanTypeForLimitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected