feat: add stripe webhooks incomplete
Description
Related Issues
Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Release
- [ ] Refactor
- [ ] Other (please describe):
Testing
Screenshots (if applicable)
Additional Notes
[!IMPORTANT] Add Stripe webhook handling for subscription events and refactor subscription management in the database and models.
- Stripe Webhooks:
- Add
handleCheckoutSessionCompletedandhandleSubscriptionDeletedinstripe.tsto handlecheckout.session.completedandcustomer.subscription.deletedevents.- Update
POSTfunction inroute.tsto use new handlers.- Database Schema:
- Add
plans,prices, andsubscriptionstables insubscription.ts.- Add
usageRecordstable inusage.ts.- Update
userstable relations inuser.tsto include subscriptions.- Models and Enums:
- Add
SubscriptionPlansenum insubscription/index.ts.- Remove
UsagePlanTypeand related interfaces fromusage/index.ts.- Refactoring:
- Move default creation functions from
utility/src/defaultstodb/src/defaults.- Update imports in various files to reflect new paths and names.
- API Routers:
- Add
subscriptionRouterinrouters/subscription.tsfor user plan queries.- Update
root.tsto includesubscriptionRouter.This description was created by
for 49521877c15bd12a553711a3b07bc026fe273921. You can customize this summary. It will automatically update as commits are pushed.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 7:48pm |
| web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2025 7:48pm |
This pull request has been ignored for the connected project wowaemfasoptxrdjhilu because there are no changes detected in apps/backend/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.
Preview Branches by Supabase. Learn more about Supabase Branching ↗︎.