Guide · Vercel
How to get alerted before a surprise Vercel bill
The fastest way to limit a surprise Vercel bill is to find out the same day spend jumps, not when the invoice arrives. Here is how to get an alert in Slack or Discord when Vercel costs spike, in about five minutes, for free.
Why the built-in limits aren't enough
Vercel's Spend Management lets Pro teams set a spend amount, get notified at thresholds and optionally pause projects. It's an important backstop, but it is threshold-based: a bot crawl, a misconfigured build or a newly billed feature can add hundreds of dollars in a day while still sitting under your monthly amount.
What you want is an anomaly alert: "today is 3× your normal day." That catches problems while they are still cheap. Keep the provider's hard limit as a backstop.
1. Create a key that can read costs
Create an access token under Account settings → Tokens and scope it to your team. The token's user needs a team role that can read billing (for example Owner, Member, Developer or Billing). Add your team id as the VERCEL_TEAM_ID repo variable.
2. Add billshock to a repo
npx billshock init
This writes billshock.yml and .github/workflows/billshock.yml, which runs every hour. Trim the config to what you need:
providers:
vercel:
token: ${VERCEL_TOKEN}
teamId: ${VERCEL_TEAM_ID}
rules:
dailyCap: 20
rules:
spikeMultiplier: 3
spikeMinAmount: 5
notify:
slackWebhook: ${SLACK_WEBHOOK_URL}
3. Add secrets and run it once
In your repo, go to Settings → Secrets and variables → Actions and add VERCEL_TOKEN plus a Slack or Discord webhook URL. Then open the Actions tab and run the billshock workflow manually. The run summary shows today, yesterday, the 7-day average, month-to-date and the projected month total.
When something looks wrong, you get one message per anomaly:
ALERT vercel: $659.08 spent on 2025-10-07, 1569.2x the 7-day average of $0.42
No webhook? A run with a new alert fails, and GitHub emails you about the failed workflow.
npx billshock init creates the config and an hourly GitHub Actions workflow. Free and open source. Prefer a hosted version? Join the waitlist.How it works
billshock reads GET /v1/billing/charges (FOCUS 1.3) and counts only Usage charges, so plan fees and credits don't trigger alerts. Each run compares yesterday and today-so-far against the trailing average and your caps. Sent alerts are remembered in the Actions cache so you're not pinged every hour. Your key stays in your repo's secrets and is only sent to Vercel's API.
FAQ
How quickly will I be alerted?
Within an hour of the cost showing up in Vercel's billing data. Billing data usually lags actual usage by a few hours, so expect same-day alerts rather than real-time ones.
Can I monitor other providers too?
Yes. billshock supports OpenAI and Anthropic in the same config, plus a combined total budget.
Does billshock stop spending?
No. It only reads cost data and sends alerts. Use Vercel's own limits to cap spend.