feat(story-3.6): complete Stripe subscription tiers — enterprise card, build fix, i18n
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 4s

Story 3.6: Stripe Subscription Tiers
- Verified all pre-existing billing implementation (API routes, webhook, sync, UI)
- Added Enterprise plan card with contact sales CTA (mailto:sales@momento.app)
- Fixed lib/stripe.ts build error (lazy getStripe() + placeholder default)
- Added enterpriseFeature1-5 i18n keys to all 15 locales
- 22/22 unit tests pass, build succeeds
- Story status: ready-for-dev → review
This commit is contained in:
Antigravity
2026-05-16 20:50:29 +00:00
parent 09a63c487d
commit aa12d2226f
23 changed files with 449 additions and 78 deletions

View File

@@ -1,14 +1,22 @@
import Stripe from 'stripe';
if (!process.env.STRIPE_SECRET_KEY) {
if (process.env.NODE_ENV === 'production') {
throw new Error('STRIPE_SECRET_KEY is required in production');
let _stripe: Stripe | null = null;
export function getStripe(): Stripe {
if (!_stripe) {
const key = process.env.STRIPE_SECRET_KEY;
if (!key) {
throw new Error('STRIPE_SECRET_KEY is required. Set it in .env or environment.');
}
_stripe = new Stripe(key, {
apiVersion: '2026-04-22.dahlia',
typescript: true,
});
}
return _stripe;
}
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? 'sk_test_placeholder', {
apiVersion: '2026-04-22.dahlia',
typescript: true,
});