Git Branching Strategy: Trunk-Based vs GitFlow for Teams
Trunk-based development or GitFlow? Compare Git branching strategies for outsourced and offshore teams, with a decision table and rules that keep releases safe.
A practical webhooks guide for product teams: how webhooks work, signature verification, retries, idempotency and monitoring for reliable integrations.
Sooner or later, almost every product needs to tell another system that something happened: a payment succeeded, an order shipped, a document was signed. Webhooks are the standard way to do it. They look simple, since it is just an HTTP request, yet they are one of the most common sources of silent data problems in integrations.
This guide explains how webhooks work and what a reliable implementation needs, whether you are sending webhooks to your customers or receiving them from a provider.
A webhook is an HTTP callback. When an event occurs in system A, it sends a POST request with a small payload to a URL that system B registered in advance. System B responds with a success status code, and that is the end of the exchange.
The alternative is polling, where system B repeatedly asks system A whether anything has changed.
| Webhooks | Polling | |
|---|---|---|
| Latency | Near real time | Depends on poll interval |
| Wasted requests | Few | Many (most polls find nothing) |
| Complexity for the receiver | Needs a public endpoint and security | Simple client code |
| Failure handling | Sender must retry | Receiver simply asks again |
Webhooks are usually the right default for event notifications. Polling remains useful as a safety net, which we come back to below.
If your product consumes webhooks from a payment provider, CRM or logistics service, treat the endpoint as a public door into your system.
Almost every webhook system offers at-least-once delivery. That means the same event can arrive twice, and event B can arrive before event A. Your code must cope with both.
Idempotency. Store the event ID (or a hash of the payload if there is none) in a table with a unique constraint. If you have already processed that ID, acknowledge it and do nothing. Make the handler’s effects safe to repeat, for example “set status to paid” rather than “add payment”.
Ordering. Do not assume arrival order reflects the order events happened. Use the event’s own timestamp or version number, and ignore updates older than what you already hold. For critical state, fetch the current object from the provider’s API when the webhook arrives and treat the webhook as a signal to look, not as the source of truth.
If you offer webhooks to customers or partners, you inherit the provider’s responsibilities. A good webhook feature includes:
Keep payloads small and stable. Many teams send a minimal event with an ID and let the receiver fetch details through the API, which also reduces the risk of leaking sensitive data in transit.
Use this list when reviewing an existing webhook integration:
That reconciliation job is the polling safety net mentioned earlier. Even well-run providers have outages, and a nightly comparison is far cheaper than discovering missing orders from a customer complaint.
Test webhooks like any other integration. Replay recorded payloads in your test suite, including duplicates, out-of-order sequences and malformed bodies. For third-party providers, use their sandbox and a tunnelling tool in development, but run a full end-to-end test in a staging environment too. Our API testing guide outlines how to structure these checks.
In production, track delivery success rate, processing latency, retry counts and the age of the oldest unprocessed event. A dashboard with those four numbers will catch most problems before users do.
Reliable webhooks are a mix of backend engineering, security and operational discipline. If you need a team to design or harden an event-driven integration, our web development services cover API design, third-party integrations and ongoing monitoring. If a live integration is already dropping events, our support and maintenance engineers can investigate and stabilise it. Contact us to discuss your project.
Trunk-based development or GitFlow? Compare Git branching strategies for outsourced and offshore teams, with a decision table and rules that keep releases safe.
Monorepo or polyrepo? Compare code repository strategies for web, mobile and backend products, with a decision table and tips for outsourced teams.
How to version and retire APIs without breaking clients: versioning options, breaking-change rules, sunset policies and a checklist for outsourced teams.
Tell us about your platform, your product idea or the systems you want to modernise. Someone from our Chennai engineering team will get back to you personally.