What it means
An online store receives a payment event from a processor, and a configured webhook sends event details to the store's server, which can check the payment and update the order, so the store should not rely on the browser returning to a success page as proof that payment settled. Stripe documents receiving webhook events and GitHub describes delivery best practices, but their exact retry and security mechanics vary by service, so always use the provider's current specification.
The sender defines event types and payloads while the receiver chooses an endpoint and what it does with a valid event, and a webhook differs from polling, where the receiver repeatedly asks whether anything has changed. "Near real time" is safer than promising instant delivery, since network and sender queues can introduce delay, and a recipient should acknowledge an event promptly under the provider's rules and process longer work safely.
Verify the sender using the provider's signing or authentication method, because a familiar-looking JSON body is not proof of origin, and store signing secrets securely and rotate them according to the integration guidance. Use HTTPS and restrict access appropriately, since the endpoint is a surface exposed to incoming requests.
Read the event identifier and make processing idempotent, so a retry does not create a second order, charge or customer message after the first succeeded. A timeout after a successful downstream write is especially risky, so check the current state before repeating the write, and do not assume events arrive in the order business actions happened but retrieve current source state when order matters.
Treat payload data as untrusted input by validating fields and avoiding letting text inside an event dictate unrelated actions. Some webhook payloads contain only a reference, so fetch the authoritative object when the workflow needs current details rather than relying on a stale snapshot.
A payment-intent event and a settled-payment outcome may be different, so use the event that matches the business decision. A webhook can trigger a draft, inventory update or notification, but each downstream effect still needs its own authorization and checks, and if several systems depend on the event, each result should be tracked separately because one successful receipt does not mean every consumer succeeded.
Log receipt, verification, processing result and errors with privacy-safe detail, and do not expose customer personal data in logs or error messages merely because it arrived in a webhook. Set an alert for failed deliveries or growing queues, because an endpoint that silently drops events can leave orders, subscriptions or inventory records stale, and plan replay or reconciliation when the endpoint was down, since a daily comparison with the source can catch missed updates.
Avoid a chain of retries that overwhelms a failing service by using backoff and dead-letter handling where appropriate. Version the handler and test against changes in the provider's payload schema, and for development use the provider's test mode or safe fixtures and verify that the test endpoint cannot change live records.
Document endpoint ownership, event subscriptions and a fallback path before the original developer leaves, and use exact event IDs, source timestamps and correlation IDs where available for audit and troubleshooting. Check whether the provider can resend events manually and how long event history is retained, because a well-run webhook workflow verifies, deduplicates, processes and reconciles, rather than trusting one incoming request blindly.
In practice
Real-world examples.
Example
A payment processor sends an event that prompts the store to verify current payment status before marking an order paid. The order stays pending until the check confirms that funds settled.
Example
A duplicated delivery carries the same event ID, so the receiver skips a second inventory decrement. The log records the repeat as a duplicate rather than an error.
Example
A failed endpoint replays events after recovery and reconciles against the provider's current records. The finance team compares the order list with the provider's payment report to confirm that nothing was missed.
Formula
Calculation
No standard webhook formula exists. One reliability measure is successfully verified and processed unique events / eligible unique events sent, with retry and reconciliation rules stated.
Worked example. A store's payment provider sends 2,000 unique events in a month. The endpoint processes 1,970 on first delivery, a replay after a short outage recovers 25 more, and 5 remain unresolved.
- First-delivery reliability = 1,970 / 2,000 x 100 = 98.5%.
- After replay and reconciliation = (1,970 + 25) / 2,000 x 100 = 99.75%.
The 5 unresolved events are compared with the provider's records and fixed by hand, so the store reports both figures rather than only the better one.Case study
Seen in the real world.
In this fictional case, Birch Shop processed the same payment event twice after a timeout and sent duplicate confirmation emails. It added event-ID deduplication and a status check, then tested replay. The case is invented and has no real customer effect.
Birch also added a daily reconciliation that compares orders marked paid with the payment provider's settled list. In the first week the check found one order waiting for an event that had been rejected because the signing secret had been rotated on only one server. The team fixed the configuration and added an alert for rejected signatures, so a similar problem would be noticed within the hour.
Watch out
Common mistakes.
- Trusting an unsigned event body as authoritative.
- Assuming delivery order or exactly-once processing.
- Treating receipt of a notification as proof the downstream action succeeded.
Questions
People also ask.
Is a webhook an API?
It is an event-driven request to an endpoint, often built using web API conventions.
Can it arrive twice?
Yes. Design processing to be safe under retries and duplicates.
What if it is missed?
Use delivery logs, replay where available and reconciliation with the source.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%