Add subscription billing with free trial and plan limits
Step 6:
- Plans in a database table (prices in sen); 14-day free trial for
every new account.
- Stripe subscriptions behind a SubscriptionGateway interface:
subscribe, switch plan, cancel at period end, undo.
- Billing page with usage meters and plan cards; sidebar link; trial
notice on the dashboard.
- Limits enforced for stores, regenerations and AI edits. With no plan,
AI, new stores and publishing are refused and live stores go offline.
- The Stripe webhook also keeps subscriptions in step.
Tests: 164 pass (14 new). Verified with a real Stripe test
subscription: subscribe, cancel, undo.
Add cart, Stripe checkout, orders and order confirmation email
Step 4 part 2:
- Session cart per store with stock limits and self-correction.
- Checkout: shopper details, order snapshot, Stripe hosted payment page
behind a PaymentGateway interface, return-page and webhook confirmation.
- Orders tab for the merchant and a confirmation email in the store language.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>