Skip to content
All termsENGINEERING & ARCHITECTURE

Webhooks

DEFINITION

Server-to-server HTTP callbacks fired when a specific event happens — the push counterpart to pull APIs.

In depth

If polling is "call me back in 5 minutes and I'll tell you the status", webhooks are "I'll call you the moment it changes". They cut latency, reduce load, and enable real-time integrations.

Production webhooks must handle: retries (with backoff), signature verification (HMAC), idempotency (delivering the same event twice is normal), and a dead-letter queue for permanently failed deliveries.

Formula & example

EXAMPLEWhen a payment succeeds, the payment provider sends an HTTP POST to https://yourapp.com/api/webhooks/payments with the event in JSON. Your app verifies the signature, marks the invoice paid and returns 200 so the provider stops retrying.

Rules of thumb

  • Verify every webhook signature before trusting the payload.
  • Return 200 quickly and process heavy work in a background job.
  • Make handlers idempotent: the same event may arrive twice.
  • Log every event so failures can be replayed.

Common mistakes

  • Trusting unsigned payloads, which lets anyone fake events.
  • Slow handlers that time out and trigger retries.
  • Assuming events always arrive in order.

FAQ

Webhooks vs polling?

Webhooks push events to you as they happen; polling asks repeatedly whether anything changed. Webhooks are faster and cheaper but need a public endpoint and retry handling.

What happens if my webhook endpoint is down?

Most providers retry with backoff for hours or days. Make sure your handler can process the backlog safely and check the provider's dashboard for failures.

Should my SaaS send webhooks to customers?

Yes once customers integrate with you. Sign payloads, retry failures and give them a log of deliveries.

Related terms

USE THIS IN A REAL PLAN

Turn concepts into a real SaaS blueprint

PlanMySaaS runs Webhooks and every other SaaS metric for your idea — part of a full blueprint with architecture, feature specs, 21 docs, and Cursor-ready prompts.

Last reviewed 14 April 2026 by Abhi Verma.