Webhooks
A webhook is an HTTP-based callback function, triggered by an event in a source system and sent to a destination system, often with a payload of data.
Webhooks are used by a wide variety of web apps to receive small amounts of data from other apps.
What are the use cases?
Webhooks are automated, in other words, they are automatically sent out when their event is fired in the source system.
Let's say you subscribe to a dating app. The dating app wants to send you an email at the beginning of each month when it charges your credit card.
The dating app can subscribe to the payment provider (the source) to send a webhook when a credit card is charged (event trigger) to their emailing service (the destination). When the event is processed, it will send you a notification each time your card is charged.
The payment provider webhooks will include information about the charge (event data), which the emailing service uses to construct a suitable message for you, the customer.
What is the difference between APIs and webhooks?
Webhooks are not APIs; they work together. An application must have an API to use a webhook.
Webhooks are not suitable for transferring sensitive data such as passwords or credit card information.
In general, webhooks are for sending notifications about events. If youโre putting sensitive data inside messages sent out by webhooks, you should reconsider your use case.
Last updated