feat(billing): add comprehensive usage-based billing system#625
feat(billing): add comprehensive usage-based billing system#625waleedlatif1 merged 13 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
✅ No security or compliance issues detected. Reviewed everything up to 637ba6c. Security Overview
Detected Code ChangesThe diff is too large to display a summary of code changes. Reply to this PR with |
4c3b848 to
0ee243e
Compare
6a58bb2 to
3b41de9
Compare
- Complete billing infrastructure with subscription management - Usage tracking and limits for organizations - Team management with role-based permissions - CRON jobs for automated billing and cleanup - Stripe integration for payments and invoicing - Email notifications for billing events - Organization-based workspace management - API endpoints for billing operations
There was a problem hiding this comment.
PR Summary
Major overhaul implementing a comprehensive usage-based billing system with Stripe integration, team management, and automated billing processes.
- Consolidated billing architecture in
lib/billing/with usage tracking, subscription management, and automated CRON jobs for period-based billing - Introduced organization-level management with
stores/organization/store.tsproviding workspace access control and member limit management - Added team-focused billing UI components including
TeamSeatsOverviewandUsageLimitEditorfor granular control over member usage limits - Implemented secure Stripe webhooks in
api/billing/webhooks/stripe/route.tsfor handling payment events with proper signature verification - Removed legacy waitlist system including email templates and API routes in favor of direct subscription management
100 files reviewed, 57 comments
Edit PR Review Bot Settings | Greptile
...pp/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/settings-modal.tsx
Show resolved
Hide resolved
...nts/sidebar/components/settings-modal/components/settings-navigation/settings-navigation.tsx
Outdated
Show resolved
Hide resolved
...r/components/settings-modal/components/team-management/components/member-invitation-card.tsx
Outdated
Show resolved
Hide resolved
...ar/components/settings-modal/components/subscription/components/edit-member-limit-dialog.tsx
Show resolved
Hide resolved
|
@waleedlatif1 We don't have a way to cancel subscriptions?
Upgrades: Usually immediate with proration (charge difference immediately) |
3b41de9 to
5b2ecc4
Compare
…ai/sim into feat/usage-based-billing-clean
3f38d4a to
44237c4
Compare
…oai#625) * feat(billing): add comprehensive usage-based billing system - Complete billing infrastructure with subscription management - Usage tracking and limits for organizations - Team management with role-based permissions - CRON jobs for automated billing and cleanup - Stripe integration for payments and invoicing - Email notifications for billing events - Organization-based workspace management - API endpoints for billing operations * fix tests, standardize datetime logic * add lazy init for stripe client, similar to s3 * cleanup * ack PR comments * fixed build * convert everything to UTC * add delete subscription functionality using better auth * fix lint * fix linter error * remove invoice emails since it is natively managed via stripe * fix build --------- Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
Description
Added usage based billing, where users can adjust their own limits and the billing is handled automatically at the end of the billing period via CRON.
Type of change
How Has This Been Tested?
Tested purchasing a team subscription manually, and inviting people to the team and adjusting their limits.
Checklist:
bun run test)Security Considerations: