feat: billing tab for platform#16755
Merged
ThyMinimalDev merged 12 commits intomainfrom Sep 23, 2024
Merged
Conversation
… stripe and shift all webhooks logic into services
…webhooks logic from billing controller
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add platform team as reviewer" took an action on this PR • (09/23/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (09/23/24)1 label was added to this PR based on Keith Williams's automation. |
PeerRich
approved these changes
Sep 23, 2024
Contributor
E2E results are ready! |
Contributor
|
checking that everything is working before merge |
ThyMinimalDev
approved these changes
Sep 23, 2024
Contributor
ThyMinimalDev
left a comment
There was a problem hiding this comment.
LGTM, some refactor to do in follow up pr
| @@ -43,12 +49,9 @@ export class BillingService implements OnModuleDestroy { | |||
|
|
|||
| async createSubscriptionForTeam(teamId: number, plan: PlatformPlan) { | |||
Contributor
There was a problem hiding this comment.
in follow up pr, let's refactor this in 2 different functions doing only one thing
- createTeamBilling, which just returns the customerId or the whole platforBillingEntity
- redirectToSubscribeCheckout, which returns the url
Comment on lines
+71
to
72
| const { action, url } = await this.billingService.createSubscriptionForTeam(teamId, input.plan); | ||
|
|
Contributor
There was a problem hiding this comment.
in a follow up pr call the two newly created functions one after the other
const customerId = await createTeamBilling
const url = await redirectToSubscribeCheckout(customerId)
...
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Screen.Recording.2024-09-23.at.12.13.01.PM.mov
Screen.Recording.2024-09-23.at.12.20.19.PM.mov
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
This can be tested in the web app, go to
/settings/platformand click the billing tab and try to upgrade or downgrade your plans or update billing info.