Skip to content

feat: Implement Stripe billing with Free and Pro subscription plans - #3

Merged
AlecKriebel merged 1 commit into
mainfrom
task/dc67475b-set-up-stripe-billing-with-sub
Jan 28, 2026
Merged

feat: Implement Stripe billing with Free and Pro subscription plans#3
AlecKriebel merged 1 commit into
mainfrom
task/dc67475b-set-up-stripe-billing-with-sub

Conversation

@AlecKriebel

Copy link
Copy Markdown
Contributor

Summary

  • Implement complete Stripe billing system with two subscription tiers
  • Free plan: 1 calendar, 1 destination, daily sync, 30-day history
  • Pro plan ($8/month): Unlimited calendars, unlimited destinations, 15-minute sync, unlimited history, priority support
  • Full webhook handling for subscription lifecycle events (created, updated, cancelled, payment_failed)
  • Feature gating based on subscription status
  • Updated billing page UI with usage stats and upgrade flow
  • Updated pricing page and landing page with accurate plan information

Changes

Backend

  • Updated Plan enum from FREE/PAID to FREE/PRO with comprehensive limits module (packages/shared/src/types/plan.ts)
  • Added database fields for subscription tracking: stripe_subscription_id, stripe_current_period_end on orgs table
  • Enhanced Stripe webhook handler to handle full subscription lifecycle:
    • customer.subscription.created - New subscription provisioning
    • customer.subscription.updated - Plan changes and renewals
    • customer.subscription.deleted - Downgrade to Free
    • invoice.payment_succeeded - Successful payment tracking
    • invoice.payment_failed - Payment failure notifications
  • Created plan-gating.ts utility for feature access checks

Frontend

  • Updated billing page UI (org-billing-form.tsx) to show:
    • Current plan with badge and features list
    • Usage stats with progress bars (calendars, destinations)
    • Sync frequency and priority support status
    • Upgrade CTA for Free users
  • Updated pricing page with Free/Pro comparison and FAQ
  • Updated landing page pricing section to reflect $8/month Pro plan

Database Migration

New migration 0002_confused_lionheart.sql adds:

  • stripe_subscription_id column to orgs table
  • stripe_current_period_end column to orgs table
  • Unique index on stripe_subscription_id

Test plan

  • Verify typecheck passes: yarn workspace web tsc --noEmit
  • Apply database migration in staging
  • Test Free to Pro upgrade flow via Stripe Checkout
  • Test Pro subscription management via Stripe Portal
  • Verify webhook events update org plan correctly
  • Verify billing page displays correct usage stats
  • Verify feature gating limits work as expected

Follow-ups

  • Actual calendar/destination count queries will need to be implemented once those tables exist
  • Email templates for upgrade/downgrade notifications may need design review

Generated with Claude Code

- Add two subscription tiers: Free (1 calendar, 1 destination, daily sync) and Pro ($8/month with unlimited calendars, unlimited destinations, 15-min sync, priority support)
- Update Plan enum from FREE/PAID to FREE/PRO with comprehensive plan limits module
- Add database fields for tracking subscription (stripe_subscription_id, stripe_current_period_end)
- Enhance Stripe webhook handler to handle full subscription lifecycle (created, updated, deleted, payment_succeeded, payment_failed)
- Create plan-gating utility for checking feature access based on subscription
- Update billing page UI to show current plan, usage stats, and upgrade CTA
- Update pricing page with accurate Free and Pro plan features
- Update landing page pricing section to reflect $8/month Pro plan

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Jan 28, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@AlecKriebel
AlecKriebel merged commit 1d4ceb8 into main Jan 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant