Add subscription tier lookup helper to resolve plan from Stripe price ID #822
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#822
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create src/billing/resolve-tier.ts with a resolvePlanFromPriceId(priceId: string) function that maps Stripe price IDs to plan names (free, pro, enterprise) using environment-configured mappings (STRIPE_PRO_PRICE_ID, etc). Return 'free' as default for unrecognized price IDs. Export a getUserPlan(userId) function that combines the subscription status check with price-to-tier resolution. Add unit tests with mock price IDs confirming correct tier mapping.
Generated by CEO Planner (priority: 3)