Skip to content
Adelmi

Cloudflare Spend Management: spending caps for Workers

Cloudflare launched Spend Management in beta: spending caps that pause Workers and Durable Objects. How to set it up and what it risks in production.

· Software Engineer4 min read

Lee este artículo en español

Subscribe via RSS

Cloudflare Spend Management, announced in beta on November 13, 2026, lets you set a spending cap and have Cloudflare pause the product when it is reached, instead of only emailing you. It currently covers Workers and Durable Objects, is open to any pay-as-you-go customer, and guards against surprise bills from a code bug or a traffic spike. The trade-off is that a cap is an outage: decide ahead of time what gets switched off.

What Cloudflare announced

According to the official post, spend controls were among the most requested features from developers on its platform, and the usage alerts that already existed did not solve the problem: informing is not the same as controlling. What the post says, and nothing more:

  • Scope: beta for any pay-as-you-go customer, starting with Workers and Durable Objects. Cloudflare says other products will follow, with no dates.
  • What you configure: a spending limit, a recipient email and one or more alert thresholds.
  • What happens at the limit: a blocking policy is enforced and the product is paused automatically.
  • Where to enable it: the dashboard (Manage Account > Billing > Spend limits), the cf CLI or the REST API.
  • Visibility: the dashboard shows the current billing cycle's cost in near real time (under 10 minutes) and an audit log of who changed a limit and when a cap was reached.

How the cap works in practice

The post's API example creates a policy of 10,000 cents (USD 100) on Workers with the usage_block action and a notification email:

Terminal
curl --fail-with-body --request POST \
  "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/billing/spend-policies" \
  --header "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Workers spending cap",
    "product_id": "workers",
    "enabled": true,
    "threshold_cents": 10000,
    "action": "usage_block",
    "notification_email": "me@example.com"
  }'

We copied the example as it appears in the November 13, 2026 post; Cloudflare's billing documentation is the current reference if the format changes during the beta.

Three details from the post that change how you would use it:

  1. The cycle is not the calendar month. It starts when the paid subscription begins: a subscription that started on October 10 generally runs October 10 to November 10.
  2. It pauses only what costs money. New invocations of customer code that incur cost are rejected; in Workers, for example, Cron Triggers and Queue consumers are paused, but static assets keep being served.
  3. To resume you have three options: raise the limit above the cycle's accumulated spend, disable or delete the blocking policy, or wait for the next cycle, when the block expires.

What it means for a small business or a team in Latin America or the US

What follows is our reading, not Cloudflare's; we see it often in our software maintenance and support service. A spending cap protects the budget, but a paused product is an outage. If your API, scheduled jobs or queues run on Workers, answer three questions before enabling it:

  • What breaks when it pauses? A payment, an invoice or a webhook that stops running has a cost too. A good limit leaves headroom over normal spend, and intermediate alerts warn well before the cutoff.
  • Who gets the email? An alert sent to an inbox nobody reads is no alert. Use a team mailbox, not one person's.
  • How much delay can you accept? The post itself says "near real time, under 10 minutes" and that Cloudflare wants to shorten it; it does not promise a cutoff to the exact cent, so leave a margin.

For a project with a fixed dollar budget, this gives you a control that used to depend on checking the dashboard by hand. If you also call AI models, the post says it can be combined with AI Gateway spend limits, which already support per-user and per-model budgets for traffic routed through that gateway.

What is still missing

Cloudflare lists as plans, with no dates, more products, a shorter response time (hoping to get under a minute) and budgets per application or per AI agent. Today only per-product caps exist, so pausing Workers affects every application in the account that uses it. It is a beta: try it first on a non-critical account or project.

If cloud spend on your system already worries you, our guide on how much custom software costs breaks down the rest of the budget, and our guide to choosing a software development company in Latin America helps you ask vendors about cost controls.

The essentials

  • Spend Management, in beta since November 13, 2026, pauses Workers and Durable Objects when they reach a spending limit you set; it is not just an alert.
  • You configure it in the dashboard, with the cf CLI or the API, and resume by raising the limit, deleting the policy or waiting for the next cycle.
  • A cap protects the budget but stops the service: define the limit, the alerts and who receives them before enabling it in production.

Sources

  1. Cloudflare Blog: Introducing Spend Management: Spending limits and alerts for Cloudflare (Nov 13, 2026) (accessed November 15, 2026)
  • NewsCustom software

    GitHub blocks pull_request_target by default: what to check

    Since December 2, 2026, GitHub Actions blocks pull_request_target by default in affected public repositories. What changes and how to audit your workflows.

    David Hernandez· Software Engineer3 min read
  • NewsCustom software

    52% of WordPress sites will run unsupported PHP on Jan 1

    52.24% of WordPress sites run PHP 8.2 or older, with no security patches from January 1. How to check your PHP version and which one to move to.

    David Hernandez· Software Engineer3 min read