đThe Knowledge Series is a series of easy to read guides designed to help you plug the gaps in your tech knowledge so that you feel more confident when chatting to colleagues. Clearly explained in plain English. One topic at a time.
If youâre a free subscriber and youâd like to upgrade to unlock them you can do so below. Or you can find out more about paid access here.
Hi product people đ,
Youâve probably heard engineering teams refer to webhooks during a discussion about an upcoming feature. You may also have come across the term if youâve spent time reading API documentation. Webhooks can be quite a confusing concept to grasp and I remember when I was first introduced to them when I worked in eBayâs shipping team, I found it pretty difficult to distinguish between APIs and webhooks.Â
The simplest analogy is to think of webhooks as the waiter who brings you your food directly to your table as soon as it's ready - so that you donât have to keep checking in with the kitchen every minute to ask when itâs likely to be ready. But if that makes no sense now, hopefully by the end of this it will.
Coming up:
â© When might webhooks be used?
đł Examples of webhooks using payments
đ§ Webhooks vs. APIs: what are the differences?
đ Best practices to consider when using webhooks
Understanding when webhooks might be used
Before we get into the technical details, letâs explore some scenarios in which webhooks might be used in a product development context:
Sending notifications â webhooks can be used to send notifications to users of products when a specific event happens. For example, you might want to send a notification when a packageâs delivery status is changed from âprocessingâ to âout for deliveryâ. Webhooks can be used to âlistenâ for this status change and trigger the correct notification accordingly.
Integrations with third party applications â webhooks might power some aspects of an integration with a third party app. A CRM, for example, might use a webhook to update a specific customerâs personal account information.
Monitoring and alerts -Â monitoring tools can utilize webhooks to send alerts to incident management or communication systems when predefined thresholds are exceeded, ensuring timely responses to issues.
Broadly speaking, webhooks are a simple way for products to receive notifications when certain events happen. So letâs take a look at a real world example in more detail to bring some of the more technical details to life.
Example â using webhooks in a payment context
Webhooks work by allowing products to âlistenâ to and âsubscribeâ to specific events. Before we get into the payments example, letâs revisit our restaurant and chef analogy to get to grips with the basic principle of webhooks and why theyâre useful.
Eating at a restaurant - without webhooks