Remove Payments
Strip out the entire billing and subscription system.
Steps
-
Delete directories and files:
lib/payments/(payment provider abstraction)app/api/billing/(checkout, portal, subscription endpoints)app/api/webhooks/(LemonSqueezy/Polar webhook handlers)hooks/core/use-billing.ts(client-side billing hooks)app/(dashboard)/dashboard/billing/(billing settings page)
-
Update Prisma schema (
prisma/schema.prisma):- Remove the
Planenum (FREE,STARTER,PRO,ENTERPRISE) - Remove the
SubStatusenum (INACTIVE,ACTIVE,TRIALING, etc.) - Remove these fields from the
Usermodel:plan,subscriptionStatus,customerId,subscriptionId,planPeriodEnd
- Remove the
-
Clean up config:
- Delete
lib/config/pricing.ts - Remove pricing-related nav links from
siteConfiginlib/config/site.ts
- Delete
-
Remove env vars:
PAYMENT_PROVIDER,LEMONSQUEEZY_*,POLAR_* -
Run
pnpm db:pushto sync the schema.