Repository navigation
feat(billing): let custom-plan orgs pick a catalog plan - #7862
Merged
Merged
Conversation
pedrofrxncx
enabled auto-merge (squash)
October 9, 2026 19:28
Orgs on the contract (custom) plan saw only "Contact us to change it". They now get the normal plan catalog and Stripe checkout; flagged (invoice_upgrade) orgs also get "Add to my invoice", no longer gated on having spent their AI usage. ai_service keeps the contact card.
pedrofrxncx
force-pushed
the
feat/custom-plan-self-serve
branch
from
October 9, 2026 21:43
f7f2b28 to
c83e7b8
Compare
decocms Bot
pushed a commit
that referenced
this pull request
Oct 9, 2026
PR: #7862 feat(billing): let custom-plan orgs pick a catalog plan Bump type: minor - decocms (apps/api/package.json): 4.463.4 -> 4.464.0 - @decocms/native (apps/native/package.json): 4.463.4 -> 4.464.0 Deploy-Scope: both
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 is this contribution about?
Orgs on the contract (
custom) plan saw only "Your plan: Custom. Contact us to change it." in Settings → Plans, with no way to move to a catalog plan themselves.invoice_upgrade(and without a live Stripe subscription) also get "Add to my invoice" on Starter/Business.AI_PLAN_INVOICE_UPGRADEno longer requires the AI usage to be exhausted; the flag is the gate. This relaxes the rule added in feat(billing): add to my invoice — contract orgs upgrade at their AI limit #7761 and applies to any flagged org.ai_service: deco's own plan keeps the contact card. Paywalls now quote the next plan up for custom orgs instead of a bare lock.settings.plans.limitReachedstring is removed.No ai-gateway change needed: Stripe checkout and the webhook move the org through the gateway's admin plan route, which already accepts
custom→starter/businessand drops the contract's allowance override on the way out.How did you verify your code works?
bun test apps/api/src/tools/ai-providers/plan-change.test.ts: 7 pass (the test asserting the old usage-exhausted refusal was removed).oxlint, andknippass.src/mcp-clients/lazy-client.ts:205; the same error reproduces onorigin/mainwithout this change.Screenshots/Demonstration
Not captured yet.
How to Test
customplan through the gateway admin API.invoice_upgradefeature override to that org: "Add to my invoice" appears on Starter/Business, and confirming moves the org to that plan.Review Checklist
Summary by cubic
Orgs on the contract (
custom) plan used to see only "Your plan: Custom. Contact us to change it." in Settings → Plans. They now see the full plan catalog and can move to a catalog plan themselves: subscribing through Stripe checkout, or — when flaggedinvoice_upgrade— adding the plan to their deco invoice. Only deco's ownai_serviceplan keeps the contact card.invoice_upgradeflag;AI_PLAN_INVOICE_UPGRADEno longer requires exhausted AI usage.settings.plans.limitReachedstring is removed.Written for commit c83e7b8. Summary will update on new commits.