Webhook (HTTP Callback)
A webhook is an HTTP callback: when an event occurs in one system, it sends an HTTP POST with event data to a URL you register. Instead of polling an API repeatedly for changes, your application receives updates in real time, such as payment succeeded or ticket created events.
Technical Architecture & Deep-Dive
Webhooks invert the request flow. Rather than your app asking Stripe or Shopify for updates every minute, those providers push events to your endpoint as they happen. This saves API quota and delivers changes within seconds.
Webhook endpoints must be public, fast, and secure. They should verify the provider signature, respond quickly with a 2xx status, and handle retries idempotently. Edge runtimes are a natural fit because they are always on, globally reachable, and can validate HMAC signatures before forwarding events to databases or other APIs.
Key Architectural Benefits
Implement Webhook (HTTP Callback) at the Edge
Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.
Frequently Asked Questions
Q:Why do webhook providers retry deliveries?
If your endpoint times out or returns an error, providers retry to guarantee delivery. Your handler must be idempotent so processing the same event twice does not duplicate records or charges.
Related Architecture Concepts
Webhook signature verification is validating that an incoming webhook was sent by the expected provider and was not altered. Providers sign each payload with a shared secret, typically using HMAC-SHA256, and your endpoint recomputes the signature and compares it before trusting the event.
Idempotency means that performing the same API operation multiple times has the same effect as performing it once. Idempotent endpoints let clients and gateways safely retry requests after timeouts without creating duplicate orders, charges, or records.
Event-driven architecture is a design approach where services communicate by producing and consuming events, such as order placed or subscription canceled, rather than calling each other synchronously. Consumers react to events independently, which decouples systems and improves resilience.
Ready-to-Use Edge Recipes
Instead of Frontend / Web firing serial fetches to REST API, one pipeline hits https://jsonplaceholder.typicode.com/users/{{query.userId}} (and sibling steps) in parallel and returns mapped JSON.
Edge receives Paddle webhook and updates Supabase in one flow. For "paddle webhook and supabase user sync edge", store PADDLE_API_KEY, SUPABASE_SERVICE_ROLE_KEY in Secret Vault, call https://api.paddle.com/subscriptions/{{query.subscriptionId}} from a Worker, and let Any Frontend / Mobile hit only https://realcomposer.com/v1/workspace/paddle-webhook-supabase-sync-edge with an rc_live_ client token.