Skip to content
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

When creating a new Stripe customer, also create a Usage-Based Subscription for them #10630

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Jun 13, 2022

Description

When creating a new Stripe customer, also create a new Usage-Based Subscription for them.

Related Issue(s)

Last step to fully implement #10326

How to test

  1. Create a team called "Gitpod" (or "Gitpod1", "Gitpod2", etc. -- first one that's not already taken)
  2. Go to Team Settings > Team Billing
  3. Wait for the Usage-Based Billing UI to show up
  4. Upgrade to Usage-Based by adding a credit card (e.g. 4242 4242 4242 4242, 4/24, 424)
  5. Once upgraded, click on "Manage Billing"
  6. The Stripe Portal should show an active Subscription (linked to the Stripe Product "Gitpod Usage (with free tier)")

Screenshot 2022-06-13 at 17 56 45

Release Notes

NONE

Documentation

  • /werft with-payment=true

@jankeromnes jankeromnes changed the title When creating a new Stripe customer, also create a new Usage-Based Subscription for them When creating a new Stripe customer, also create a Usage-Based Subscription for them Jun 13, 2022
@jankeromnes jankeromnes marked this pull request as ready for review June 13, 2022 16:03
@jankeromnes jankeromnes requested a review from a team June 13, 2022 16:03
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 13, 2022
Copy link
Contributor

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

👍 The test worked and created a new customer in Stripe with a subscription.

The UI embedded on the Gitpod side went through a slightly confusing transition where it went back to a 'not enabled' state after putting in card details, before transitioning to the 'manage billing' UI.

Comment on lines +119 to +123
// FIXME(janx): Use configmap.
const prices = {
EUR: "price_1LAE0AGadRXm50o3xjegX0Kd",
USD: "price_1LAE0AGadRXm50o3rKoktPiJ",
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you create an issue for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! #10655

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Jun 14, 2022

Many thanks @andrew-farries! This completes the UI part of the "creating invoices for the Gitpod team" milestone. 🏁

The UI embedded on the Gitpod side went through a slightly confusing transition where it went back to a 'not enabled' state after putting in card details, before transitioning to the 'manage billing' UI.

Ah, good catch. I've just filed this follow-up issue: #10656

@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 16, 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/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants