Webhook vs Callback: What's the Difference?

A callback is a function you hand to other code to be run later when something happens, inside a single program. A webhook is the same idea across the network: instead of calling a function in memory, a remote server sends an HTTP request to a URL you registered when an event happens. A webhook is often described as an HTTP callback or web callback, so the concepts are related, but a callback is in-process while a webhook crosses system boundaries over HTTP.

Webhook vs callback at a glance

WebhookCallback (in code)
Where it runsAcross systems, over HTTPInside one program, in memory
TriggerA remote eventA local event or completed operation
MechanismHTTP request to a registered URLA function reference invoked later
Failure modesNetwork errors, retries, securityExceptions in the same process

A note on "callback URL"

The term callback is sometimes used loosely to mean the URL a service redirects to, such as an OAuth callback. That is a browser redirect, not a webhook. A webhook is a server-to-server HTTP request carrying event data, not a user redirect.

How Hookdeck fits

Because a webhook is a callback that travels over the network, it inherits network problems a normal function call never has: the request can fail, duplicate, land out of order, or come from an unverified sender. Hookdeck's Event Gateway handles exactly those concerns, verifying signatures, retrying failures, and recording every delivery, so a webhook behaves as reliably as an in-process callback. See how it works, or catch live webhooks on your machine with the CLI.