Skip to content

[UBP] Add getStripePortalUrl method to server #12864

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 2 commits into from
Sep 12, 2022
Merged

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Sep 12, 2022

Description

Add a new getStripePortalUrl method to server's JSON-RPC API.

The method generates a Stripe portal URL that is used during the billing signup flow for both teams and individual users - it replaces the existing getStripePortalUrlForTeam method which only worked for team signup.

Related Issue(s)

Part of #12685

How to test

  1. Create a team called Gitpod-xxx
  2. Sign the team up for UBP.
  3. Create a new Stripe customer for your individual user:
await window._gp.gitpodService.server.createOrUpdateStripeCustomerForUser("EUR")
  1. Get the portal URL for the user:
await window._gp.gitpodService.server.getStripePortalUrl("user:<your user id>")

Using the returned URL should take you to some Stripe UI.

Release Notes

NONE

Documentation

Werft options:

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

@andrew-farries andrew-farries requested a review from a team September 12, 2022 10:06
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 12, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-get-stripe-portal-url.2 because the annotations in the pull request description changed
(with .werft/ from main)

@jankeromnes jankeromnes self-assigned this Sep 12, 2022
Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks for the helpful test instructions! 🙏

This change looks good and works as advertized, except for the return_url (please see inline). The other comments are optional.

/hold

Andrew Farries added 2 commits September 12, 2022 14:41
Implement the method in terms of the more general `getStripePortalUrl`.
@andrew-farries andrew-farries force-pushed the af/get-stripe-portal-url branch from 2afa34c to bb512cf Compare September 12, 2022 14:41
@andrew-farries
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 12bb47c into main Sep 12, 2022
@roboquat roboquat deleted the af/get-stripe-portal-url branch September 12, 2022 14:59
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 13, 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