How to Connect a Webhook to Receive Events
Stand up an endpoint, register it with a service, and confirm real events arrive so two systems can talk in real time.
A webhook lets one service push an event to yours the moment it happens, no polling required. To use one you need an endpoint that accepts a POST, a registration on the sending side, and a way to confirm events land. This guide wires all three.
What you need
- A service that can send webhooks (payments, forms, a repo host)
- Somewhere to run a small endpoint, or a tunneling tool for local testing
- About 12 minutes
Step 1: Expose an endpoint
Create a route that accepts a POST and returns a 200 quickly. The sender only cares that you acknowledge fast; do the heavy work afterward.
app.post('/webhooks/incoming', (req, res) => {
res.sendStatus(200); // acknowledge immediately
queue.add('handle', req.body); // process out of band
});Step 2: Make it reachable
For local testing, a tunnel gives the outside world a public URL that forwards to your machine. In production, use your deployed domain instead.
Step 3: Register the URL
In the sending service's dashboard, add your full endpoint URL and pick which events to receive. Subscribe only to the events you actually handle.
Step 4: Verify the signature
Most services sign each payload. Check the signature header against your secret so you only trust events that truly came from the sender.
Result: real events flow into your system the instant they occur, acknowledged fast and verified as genuine before you process them.
Watch related tutorials
20:00
07:00
18:20
16:00
14:30
1:42:18