Skip to content

[server] When deleting a team with an active usage-based subscription, also cancel the subscription #10977

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

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Jun 28, 2022

Description

  • When a team has an active usage-based subscription, but gets deleted --> automatically cancel the usage-based subscription

Related Issue(s)

Fixes #

How to test

  1. Upgrade a team to usage-based billing
  2. Notice in the Stripe dashboard your new customer with an active subscription
  3. Delete the team
  4. In the Stripe dashboard, the above customer should no longer have an active subscription

Screenshot 2022-06-28 at 17 41 00

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-payment

@gtsiolis
Copy link
Contributor

gtsiolis commented Jun 28, 2022

Thanks for adding this and bringing peace of mind, @jankeromnes!

Probably worth 🅰️ updating the team deletion modal copy for clarity or even 🅱️ sending a successful deletion message to the team owners then but we can do that in a follow up issue if this sounds good. 💡

@jankeromnes jankeromnes force-pushed the jx/cancel-deleted-team branch from 705565c to 053792c Compare June 28, 2022 15:15
@jankeromnes jankeromnes marked this pull request as ready for review June 28, 2022 15:41
@jankeromnes jankeromnes requested a review from a team June 28, 2022 15:41
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 28, 2022
@geropl geropl self-assigned this Jun 28, 2022
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, tested and works as expected. 🧘 🦸

@roboquat roboquat merged commit 1945d6c into main Jun 28, 2022
@roboquat roboquat deleted the jx/cancel-deleted-team branch June 28, 2022 16:07
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants