Webhooks explained: how apps notify each other in real time

What webhooks are, how they differ from APIs and polling, common business uses, and how to receive them securely and reliably.

By the UK Technology Hub teamPublished 4 minute read

The short answer

A webhook is an automatic message one system sends to another when something happens, such as a payment succeeding, a form being submitted or an order shipping. Instead of repeatedly asking for updates, your system gets notified instantly. To use webhooks well, verify that requests are genuine, respond quickly, process events in the background, handle retries and duplicates safely, and monitor failures.

Webhooks are the quiet glue of modern business software. When a customer pays online and your CRM updates, a confirmation email goes out and your team gets notified within seconds, webhooks are usually involved.

How webhooks work

  1. You give a service, such as a payment provider, a URL on your system: the webhook endpoint.
  2. You choose which events you want, such as "payment succeeded."
  3. When the event happens, the service sends an HTTP request to your URL with details of the event.
  4. Your system processes it and responds to confirm receipt.

Webhooks versus APIs and polling

An API lets your system ask another system for data or ask it to do something. Our guide to APIs explained covers APIs in detail.

Polling means repeatedly asking an API, "anything new?" It's wasteful and slow.

A webhook reverses the direction: the other system tells you when something happens. Webhooks and APIs work together; a webhook often says "something changed," and your system then calls the API for full details.

Common business uses

  • Payment confirmations, refunds and failed payments.
  • New form submissions or sign-ups.
  • E-commerce orders, shipments and stock changes.
  • Calendar bookings and cancellations.
  • E-signature completions, triggering onboarding. Our guide to automating customer onboarding shows an example.
  • Code pushes triggering builds and deployments.
  • Support tickets and chat messages.

Receiving webhooks securely

Verify signatures

Reputable providers sign webhook requests with a secret. Verify the signature before trusting the data, so attackers can't send fake events.

Use HTTPS

Only expose webhook endpoints over HTTPS.

Validate the payload

Check the event type and data match what you expect.

Keep secrets safe

Store signing secrets in environment variables, never in code.

Receiving webhooks reliably

Respond quickly

Acknowledge receipt fast, then process the event in the background. Slow responses can cause the sender to time out and retry.

Handle retries and duplicates

Providers retry failed deliveries, so you may receive the same event more than once. Make processing idempotent: use the event ID to make sure each event is handled only once.

Handle ordering

Events can arrive out of order. Use timestamps or fetch the latest state from the API when order matters.

Queue events

Put incoming events on a queue so spikes don't overwhelm your system and failures can be retried.

Log and monitor

Log every event received and its outcome. Alert on repeated failures.

Testing webhooks

  • Use provider dashboards to send test events.
  • Use tunnelling tools to receive webhooks on a local development machine.
  • Replay real events in staging.

No-code options

Integration platforms like Zapier, Make and n8n can receive webhooks and trigger workflows without custom code, which works well for many business automations.

Sending your own webhooks

If your product sends webhooks to customers, sign payloads, retry with backoff, provide event IDs, document event types and let customers see delivery logs.

A worked example

An online store uses a payment provider. When a payment succeeds, the provider sends a webhook to the store's endpoint. The handler verifies the signature, checks the event hasn't already been processed, stores it and responds immediately. A background job then marks the order as paid, sends a confirmation email, updates inventory and notifies the warehouse. If the email service is temporarily down, the job retries later without the provider needing to resend the webhook.

Webhooks for internal tools

Webhooks aren't only for external services. Your own systems can emit events, such as new customer, order shipped or ticket closed, that trigger automations elsewhere. This event-driven approach keeps systems loosely connected and easier to change.

Choosing endpoints and naming

Use clear, separate endpoints for different providers, such as /webhooks/payments and /webhooks/bookings, so logs and permissions stay organised. Avoid exposing internal details in URLs.

Monitoring webhook health

Most providers show delivery attempts and failures in their dashboards. Check them after deployments and set alerts for repeated failures, so missed events don't go unnoticed.

How we help

Our web app development team builds secure, reliable webhook handlers and integrations. Our AI solutions team designs event-driven automations, and our app development service connects webhooks to mobile notifications and workflows.

Frequently asked questions

What's the difference between a webhook and an API?

An API is called by your system to request data or actions. A webhook is sent to your system automatically when an event happens.

Are webhooks secure?

They can be, when you use HTTPS, verify signatures and validate payloads.

What happens if my webhook endpoint is down?

Most providers retry for a period. Make processing idempotent so retries don't cause duplicate actions.

This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.

Related guides

How to automate invoice processing, step by step

How businesses automate supplier invoice handling, from capture and data extraction to approvals and accounting entries, with sensible controls against errors and fraud.

All automation & integrations guides