You ask an API something. A webhook tells you on its own.
A webhook is an automatic message that one system sends to another whenever something happens: an order placed, a payment successful, a form submitted. While with an API you have to ask yourself if there is news, a webhook reports itself. This saves delays and unnecessary traffic.
IN COMMON LANGUAGE
Ask or be told
Without webhooks, a system must periodically ask: are there new orders? Every minute again. Usually the answer is no, and that costs traffic and time.
You can turn that around with a webhook. As soon as there is an order, the webshop sends a message to your accounting. No waiting time, no pointless questions.
In practice you use both. Webhooks for events that need to be delivered immediately, and an API to retrieve data when you need it.
WHY IT MATTERS
Where things go wrong
Webhooks are simple until the message doesn't arrive. If the receiving system is down for a while, the message will disappear: unless this has been taken into account.
That's why we always build reception with a queue and retries. If it ultimately does not work, you will receive a notification. Silent data loss is the only unacceptable scenario.
- Repeat attempts — a missed notification must be tried again.
- Verifiable sender — so not everyone can send messages.
- Catch duplicate messages — suppliers sometimes send twice; that should not result in two invoices.
- Visible logbook — you want to be able to look back at what came in.
- Failure notification — rather an email than a hole in your administration.
FREQUENTLY ASKED QUESTIONS
More about a webhook
What is the difference with an API connection?
You use an API to request or send something when you want it. A webhook is the opposite: the other system reports as soon as something happens. In a connection you usually use both.
What if a webhook fails?
With a well-built link, the message is queued and retried at increasing intervals. If it still doesn't work, a person will be notified. That wrong path is more important than the happy path.
Is a webhook safe?
Provided it is checked who sends it. An open receiving address can be called by anyone. We authenticate every incoming message with a shared secret or vendor signature.
CONTINUE READING
Of course, continue reading about this subject.
Data that directly get through?
Tell us which systems you use. We find out what can be done automatically and what it yields.