[PM-33894] Schedule price increases#7293
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
…nd add failure logging
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7293 +/- ##
==========================================
+ Coverage 57.84% 57.87% +0.02%
==========================================
Files 2043 2043
Lines 89879 90002 +123
Branches 7989 8000 +11
==========================================
+ Hits 51992 52090 +98
- Misses 36029 36050 +21
- Partials 1858 1862 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Overall Assessment: APPROVE This PR introduces deferred price migration via Stripe subscription schedules for both Premium users and Families organizations, gated behind the Code Review DetailsNo findings to report. The implementation is well-structured with appropriate error handling, idempotency guards, and feature flag gating. |
|




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-33894
📔 Objective
Modifies
UpcomingInvoiceHandlerto defer subscription price changes to the renewal date using Stripe subscription schedules, gated behind thePM32645_DeferPriceMigrationToRenewalfeature flag. This fixes MRR distortion caused by the current behavior of updating subscription prices immediately wheninvoice.upcomingfires (~15 days before renewal).When the flag is enabled, both the Premium user and Families organization paths now:
When the flag is disabled, existing
UpdateSubscriptionbehavior is preserved.Also migrates
UpcomingInvoiceHandlerfrom the legacyIStripeFacadetoIStripeAdapterand addsSubscriptionScheduleStatusandSubscriptionScheduleEndBehaviorconstants toStripeConstants.