Loyalty glossary · 8. Technology and architecture (25)
Webhook
A webhook is an HTTP callback that one system sends to another in real time when a specified event occurs, carrying a payload of data about that event.
Polling asks a server whether anything changed. A webhook tells the server when something changed, immediately, with the event data attached. For a loyalty programme, that distinction separates systems that react in real time from systems that rewrite history hours later.
The value of a webhook is not the HTTP call itself, it is the absence of a polling delay. An accrual event sent as a webhook lands before the member closes the app. A polling job that runs on a fixed schedule creates a window in which two systems disagree about a balance.
A programme accruing 500,000 points per month sends one webhook per accrual. If 2,000 points are accrued in a single day, that day accounts for 0.4 percent of the monthly accrual. Each event must be delivered once and only once.
A webhook sent is not a webhook received. Networks drop calls, receivers time out, and senders retry. Therefore every webhook handler must be idempotent: applying the same event twice must produce the same balance as applying it once. Without idempotency, a redelivered accrual becomes double credit.
Order matters more than most architects admit. Activity-based qualification rules depend on the sequence of events, not just the total. If a webhook for a 500 points purchase arrives after a webhook for a 1,000 points purchase, a tier check between the two events can promote a member one tier too early or too late. This is why systems that rely on webhooks must sequence by event time, not by delivery time.
The final trap is treating a webhook as a notification instead of a contract. An actuarial model of breakage or liability depends on the accrual stream being complete and auditable. A webhook dropped at a critical moment changes the timing of that stream without changing its total, which is exactly the kind of distortion that makes a model look wrong when the books are right.