Webhook Endpoints for Developers
A webhook endpoint is the public URL that receives event callbacks from providers. It is the entry point for your integration.
Good endpoint design prevents duplicate side effects, signature failures, and lost events when traffic spikes.
What is a webhook endpoint
It is an HTTP route that accepts POST requests from external services and returns a fast 2xx acknowledgement after basic validation.
How it works
- Create an endpoint URL.
- Register it in provider settings.
- Verify signatures per request.
- Store event ID for idempotency.
- Queue background processing.
Common problems
- Returning 200 before validation.
- No idempotency on retried events.
- Long synchronous logic causing timeouts.
- No payload history for debugging.
How FastHook solves this
FastHook gives you managed webhook endpoints with delivery visibility, retries, and replay. You can inspect payloads and route events without hardcoding per-provider behavior.
Code examples
Node.js endpoint with idempotency check
app.post("/webhooks/inbound", async (req, res) => {
const event = req.body;
const eventId = event.id;
// verify signature first
// if (invalidSignature) return res.status(401).send("invalid signature");
const alreadyProcessed = await db.events.findById(eventId);
if (alreadyProcessed) return res.status(200).send("duplicate ignored");
await db.events.insert({ id: eventId, received_at: new Date().toISOString() });
await queue.publish("process_webhook", event);
return res.status(200).send("ok");
});Register endpoint (curl)
curl -X POST "https://api.provider.com/v1/webhooks" \
-H "Authorization: Bearer PROVIDER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/inbound",
"events": ["order.created", "order.updated"]
}'Example endpoint payload
{
"id": "evt_9283",
"type": "order.created",
"timestamp": "2026-04-20T12:00:00Z",
"data": {
"order_id": "ord_102",
"customer_id": "cus_88"
}
}Try FastHook
Create your endpoint, send test events, and monitor deliveries in one place.