What is a Webhook?
What is a Webhook?
What is a Webhook?
A webhook is an HTTP callback: the API provider sends an HTTP POST to a URL you register when an event happens. For example, Stripe sends a webhook when a payment succeeds; Twilio sends one when an SMS is delivered.
Webhook vs. Polling
Polling repeatedly asks the API “anything new?”. Webhooks push events the moment they occur, which is faster, cheaper, and kinder to rate limits. Use webhooks for real-time updates and polling only when webhooks are unavailable.
Receiving Webhooks
Your endpoint must verify the webhook signature (to prove it came from the provider), respond 2xx quickly, and process the event idempotently because webhooks can be delivered more than once.