How to Test Vercel Webhooks
Vercel webhooks notify you about deployment events — when builds start, succeed, fail, or get promoted.
Looking for the broader picture? See the 7 best webhook testing tools (2026), or if you're already on Webhook.site, the 60-second migration to HookRay.
Vercel Official Webhook Docs1. Vercel Webhook Events
Vercel can send the following webhook events to your endpoint:
deployment.createddeployment.succeededdeployment.faileddeployment.cancelleddeployment.promotedproject.createdproject.removed2. Set Up a Test Endpoint with HookRay
Follow these steps to start receiving Vercel webhooks for testing:
- Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
- Copy the URL (e.g.,
https://h.hookray.com/abc123). - In your Vercel dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
- Select the events you want to receive (see list above).
- Trigger a test event — HookRay will show the incoming webhook in real-time.
3. Sample Vercel Webhook Payload
Here's an example of what a Vercel webhook payload looks like:
{
"type": "deployment.succeeded",
"payload": {
"deployment": {
"id": "dpl_abc123",
"url": "my-app-abc123.vercel.app",
"name": "my-app",
"meta": {
"githubCommitSha": "abc123def456"
}
}
}
}4. How to Verify Vercel Webhook Signatures
- Algorithm
- HMAC-SHA1
- Header
x-vercel-signature- Encoding
- hex
Node.js (Express)
// Next.js App Router — read raw text, HMAC-SHA1, hex.
import crypto from 'node:crypto';
export async function POST(request: Request) {
const signatureHeader = request.headers.get('x-vercel-signature');
if (!signatureHeader) {
return new Response('missing signature', { status: 401 });
}
const rawBody = await request.text();
const expected = crypto
.createHmac('sha1', process.env.VERCEL_WEBHOOK_SECRET!)
.update(rawBody)
.digest('hex');
const sigBuf = Buffer.from(signatureHeader);
const expBuf = Buffer.from(expected);
if (
sigBuf.length !== expBuf.length ||
!crypto.timingSafeEqual(sigBuf, expBuf)
) {
return new Response('invalid signature', { status: 403 });
}
const event = JSON.parse(rawBody);
return Response.json({ ok: true, type: event.type });
}Python (FastAPI)
import hmac, hashlib, os
from fastapi import FastAPI, Request, HTTPException
app = FastAPI()
@app.post("/webhooks/vercel")
async def vercel_webhook(request: Request):
body = await request.body()
signature = request.headers.get('x-vercel-signature', '')
expected = hmac.new(
os.environ['VERCEL_WEBHOOK_SECRET'].encode(),
msg=body,
digestmod=hashlib.sha1, # NOTE: SHA-1, not SHA-256
).hexdigest()
if not hmac.compare_digest(signature, expected):
raise HTTPException(status_code=403, detail='invalid signature')
return {'ok': True}Capture a real Vercel webhook with HookRay first, then replay the captured request against your verifier locally — that way you can iterate on the verification code without re-triggering events in Vercel. Read Vercel's official signing docs for the canonical reference, or see the cross-service signature verification guide for Ruby and timing-safe comparison patterns.
5. Frequently Asked Questions
How do I test Vercel webhooks without deploying?
Use HookRay to get an instant public webhook URL. Paste it into your Vercel dashboard's webhook configuration, trigger an event, and watch the payload arrive in real time. No code, no ngrok, no deployment required. The free tier captures 100 requests per month and works on all Vercel event types.
Why aren't my Vercel webhooks arriving?
The four most common causes: (1) the endpoint URL isn't publicly accessible — Vercel can't reach localhost; (2) the wrong events are subscribed in your Vercel dashboard; (3) signature verification is rejecting the request before your handler runs; (4) Vercel can't reach your server because of a firewall, expired SSL certificate, or wrong DNS. Use HookRay's URL to isolate which of these four is failing — if HookRay receives the webhook, the problem is in your handler. If HookRay doesn't, the problem is in Vercel configuration.
Why am I getting 400 or 500 errors from my Vercel webhook?
Vercel reports the response status your endpoint returned. HookRay accepts any payload and returns 200 OK by default, so if you see 400/500 in your Vercel dashboard while pointing at HookRay, the issue is in Vercel's configuration (wrong event, malformed signing secret, etc.). If you point at your own endpoint and get 400/500, the issue is in your handler — capture the request with HookRay, replay it locally, and debug from the captured payload.
How do I verify Vercel webhook signatures?
Vercel signs each webhook request with a shared secret. Capture the raw headers and body using HookRay, then verify the signature in your application using Vercel's SDK or a standard HMAC library. Once verification works against HookRay-captured data, you can safely deploy. Vercel's docs (linked above) cover the exact signing algorithm.
Can I replay a captured Vercel webhook?
Yes — HookRay's replay feature re-sends any captured webhook to a different endpoint with one click. This is the fastest way to fix a buggy handler: capture the payload once, fix your code, and replay until it works. No need to re-trigger the event in Vercel.
6. Next Steps
- Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
- Enable smart parsing (Pro plan) to see Vercel-specific fields highlighted automatically
- Check the Vercel webhook documentation for the complete event reference
Ready to test Vercel webhooks?
Get a free webhook URL in 5 seconds. No signup required.
Start Testing Vercel Webhooks — FreeFree PDF: Webhook Testing Cheat Sheet 2026
One-page reference for 50+ APIs — canonical events, signing methods, sample payloads. Print it, pin it, share it.
📄 Download the cheat sheet (PDF, 180KB)