Repository navigation
fix: send canonical offers for sponsored billing - #567
Merged
Merged
Conversation
Sponsored seat controls submitted monthly to endpoints that require canonical catalogue offers. Send the standard monthly offer to both quote and checkout, and share the typed offer contract with personal billing. Pin both request values in the panel test so a display term cannot silently become an invalid API offer again. Signed-off-by: Maxerns <maksafk@gmail.com>
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues remain, and regression coverage verifies both requests.
0 open findings
What changed in this PR
Fixes sponsored billing by sending canonical catalogue offers to quote and checkout endpoints.
Changes:
- Uses
standard_monthlyfor sponsored billing requests. - Shares the
BillingOffertype across billing APIs. - Adds regression tests for both requests.
| File | Description |
|---|---|
web/src/TeamPanel.tsx |
Sends the canonical sponsored offer. |
web/src/api.ts |
Defines and applies the shared BillingOffer type. |
web/src/__tests__/TeamPanel.test.tsx |
Verifies canonical offers reach both requests. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Why
The sponsored seat form sent
monthlyto both billing quote and checkout endpoints. The server only accepts canonical catalogue offers, so the sponsored journey was rejected before checkout.What Changed
standard_monthlyto quote and checkout.BillingOffertype across personal and sponsored API calls, so display terms cannot be passed as server offers.monthly, and passes with the canonical value.This does not add founding-price selection or reserve founding places. That remains separate work requiring the shared personal and sponsored capacity ledger.
Validation
git diff --checkpassed.npm run build:wasmandnpm run typecheckpassed.TeamPanel.test.tsx: 27 tests passed.