What is a Webhook?
A webhook is an automated HTTP callback that sends real-time data from one application to another when a specific event occurs. Unlike APIs where you request data, webhooks push data to you automatically — they are sometimes called "reverse APIs."
How Does Webhook Work?
Webhooks work by registering a URL endpoint on your server with a third-party service. When a triggering event occurs (like a payment, form submission, or code push), the service sends an HTTP POST request to your endpoint with event data in the payload. Your server then processes the data and takes action.
Common webhook use cases include: receiving payment notifications from Stripe, triggering deployments when code is pushed to GitHub, updating inventory when an order is placed, and sending notifications when a form is submitted. Webhooks are more efficient than polling APIs because they only send data when something actually happens.