Webhooks
api backend integration web
What is a Webhook?
A webhook is a way for apps to automatically tell each other when something happens. Instead of one app constantly asking another app “Has anything changed?”, the second app will automatically send a message when something important happens.
Simple Analogy
Think of webhooks like a notification system for your smartphone:
- Traditional API (Polling): Like repeatedly checking your physical mailbox to see if you have any new mail. You have to manually look several times a day, wasting trips when there’s nothing there.
- Webhooks (Event-Driven): Like signing up for text message notifications from your postal service. They automatically notify you the moment a package is delivered, so you only need to check your mailbox when you know something is there.
Key Concepts
- Event-Driven: Webhooks are triggered by specific events (like a new order or payment)
- HTTP Callbacks: Webhooks send messages to a specific web address you provide
- Payload: The information sent about what happened
- Endpoint: The web address where webhook messages are sent
- Authentication: Ways to make sure the webhook messages are legitimate
- Retry Logic: What happens if a webhook message fails to deliver