# Billing Production Deployment Checklist

Last verified: March 6, 2026

## Code Quality

- [x] TypeScript compilation passes (`pnpm typecheck`).
- [x] ESLint passes (`pnpm lint`).
- [ ] Repo-wide Prettier baseline resolved (`pnpm format:check` still reports existing issues outside the billing change set).
- [x] Billing, subscription, and search tests pass (`pnpm test -- billing`, `pnpm test -- subscription`, `pnpm test -- search`).
- [ ] Playwright billing navigation smoke test passes with a refreshed local auth state (`pnpm exec playwright test e2e/billing-navigation.spec.ts`).
- [x] Storybook states exist for the billing settings experience.

## Stripe Configuration

- [ ] Production Stripe keys are configured in Vercel.
- [ ] `STRIPE_WEBHOOK_SECRET` is configured in Vercel.
- [ ] Production webhook endpoint points to `https://stratofusion.vercel.app/api/webhooks/stripe`.
- [ ] Price IDs are configured for Free, Pro, and Unlimited tiers.
- [ ] Production checkout flow is tested end-to-end.
- [ ] Trial checkout flow is tested end-to-end in Stripe live mode before rollout.
- [ ] Production billing portal flow is tested end-to-end.

## UI and UX Verification

- [x] Settings menu shows the billing entry point.
- [x] Tier badge renders in the billing menu item.
- [x] Search mode gating shows inline upgrade prompts.
- [x] Upgrade prompts route to `/user/billing`.
- [x] Billing page shows current plan details.
- [x] Payment method details render when Stripe returns a default card.
- [x] Billing portal actions are available for subscribed users.
- [ ] Header trial status link and billing countdown are verified for trialing users.
- [ ] Mobile billing flow is verified on a physical device or responsive viewport pass.

## Documentation

- [x] `README.md` updated.
- [x] `public/docs/SUBSCRIPTION_MANAGEMENT.md` updated.
- [x] `public/docs/BILLING_UI.md` updated.
- [x] `public/docs/INDEX.md` updated.
- [x] `public/docs/DEVELOPER_ONBOARDING.md` updated.
- [x] Billing navigation E2E spec added at `e2e/billing-navigation.spec.ts`.

## Monitoring

- [ ] Sentry captures billing checkout and portal failures.
- [ ] Stripe webhook logs are monitored after deployment.
- [ ] Checkout conversion is tracked.
- [ ] Billing portal usage is tracked.
