-
Notifications
You must be signed in to change notification settings - Fork 524
Add plan cancellation and re-subscription functionality #6826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add plan cancellation and re-subscription functionality #6826
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
a944510
to
a759921
Compare
...ashboard/src/components/settings/Account/Billing/re-subscribe-button/re-subscribe-button.tsx
Outdated
Show resolved
Hide resolved
a759921
to
50b5dd0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6826 +/- ##
=======================================
Coverage 55.18% 55.18%
=======================================
Files 896 896
Lines 56953 56953
Branches 3946 3946
=======================================
Hits 31429 31429
Misses 25428 25428
Partials 96 96
🚀 New features to boost your workflow:
|
...ard/src/components/settings/Account/Billing/renew-subscription/renew-subscription-button.tsx
Outdated
Show resolved
Hide resolved
size-limit report 📦
|
50b5dd0
to
6961ea4
Compare
6961ea4
to
9b45b42
Compare
9b45b42
to
23297a7
Compare
23297a7
to
259f17a
Compare
259f17a
to
b722df1
Compare
TL;DR
Added functionality to cancel and renew subscriptions through Stripe, replacing the previous in-app cancellation flow.
What changed?
getPlanCancelUrl
: Generates a Stripe URL for cancellationreSubscribePlan
: Reactivates a canceled subscriptionRenewSubscriptionButton
component for reactivating canceled subscriptionsCancelPlanButton
to redirect to Stripe for cancellation instead of using the previous in-app formplanCancellationDate
field to the Team model to track scheduled cancellationsHow to test?
Why make this change?
This change improves the subscription management flow by:
PR-Codex overview
This PR focuses on enhancing the billing and subscription management features in the application. It introduces new functionalities for plan cancellation and renewal, updates the data structure to manage cancellation dates, and refines the UI components related to billing.
Detailed summary
planCancellationDate
to relevant data structures.tryCatch
utility for improved error handling in async functions.RenewSubscriptionButton
for renewing subscriptions.getPlanCancelUrl
andreSubscribePlan
actions in billing.PlanInfoCard
to display cancellation status and renewal options.cancelPlan
methods and logic in favor of new implementations.