Webhooks for Developers
Webhooks are HTTP callbacks sent when something happens in another system. Instead of polling an API on a schedule, your app receives events as they happen.
If you build SaaS integrations, billing flows, or automation, webhooks are usually the fastest way to keep systems in sync. Stripe payment updates, GitHub push events, and user lifecycle notifications are common webhook use cases.
This page explains how webhooks work in practice, where integrations break, and how FastHook helps you receive, debug, and manage webhook traffic reliably.
What is a webhook
A webhook is an HTTP request sent by a provider to a URL you control. The request usually contains headers, an event type, and a JSON payload with event data.
How it works
- Create a webhook endpoint URL.
- Register that URL in the provider dashboard.
- Provider sends events to your endpoint.
- Validate signature and parse payload.
- Process asynchronously and return a 2xx response quickly.
- On failure, provider retries based on delivery policy.
Common problems
- Delivery failures due to 5xx responses or timeouts.
- Duplicate events from retries without idempotency handling.
- Signature validation issues from incorrect raw-body parsing.
- Low observability when payloads and headers are not logged.
- Traffic spikes causing retry storms and processing delays.
How FastHook solves this
FastHook provides stable webhook endpoints, payload inspection, delivery history, and replay workflows. You can route events, debug failures, and recover from incidents without rewriting integration code each time.
Code examples
Node.js receiver (Express)
import express from "express";
const app = express();
app.use(express.json());
app.post("/webhooks/provider", async (req, res) => {
const event = req.body;
// TODO: verify signature before processing
console.log("event_type:", event.type);
console.log("event_id:", event.id);
// enqueue async processing
res.status(200).send("ok");
});
app.listen(3000, () => {
console.log("Listening on :3000");
});Send a test webhook (curl)
curl -X POST "https://your-endpoint.example/webhooks/provider" \
-H "Content-Type: application/json" \
-H "X-Event-Type: payment.succeeded" \
-d '{
"id": "evt_123",
"type": "payment.succeeded",
"created_at": "2026-04-20T10:00:00Z",
"data": {
"customer_id": "cus_42",
"amount": 1999,
"currency": "USD"
}
}'Example webhook payload (JSON)
{
"id": "evt_123",
"type": "invoice.paid",
"attempt": 1,
"timestamp": "2026-04-20T10:00:00Z",
"data": {
"invoice_id": "inv_001",
"customer_id": "cus_42",
"total": 4900,
"currency": "USD"
}
}Try FastHook
Create a FastHook endpoint, send test events, inspect deliveries, and replay failed webhook attempts from one place.