Skip to content

Conversation

amorask-bitwarden
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-26780

📔 Objective

There's a red herring here that we can't update a subscription when that subscription has trial_settings.end_behavior.missing_payment_method set to "cancel", because our remarkably over-complicated subscription update process temporarily changes the subscription to send_invoice, which is not allowed.

However, the real problem here is the fact the end behavior was set to "cancel" in the first place as this should only ever be used for subscriptions that do not have a payment method.

The issue was the HasPaymentMethodQuery I introduced in a previous PR to determine the end behavior is fetching the organization's attached Stripe Customer. However, in the OrganizationBillingService.Finalize method, that Customer hasn't been attached yet.

This PR moves the attachment of the Customer to the Organization sooner in the Finalize process to resolve the issue.

📸 Screenshots

Screen.Recording.2025-10-10.at.9.21.14.AM.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@amorask-bitwarden amorask-bitwarden requested a review from a team as a code owner October 10, 2025 14:31
Copy link
Contributor

github-actions bot commented Oct 10, 2025

Logo
Checkmarx One – Scan Summary & Details0b14534f-b0b9-4055-b44d-2eda666863b4

Great job! No new security vulnerabilities introduced in this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants