Files
formbricks/packages/database/migration
Johannes 8e30564103 refactor: simplify Stripe integration and rename enterprise to custom
BREAKING CHANGES:
- Remove SCALE plan from PROJECT_FEATURE_KEYS enum
- Rename PROJECT_FEATURE_KEYS.ENTERPRISE to PROJECT_FEATURE_KEYS.CUSTOM
- Update trial period from 30 to 15 days
- Remove invoice.finalized and subscription.created/updated webhook handlers

FEATURES:
- Hardcode billing limits instead of syncing from Stripe metadata
- Simplify checkout handler to always use hardcoded Startup plan limits
- Simplify subscription creation flow (single code path)
- Create database migration to rename existing enterprise plans to custom

REMOVED:
- subscription-created-or-updated.ts (125 lines of complex metadata parsing)
- invoice-finalized.ts (no longer needed)

FILES CHANGED:
- Remove SCALE plan from constants and billing limits
- Update type definitions to use custom instead of enterprise
- Simplify webhook handlers (4 → 2 handlers)
- Update all UI components to reference custom plan
- Create database migration for plan renaming
- Update all tests to reference custom instead of enterprise

IMPACT:
- Reduces Stripe integration complexity by ~80%
- Eliminates metadata sync failures
- Makes billing more predictable and maintainable
- Aligns code naming with UI (custom vs enterprise)
- Reduces trial period from 30 to 15 days

Refs: #simplify-stripe-integration
2025-10-20 18:55:22 +02:00
..