Webhook
A webhook is an automatic message that a system immediately sends to a previously registered internet address when a specific event occurs. That is how another system learns, without constant asking, that an order has arrived or an invoice has been paid.
Explanation
With a classic API query, your program asks at regular intervals: "Are there new orders?" This repeated asking is called polling. A webhook turns it around. In the source system you register an address and choose the events you are interested in. When one occurs, the system sends an HTTP request with the key data to that address.
Webhooks are fast and save requests. But they have quirks: if the receiver is not reachable at that moment, a message can be lost or arrive again later. A reliable integration therefore verifies the origin of each message, recognizes repeats and additionally reconciles at fixed intervals through the API to see whether anything is missing.
Example from everyday integration work
A shop sends a webhook to the integration for every paid order. The integration fetches the full order data through the API and creates the order in the ERP. If the webhook does not reach the integration because of a disruption, a nightly reconciliation finds the missing order and transfers it afterwards. The same order is not created twice in the process.
How it differs from related terms
- API: your program asks actively. With a webhook, the other system gets in touch by itself. In practice, both are combined.
- Polling: regular asking through the API. Simpler, but slower and involving more requests.
- Interface: the umbrella term for the whole connection, of which a webhook can be a part.
Relevance to our services
Where a system offers webhooks, we use them for fast transfers and back them up with a regular reconciliation. Whether webhooks arrive and are processed, we monitor in operation. More on our approach under Have an integration programmed.
Frequently asked questions
Is a webhook real time?
Almost. The message usually goes out a few moments after the event. A webhook on its own is not a guarantee of delivery, though.
Related
API
An API is a defined programming interface that lets software use another system's data and functions. Explanation, example and related terms.
Interface
A software interface connects two systems so they exchange data automatically. Definition, everyday example and how it differs from API and middleware.
Operation and monitoring
Hosting in Germany, monitoring, alerts and notice of API changes. Cancel monthly.
