Skip to content

docs(billing): add overage spending limit page and references [show] - #876

Open
pmallol wants to merge 8 commits into
mainfrom
paula/tree-1270-spending-limit-docs
Open

pmallol wants to merge 8 commits into
mainfrom
paula/tree-1270-spending-limit-docs

Conversation

@pmallol

@pmallol pmallol commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Affected Components

  • Content & Marketing
  • Pricing
  • Test
  • Docs
  • Learn
  • Other

Notes for the Reviewer

Docs for the overage spending limit (TREE-1270).

  • New page admin/spending-limit. It tells what the limit covers (overage dollars, check runs only), what stops at the limit, the emails, yearly plans, who can see and change it, and the API, CLI and MCP Server.
  • Updated pages: admin/usage, admin/team-management/permissions, cli/checkly-account, ai/mcp-server/tools and ai/mcp-server/security-and-permissions.
  • Name: the page uses the UI name "Overage spending limit", and says that the CLI, API and MCP Server call it the "spending cap". The final name from TREE-1248 can change this in a later PR.
  • I checked each statement on a dev machine against the code: 99 black-box specs, the public API calls, CLI 10.4.0 and a checkly test run at the limit.
  • Screenshots at 1280 for each changed section and at 375 for the new page. The top of cli/checkly-account shows 0 px changed. No dark mode capture: the local preview kept the light theme.

Screenshots

Before is main, after is this branch (80a5a587), from a local mint dev server.

State Before After
New page Overage spending limit, 1280 New after New page Overage spending limit, 1280
New page Overage spending limit, 375 New after New page Overage spending limit, 375
Usage: Overage and Usage emails, 1280 before Usage: Overage and Usage emails, 1280 after Usage: Overage and Usage emails, 1280
Permissions: Billing, 1280 before Permissions: Billing, 1280 after Permissions: Billing, 1280
CLI: checkly account spending-cap, 1280 before CLI: checkly account spending-cap, 1280 after CLI: checkly account spending-cap, 1280
MCP Server tools: Billing tools, 1280 before MCP Server tools: Billing tools, 1280 after MCP Server tools: Billing tools, 1280
MCP Server security: scopes and role checks, 1280 before MCP Server security: scopes and role checks, 1280 after MCP Server security: scopes and role checks, 1280
CLI: checkly account, top of page, 1280 (0 px changed) before CLI: checkly account, top of page, 1280 after CLI: checkly account, top of page, 1280

No UX flow change: docs pages only, no interaction to show

@mintlify

mintlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
checkly-422f444a 🟢 Ready View Preview Nov 26, 2026, 12:43 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@pmallol
pmallol force-pushed the paula/tree-1270-spending-limit-docs branch from 4075dcf to ca62696 Compare November 25, 2026 13:22
@pmallol pmallol changed the title docs(billing): add overage spending limit page and references docs(billing): add overage spending limit page and references [show] Nov 25, 2026

@hlenke hlenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs changes · The page is accurate almost everywhere I checked it against the source. Three sentences need a fix before merge: who sees the paused banner, when a CLI test session is rejected, and which plans can hold a limit on the MCP tools page.

Merge readiness

  • CI passes (static-docs-checks, preview-checks, docs-gate, link-rot, vale-spellcheck, Mintlify Deployment). GitHub reports the PR as mergeable, and main has not touched any of the changed files since the merge base.
  • The new page is in docs.json (after Usage) and sitemap.xml. pr_impact.py found nothing: no broken links or anchors. Every anchor the page links to exists (/admin/usage#overage, #what-counts-as-a-check-run, #usage-emails, /admin/team-management/permissions#billing and #usage, /ai/mcp-server/tools#billing-tools, /cli/checkly-account#checkly-account-spending-cap), and so does /api-reference/billing/get-the-spending-cap.
  • Overlap: #849 (Errors pages) also edits admin/team-management/permissions.mdx, ai/mcp-server/tools.mdx and ai/mcp-server/security-and-permissions.mdx, in other sections. #849 targets docs-agent, so this PR can land first; #849 then rebases.

Not about one line

  • Important: on accounts with the new billing page, usage has moved to its own Usage tab and the limit stays on Plan & invoices (the webapp's billing settings test this). admin/usage.mdx L57-60 still describes a Usage card on the one billing page. The PR already removes the sentence about the missing graph and past periods there, so please check the whole bullet against the current page while you are at it.
  • Optional: Agentic checks never stop at the limit (the run gate only covers API, Multistep, Browser and Playwright). The page lists uptime and heartbeat monitors as the ones that keep running; one more word there would answer the question for Agentic checks too.

Inline: 0 blockers, 3 important, 1 wording.

What I checked
  • Every changed line of the 12 files (diff from merge base 618661a), and the four screenshots (light versions viewed: labels match the app, the account shown is a demo name, no emails).
  • gh pr checks 876, gh pr view 876, git log 618661a..origin/main on the touched files, pr_impact.py, open PRs touching the same files.
  • Monorepo main (4edd992a05), described in my own words:
    • Public API route and controller for /v1/billing/spending-cap: GET needs billing:read + usage:read, PUT needs billing:update; legacy account keys rejected; 409 for plans that cannot hold a cap; spendingCapCents from 0 to 1,000,000 or null.
    • The run gate: only API, Multistep, Browser and Playwright types stop, each pool only once its included runs are used up and the limit is reached. The scheduler and web app runs use the same gate; the test session gate rejects a session when any of its runs is a stopped type, with the exact message the page quotes.
    • Limit states: close at 80%, none for a $0 limit. Usage email ladder for Starter and Team: 50%, 80%, 100% of included runs, then close to the limit and limit reached, to billing managers, once per period; limit-change emails grouped after 5 quiet minutes; the ~30-day re-send on yearly plans; yearly overage invoiced at Stripe's $300 threshold and early when the limit is reached.
    • MCP tools get-spending-cap, set-spending-cap, remove-spending-cap: permissions, 0 to 10000 dollars with 2 decimals, confirmation, idempotent no-ops, the overage left out without usage:read; scopes checkly:billing:read and checkly:billing:write.
    • Webapp strings: Billing & usage, Plan & invoices, Overage spending limit, Edit, Maximum overage, Set limit, Set Unlimited, 3. Set your limits, the paused banner texts and Increase limit. The limit card shows only with usage:read.
    • Role snapshot: billing:read for every built-in role, usage:read and billing:update for Owner and Admin only. Invoices need billing:read + usage:read.
  • No end-to-end test: the limit needs a Starter or Team account with Stripe billing and measured overage, which local Checkly does not have. I did not start the app.
  • Could not verify: whether the OVERAGE_SPENDING_LIMIT feature flag is on for every Starter and Team account in production. The limit card, the banner and the new email steps (50% and 80%) depend on it. "Checks can take up to several minutes to stop" and "start again within minutes" match the UI copy, but I did not time them.

Comment thread admin/spending-limit.mdx Resolved
Comment thread admin/spending-limit.mdx Resolved
Comment thread ai/mcp-server/tools.mdx Resolved
Comment thread admin/usage.mdx Resolved

@hlenke hlenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs changes · One sentence on the MCP tools page promises more than the tools return: the note doesn't say which of the two cases applies. Fix that line; the rest of this round checks out.

This review covers the three commits since my last review (ca62696..16dcb2d: 59aab99, 93598dd, 16dcb2d). None of them merges main.

Previous findings: all four are fixed as discussed in the threads. I checked the banner change against monorepo main: the account usage endpoint now leaves out the standing without usage:read, and the banner reads its paused checks from the standing. So "Members who can see the limit get a banner" is right.

Merge readiness: CI passes, and main has not touched any of the changed files since the merge base. pr_impact.py reports nothing. The overlap with #849 is unchanged.

Could not verify, please confirm: the new admin/usage.mdx L60 bullet describes only the tabbed page. In the web app, accounts without a contract get the Plan & invoices and Usage tabs only when the feature flag for the spending limit rollout is on. Without the flag they still see the old Usage card on a single page. If the flag is on for every account, the bullet is right. If it isn't yet, the accounts without it have lost their description.

Inline: 0 blockers, 1 important, 1 wording.

What I checked
  • Every line of git diff ca62696 16dcb2d (4 files) and the full ai/mcp-server/tools.mdx at the head. My earlier review and the author's replies in its threads.
  • gh pr checks 876: all checks pass. git log 618661a..origin/main on the touched files: nothing. pr_impact.py 618661a..pr-876: no findings.
  • Monorepo origin/main@1c75808be3, described in my own words:
    • Billing settings page: the Usage tab appears for accounts without a contract when the overage limit flag is on and the member has usage:read (or is support). The self-serve tab shows Usage terms, the overage card when the account can hold a limit, and Usage breakdown. Without the flag, those accounts keep the old usage section on one page.
    • The usage endpoint behind the banner returns the standing only with usage:read.
    • MCP spending cap tools: the overage is shown only when the role has usage:read and the session has checkly:usage:read. Otherwise the answer leaves it out and adds one fixed note, which says the caller's role lacks usage:read. billing:update now depends on usage:read in the permission model.
    • Webapp copy: yearly overage invoiced every $300 of overage.
    • Built-in role name Read Only matches admin/team-management/overview.mdx on main.
    • #session-permissions exists on ai/mcp-server/security-and-permissions.mdx and lists checkly:usage:read.
  • No end-to-end test: the limit needs a Starter or Team account with Stripe billing, which local Checkly does not have.

Comment thread ai/mcp-server/tools.mdx Resolved
Comment thread admin/usage.mdx Resolved

@hlenke hlenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs changes · The web app changed today: on Starter and Team accounts, every member now sees the Usage tab. Two sentences in admin/usage.mdx still say only Owners, Admins and View usage roles see it. One of them is wording I suggested yesterday. Fix those two lines and this is ready.

This review covers the one commit since my last review (16dcb2d..c27892c). It does not merge main.

Previous findings: both are applied as suggested (the MCP note sentence and the Enterprise roles sentence).

What changed under the PR: a commit merged to monorepo main today at 15:00 UTC (1eb8c4ca1f) removes the rollout flag for the spending limit. That settles the open question from my last review: accounts without a contract now always get the Plan & invoices and Usage tabs. The same commit also shows the Usage tab to members without usage:read. They see the usage terms and the breakdown, but not the overage or the limit. I tested this on local Checkly as a Read Only member and as an Owner of a Team account (details in the two inline comments). I could not check whether this commit is live in production yet.

Merge readiness: CI passes. GitHub reports the PR as mergeable, and main has not touched any of the changed files since the merge base. pr_impact.py reports nothing. Overlap: #849 also edits three of these files and targets docs-agent, #598 edits admin/team-management/permissions.mdx, and #774 edits cli/checkly-account.mdx. This PR can land first.

Optional, not from this round: admin/team-management/permissions.mdx L346 says billing:read lets a member view the overage spending limit. In my test, the Read Only member of the Team account (who has billing:read) saw no limit card on Plan & invoices and no limit row on Usage. admin/spending-limit.mdx L104 says the limit needs billing:read and usage:read, which matches what I saw. The L346 text mirrors the permission description in the app, so this may need a product answer rather than a docs change.

Inline: 0 blockers, 2 important, 0 wording.

What I checked
  • Every line of git diff 16dcb2d c27892c (2 files), the full admin/usage.mdx, admin/spending-limit.mdx and the billing tools section of ai/mcp-server/tools.mdx at the head, my two earlier reviews and the author's replies.
  • gh pr checks 876: all checks pass. git log 618661a..origin/main on the touched files: nothing. pr_impact.py 618661a..pr-876: no findings. Open PRs touching the same files.
  • Tested on local Checkly (monorepo cf1d14faa7, CLI 10.4.0). Roles and memberships for the web app tests were set by hand in the test database, not through the Members page.
  • Monorepo origin/main@cf1d14faa7, described in my own words:
    • apps/webapp/src/pages/settings/account/billing/SettingsAccountBilling.vue: on a contract account, the Usage tab needs usage:read (or a support seat). On an account without a contract, the tab shows for every member when the account has Stripe plan management; the overage card and the limit inside it still need usage:read. Before 1eb8c4ca1f, the tab itself also needed usage:read, which is what the docs describe.
    • apps/backend/api/src/modules/mcp/tools/spending-cap.ts: the write tools show the overage only when the role has usage:read and the session has checkly:usage:read. Otherwise they leave it out and add one fixed note.
    • apps/backend/api/src/modules/mcp/protocol/types.ts: API keys always carry checkly:usage:read, so the missing-scope case can't be reproduced with a key.
    • packages/models/src/permissions/catalog.ts: the label View usage and the billing:read description.
  • Could not verify: whether 1eb8c4ca1f is deployed to production. The missing-scope case of the MCP note (it needs a real OAuth sign-in). Where credits went and the Enterprise Usage breakdown: the local contract account has no usage term, so the tab showed only the period picker; that text is unchanged since my last review.
What I tested: 4 claims end to end on a local Checkly from monorepo main, 1 not runnable there
Where Kind Result
c1 admin/usage.mdx:68 ui pass: Offline CONTRACT account. Owner: tabs Plan & invoices and Usage, Usage shows Custom, 7d, 30d, Contract to date. Read Only: no tabs, a card says Admin or owner access is required. Custom role with billing:read and usage:read: both tabs. The Read Only and custom role states were set by hand in the box database (membership row), not through the Members page. The account has no usage term, so Where credits went and Usage breakdown did not render; that part of the sentence is unchanged since the last review.
c2 ai/mcp-server/tools.mdx:246 integration pass: JSON-RPC on the box's /mcp as seeded account mcpSpendingCapStarter (STARTER, $0.26 overage). The seeded custom role with billing:update and no usage:read got overageUsd null, remainingUsd null, limit state null and a note on set-spending-cap and remove-spending-cap, both for no-op calls and for confirmed writes. The owner got overageUsd 0.26 and no note on the same calls. The cap was put back to none.
c3 ai/mcp-server/tools.mdx:246 integration pass: Same run: remove-spending-cap without a limit and set-spending-cap with the current $50 answered changed false without a confirmation request; a real change asked to confirm first.
c4 ai/mcp-server/tools.mdx:248 integration not run (needs-production): A session without that scope needs a real OAuth sign-in where the user leaves the scope out. On the box only API keys reach /mcp, and an API key always carries checkly:usage:read (monorepo apps/backend/api/src/modules/mcp/protocol/types.ts). Read in source instead: apps/backend/api/src/modules/mcp/tools/spending-cap.ts shows the overage only when the role has usage:read and the session has the scope, and sends the same note otherwise.
c5 admin/usage.mdx:60 ui fail: Seeded TEAM account accountUsageTeam ($18.06 overage, $30 limit). A Read Only member sees the Usage tab with Usage terms and Usage breakdown, without the overage, the limit and the Overage column. The Owner also sees Overage this billing period ($18.06 of the $30 limit) and the limit. The offline user was added to that account by hand in the box database, first as Read Only, then as Owner, and removed afterwards. Matches monorepo main since 1eb8c4ca1f (2026-11-26 15:00 UTC): apps/webapp/src/pages/settings/account/billing/SettingsAccountBilling.vue no longer asks for usage:read to show the tab on accounts without a contract.

Comment thread admin/usage.mdx

- The **Plan** card shows when the current period ends: **Free check runs are refreshed on** on the Hobby plan, **Free trial ends on** during a trial, and **Next billing period starts** on paid plans.
- The **Usage** card shows what the whole account has used in the current period against what your plan includes, for example `7 / 1,000`. Under **Synthetic Checks**, your check runs have two rows: Browser and Playwright check runs, and Multistep and API check runs. The **Playwright check runs (1 run every 30s)** row shows how many of the Browser and Playwright check runs came from Playwright Check Suites. The other rows show how many uptime monitors, status pages, users and other resources you have, against your plan's limits.
- The **Usage** tab, next to **Plan & invoices**, shows what the whole account has used in the current period against what your plan includes. It has the **Usage terms**, the overage of the period on the Starter and Team plans, and a **Usage breakdown**. Owners, Admins and custom roles with the [**View usage**](/admin/team-management/permissions#usage) permission see the tab.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Important · On monorepo main since today (1eb8c4ca1f), every member of an account without a contract sees the Usage tab. I tested it on a Team account with $18.06 of overage and a $30 limit:

  • A Read Only member sees the Usage tab with Usage terms (plan and billing period) and the Usage breakdown. No overage, no limit.
  • The Owner also sees Overage this billing period ($18.06 of the $30 limit), the limit under Usage terms, and an Overage column in the breakdown.

So usage:read now decides what the tab shows, not whether it shows. This was correct when you wrote it; the app changed after your last commit. I tested Read Only on a Team account only. The source applies the same rule to every plan without a contract.

Suggested change
- The **Usage** tab, next to **Plan & invoices**, shows what the whole account has used in the current period against what your plan includes. It has the **Usage terms**, the overage of the period on the Starter and Team plans, and a **Usage breakdown**. Owners, Admins and custom roles with the [**View usage**](/admin/team-management/permissions#usage) permission see the tab.
- The **Usage** tab, next to **Plan & invoices**, shows what the whole account has used in the current period against what your plan includes. It has the **Usage terms** and a **Usage breakdown**. On the Starter and Team plans, Owners, Admins and custom roles with the [**View usage**](/admin/team-management/permissions#usage) permission also see the overage of the period and the overage spending limit there.

Comment thread admin/usage.mdx
### Enterprise plans

On an Enterprise plan, the page has no **Usage** card. Owners, Admins and custom roles with the [**View usage**](/admin/team-management/permissions#usage) permission see a **Usage** tab next to **Plan & invoices** instead. It shows usage against your contract's credit budget for the period you pick (**7d**, **30d**, **Contract to date** or a custom range), credits per day, week or month under **Where credits went**, and a **Usage breakdown** per check type. Other roles don't see the tab.
On an Enterprise plan, the **Usage** tab shows usage against your contract's credit budget for the period you pick (**7d**, **30d**, **Contract to date** or a custom range), credits per day, week or month under **Where credits went**, and a **Usage breakdown** per check type. As on other plans, only Owners, Admins and custom roles with **View usage** see the tab.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Important · "As on other plans" was my suggestion yesterday, and it is no longer true: on other plans every member sees the tab now (see the comment on L60). The Enterprise half holds. I tested it on a contract account: the Owner and a custom role with View billing and View usage see the Usage tab with Custom, 7d, 30d and Contract to date. A Read Only member sees no tabs.

Suggested change
On an Enterprise plan, the **Usage** tab shows usage against your contract's credit budget for the period you pick (**7d**, **30d**, **Contract to date** or a custom range), credits per day, week or month under **Where credits went**, and a **Usage breakdown** per check type. As on other plans, only Owners, Admins and custom roles with **View usage** see the tab.
On an Enterprise plan, the **Usage** tab shows usage against your contract's credit budget for the period you pick (**7d**, **30d**, **Contract to date** or a custom range), credits per day, week or month under **Where credits went**, and a **Usage breakdown** per check type. On this plan, only Owners, Admins and custom roles with **View usage** see the tab.

This branch was successfully deployed

1 active deployment
staging — c27892c1 Deployed Nov 26, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants