Webhooks connect your systems to payment gateways, shops, CRMs, messaging platforms and SaaS tools. They look simple: another service sends an HTTP request when something happens. In practice they arrive late, twice, out of order, in bursts, or not at all if your server was down. A small amount of structure turns them from a source of mysterious bugs into dependable integration.
Receive: Verify, Store, Acknowledge
POST /webhooks/gateway
1. Read the raw body (before parsing) and verify the signature header.
2. Insert {event_id, source, type, payload, received_at} into webhook_events
(unique index on source + event_id).
3. Enqueue a job with the row ID.
4. Return 200 immediately.
- Verify signatures with the sender's secret; reject failures with 400 or 401.
- Use the raw request body for signature checks; re-serialised JSON may not match.
- Keep the handler fast; senders time out and retry if you are slow.
- If the unique insert fails because the event exists, return 200 anyway: it is a duplicate.
Process: Idempotent Workers
Workers pick up stored events and apply them (see our workers guide). Each handler must be safe to run more than once: check current state before acting, use database constraints, and record that the event was processed. A payment marked paid twice should stay paid once; an order shipped once should not ship again.
Ordering
Events can arrive out of order: "subscription cancelled" before "subscription renewed", for example. Compare event timestamps or version numbers with what you have stored, ignore older updates, and when in doubt fetch the current state from the sender's API rather than trusting the event alone.
Retries and Dead Letters
- Retry failed processing with exponential backoff.
- After a set number of attempts, move the event to a dead-letter state and alert.
- Provide a way to inspect and replay dead-lettered events after fixing the cause.
- Keep raw payloads for a retention period so you can reprocess them.
Staying Available
Senders retry for a limited time; long outages can lose events. Keep the receiver available during deploys with zero-downtime releases (see our zero-downtime guide), monitor it externally, and use the sender's dashboard or API to re-send events missed during an incident. For critical integrations, reconcile periodically by listing recent objects from the sender's API.
Security
- HTTPS only; signature verification on every request.
- Optional IP allow-listing if the sender publishes source ranges.
- Rate limiting to blunt floods of fake requests.
- Secrets stored in environment files, rotated when needed.
- No sensitive payload data in logs.
Monitoring
| Metric | What it tells you |
|---|---|
| Events received per source per hour | A sudden drop to zero often means the sender stopped calling you |
| Signature failures | Misconfigured secrets or attack attempts |
| Queue backlog and processing latency | Workers falling behind |
| Dead-lettered events | Bugs or unexpected payloads |
Alerts on these catch integration failures before customers do (see our monitoring guide).
Scaling
The receiver does little work, so one small server handles high volumes. Scale by adding worker processes or a worker server, partitioning queues by source or priority so payment events are never stuck behind bulk updates.
Testing
Use senders' test modes and replay tools, record real payloads (sanitised) as fixtures, and test duplicates, out-of-order delivery and failures in staging. A small local tool that replays stored events against your endpoint is invaluable.
Sizing
| Volume | Suggested setup |
|---|---|
| Up to tens of thousands of events per day | 2 vCores / 8 GB with workers on the same server |
| Hundreds of thousands per day | 4 vCores / 16 GB, or a separate worker server |
Common Mistakes
- Doing heavy work inside the request so the sender times out and retries.
- Skipping signature verification.
- Treating each delivery as unique.
- No alert when events stop arriving.
In Short
Verify, store and acknowledge quickly; process idempotently in workers with retries and dead letters; monitor arrival and processing; and keep the receiver available.
Example: Shop and Payment Webhooks
A store receives order webhooks from its storefront platform and payment webhooks from its gateway. Both land on the same small receiver, which verifies signatures, stores events with unique IDs and enqueues them. Separate queues mean payment events are processed within seconds even when a bulk catalogue update floods the order queue. A dashboard shows events received per source; when the gateway's webhooks stopped after a secret rotation, the drop to zero triggered an alert within fifteen minutes.
Next Steps
List every webhook source, add a stored-event table with unique IDs, move processing to workers, and add an alert for each source when events stop arriving. Document the setup in a short runbook covering where data lives, how integrations run, how to restore from backup and whom to contact, so the system stays dependable even when the person who configured it is unavailable or has moved on to another role. Review the setup every quarter with the people who use it, because needs change as the business grows, and small adjustments made early are far cheaper than large changes made under pressure. Before go-live, run a short pilot with a small group of real users and a realistic volume of data, collect their feedback on speed, reliability and everyday tasks, and fix what they report, because early fixes cost far less than changes made after everyone depends on the system.
SkyRainCloud Plans for This Workload
Webhook receivers are light; a 2 vCore / 8 GB server handles large volumes when processing happens in background workers. Scale workers, not the receiver, as event volume grows.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.