feat(billing): let the client request a plan, seat count and interval - #270
Merged
Merged
Conversation
openBillingCheckout sent only { plan }, so the server defaulted every purchase
to monthly at three seats. The yearly variants were unreachable from the app
even though the pricing page leads with annual prices, and a ten-person team
could not buy ten seats.
Widen BillingPlan to include business and accept optional seats and interval,
omitting each when unset so existing callers keep their current behaviour.
No UI passes these yet — the seat and interval picker lives in the web portal.
This is the plumbing that lets the app offer one.
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.
Client half of VoltiusApp/server#20.
openBillingCheckoutsent only{ plan }, so the server defaulted every purchase to monthly at three seats:BillingPlannow includesbusiness, and the function accepts optionalseatsandinterval, omitting each when unset so every existing caller keeps its current behaviour.No UI passes these yet — the seat and interval picker lives in the web portal, which already sends both. This is the plumbing that would let the app offer one; building that picker is a separate piece of work with real design choices.
Testing
Five new tests, the first coverage this module has had:
tsc --noEmitexit 0.Order of deployment
This is inert without the server change.
interval: "yearly"reaches a server that still ignores it until VoltiusApp/server#20 ships, andplan: "business"returns 400 until then and until a Business variant exists.