[PR #384] [MERGED] feat: add Stripe free tier subscription #929

Closed
opened 2026-02-26 19:31:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/384
Author: @dguyen
Created: 9/18/2023
Status: Merged
Merged: 10/14/2023
Merged by: @Mythie

Base: feat/refreshHead: feat/stripe-free-tier


📝 Commits (8)

  • 773566f feat: add free tier Stripe subscription
  • 027a588 feat: wip
  • de9116e Merge branch 'feat/refresh' into feat/stripe-free-tier
  • cbe118b fix: merge issues
  • 4d48594 fix: stripe customer fetch logic
  • 01e6367 Merge branch 'feat/refresh' into feat/stripe-free-tier
  • 4d5275f fix: create custom pricing table
  • ede9eb0 fix: named exports

📊 Changes

19 files changed (+532 additions, -53 deletions)

View changed files

📝 .env.example (+1 -0)
📝 apps/marketing/process-env.d.ts (+1 -0)
📝 apps/web/process-env.d.ts (+1 -0)
apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx (+133 -0)
apps/web/src/app/(dashboard)/settings/billing/billing-portal-button.tsx (+55 -0)
apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts (+48 -0)
apps/web/src/app/(dashboard)/settings/billing/create-checkout.action.ts (+59 -0)
📝 apps/web/src/app/(dashboard)/settings/billing/page.tsx (+63 -43)
📝 apps/web/src/pages/api/stripe/webhook/index.ts (+40 -0)
packages/ee/server-only/stripe/get-checkout-session.ts (+31 -0)
packages/ee/server-only/stripe/get-customer.ts (+19 -0)
packages/ee/server-only/stripe/get-prices-by-interval.ts (+40 -0)
📝 packages/lib/server-only/stripe/index.ts (+1 -0)
packages/lib/server-only/stripe/stripe.d.ts (+7 -0)
packages/lib/universal/stripe/to-human-price.ts (+3 -0)
packages/prisma/migrations/20230918111438_update_subscription_constraints_and_columns/migration.sql (+17 -0)
📝 packages/prisma/schema.prisma (+10 -9)
📝 packages/tsconfig/process-env.d.ts (+1 -0)
📝 turbo.json (+2 -1)

📄 Description

Added support for Stripe 'Free Plan' subscriptions.

Changes:

  • Users will be automatically subscribed to a free plan prior to visiting the Stripe billing page if possible
  • Added handler for Stripe webhooks to handle updating Subscriptions

Summary by CodeRabbit

  • New Feature: Integrated Stripe for subscription management, allowing users to view and manage their subscriptions directly from the dashboard.
  • New Feature: Added a 'Billing Plans' component to display available subscription plans and their features.
  • New Feature: Introduced a 'Billing Portal Button' for easy access to the Stripe billing portal.
  • Improvement: Enhanced the 'Billing Settings Page' with updated logic for subscription status and product display.
  • Improvement: Added a 'cancelAtPeriodEnd' field to the subscription model to track subscription end dates.
  • Improvement: Implemented unique user ID constraints in the subscription model for better data integrity.
  • Improvement: Updated the 'Button' component to allow direct use of the 'loading' prop.

These updates provide a more streamlined and user-friendly subscription management experience.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/384 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 9/18/2023 **Status:** ✅ Merged **Merged:** 10/14/2023 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `feat/refresh` ← **Head:** `feat/stripe-free-tier` --- ### 📝 Commits (8) - [`773566f`](https://github.com/documenso/documenso/commit/773566f19384921b98f720fb8222a87f17d87a20) feat: add free tier Stripe subscription - [`027a588`](https://github.com/documenso/documenso/commit/027a588604504f4a1b4bb4ed7b26f1dc1db72c6b) feat: wip - [`de9116e`](https://github.com/documenso/documenso/commit/de9116e9b2e7d0c0c095c14c7291d5e96b93077f) Merge branch 'feat/refresh' into feat/stripe-free-tier - [`cbe118b`](https://github.com/documenso/documenso/commit/cbe118b74fb4bbf42a27c57744f97f6a9c62b875) fix: merge issues - [`4d48594`](https://github.com/documenso/documenso/commit/4d485940eaa01ac93d7fb49d508806af588182d3) fix: stripe customer fetch logic - [`01e6367`](https://github.com/documenso/documenso/commit/01e6367b72b8f858324c445d455024f76cffc55f) Merge branch 'feat/refresh' into feat/stripe-free-tier - [`4d5275f`](https://github.com/documenso/documenso/commit/4d5275f915a2a6391cfccd0c57779519efd094ab) fix: create custom pricing table - [`ede9eb0`](https://github.com/documenso/documenso/commit/ede9eb052dd4fc96ea90dac983c0484110dc9feb) fix: named exports ### 📊 Changes **19 files changed** (+532 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+1 -0) 📝 `apps/marketing/process-env.d.ts` (+1 -0) 📝 `apps/web/process-env.d.ts` (+1 -0) ➕ `apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx` (+133 -0) ➕ `apps/web/src/app/(dashboard)/settings/billing/billing-portal-button.tsx` (+55 -0) ➕ `apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts` (+48 -0) ➕ `apps/web/src/app/(dashboard)/settings/billing/create-checkout.action.ts` (+59 -0) 📝 `apps/web/src/app/(dashboard)/settings/billing/page.tsx` (+63 -43) 📝 `apps/web/src/pages/api/stripe/webhook/index.ts` (+40 -0) ➕ `packages/ee/server-only/stripe/get-checkout-session.ts` (+31 -0) ➕ `packages/ee/server-only/stripe/get-customer.ts` (+19 -0) ➕ `packages/ee/server-only/stripe/get-prices-by-interval.ts` (+40 -0) 📝 `packages/lib/server-only/stripe/index.ts` (+1 -0) ➕ `packages/lib/server-only/stripe/stripe.d.ts` (+7 -0) ➕ `packages/lib/universal/stripe/to-human-price.ts` (+3 -0) ➕ `packages/prisma/migrations/20230918111438_update_subscription_constraints_and_columns/migration.sql` (+17 -0) 📝 `packages/prisma/schema.prisma` (+10 -9) 📝 `packages/tsconfig/process-env.d.ts` (+1 -0) 📝 `turbo.json` (+2 -1) </details> ### 📄 Description Added support for Stripe 'Free Plan' subscriptions. Changes: - Users will be automatically subscribed to a free plan prior to visiting the Stripe billing page if possible - Added handler for Stripe webhooks to handle updating Subscriptions <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ### Summary by CodeRabbit - New Feature: Integrated Stripe for subscription management, allowing users to view and manage their subscriptions directly from the dashboard. - New Feature: Added a 'Billing Plans' component to display available subscription plans and their features. - New Feature: Introduced a 'Billing Portal Button' for easy access to the Stripe billing portal. - Improvement: Enhanced the 'Billing Settings Page' with updated logic for subscription status and product display. - Improvement: Added a 'cancelAtPeriodEnd' field to the subscription model to track subscription end dates. - Improvement: Implemented unique user ID constraints in the subscription model for better data integrity. - Improvement: Updated the 'Button' component to allow direct use of the 'loading' prop. These updates provide a more streamlined and user-friendly subscription management experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:31:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#929
No description provided.