MCPcopy Index your code
hub / github.com/simstudioai/sim / getPlanByPriceId

Function getPlanByPriceId

apps/sim/lib/billing/plans.ts:105–110  ·  view source on GitHub ↗
(priceId: string)

Source from the content-addressed store, hash-verified

103 * Matches against both monthly (`priceId`) and annual (`annualDiscountPriceId`) prices.
104 */
105export function getPlanByPriceId(priceId: string): BillingPlan | undefined {
106 if (!priceId) return undefined
107 return getPlans().find(
108 (plan) => plan.priceId === priceId || plan.annualDiscountPriceId === priceId
109 )
110}
111
112/**
113 * Get plan limits for a given plan name

Callers 1

Calls 1

getPlansFunction · 0.85

Tested by

no test coverage detected