Most small-business admin is the same short story on repeat: something happens in one tool, and a person copies it into another. A form fill becomes a row in a sheet. A payment gets marked off an invoice. A cancelled booking has to free a slot. Webhooks are a good way to do that copying, but only if you treat them as a delivery mechanism, not as a brain.
A webhook is just another system calling your URL to say that an event happened. The useful part is speed: you find out when a payment is taken, not when someone next remembers to look. The less useful part is that the other system will retry, events will arrive twice, some will arrive late, and occasionally one will not arrive at all.
If the work can wait until the morning, a scheduled import is often calmer. A nightly pull of new payments or new form responses, matched against what you already have, is easy to reason about and easy to rerun. Use a webhook when someone is waiting on the result: a receipt, a booking confirmation, a slot that should be freed before the next customer tries to take it.
The first rule is to accept the event quickly and do the work in the background. The sender usually expects a prompt response. If you start writing to four other APIs before you reply, you will time out, they will retry, and you will do the job twice. Verify the signature, store the raw event, return a success response, and let a queue or a short background job do the rest.
The second rule is idempotency. You will receive the same event more than once. Keep the event id, and if you have already processed it, stop. That sounds obvious, and it is the difference between one "thanks, we got your payment" email and three. The same applies if your own job fails halfway through: choose steps that can be safely repeated, or record which steps already succeeded so a retry does not raise a second invoice or charge a card again.
The third rule is not to chain too much off one event. A payment webhook should probably mark the invoice and tell the customer. It should not also rewrite the CRM, update a forecast sheet, notify five Slack channels and try to generate a contract. When one of those later steps fails, you are left with a half-finished trail that is hard to unpick. Keep the first handler small. If more work is needed, queue a second job that can fail on its own.
Treat money and VAT as needing a check, not a blind write. A webhook is a claim that something happened, not a substitute for the accounts. If a payment event arrives, it is reasonable to record it and try to match it. It is not reasonable to assume the tax is right, or that the invoice should be filed, without a way for a human to see exceptions. Build a simple list of events that could not be matched, and look at it.
Sign the endpoint, and keep it boring. Use HTTPS, verify the signature or shared secret the provider gives you, and do not expose a URL that will perform work for anyone who can guess it. Log enough to replay a bad event, but do not write card numbers or personal data into a chat channel "just for debugging".
When it goes wrong, and it will, you want a dead-letter place: events that failed after a few retries, sitting somewhere you can inspect and replay. Silent failure is worse than a short delay, because the customer thinks the booking is cancelled and your diary does not.
A pattern that has worked well for small UK firms is this. The webhook updates one operational system, quickly: the diary, the job list, or the invoice status. A slower daily reconcile with Xero, or with whatever holds the official accounts, catches anything the webhook missed. People still review exceptions. The admin shrinks, but it does not disappear, which is usually the point.
If you only remember one thing, make it this: a webhook should tell you that something happened, and your system should be able to hear that news twice without making a mess.
I'm an engineer at LiteByte, a small UK software studio. A lot of our work is this kind of plumbing: making the tools a small firm already pays for talk to each other, without adding another stack to look after.
Top comments (0)