Software

Webhook vs. API: The Same Order Tracked Both Ways

Polling an API asks for changes on a schedule; a webhook pushes each change to you. Compare requests and delay for one order flow in a calculator.

An API is the interface you call to ask a service for data or to make it do something. A webhook is the reverse direction: the service calls you when something changes. They are not alternatives so much as partners: you use the API to read and write, and webhooks to learn when to read. The real choice is between polling the API for changes and receiving webhooks.

The same order, tracked two ways

Your shop sends orders to a fulfilment partner. Each order goes through three status changes: accepted, packed, shipped. You want to email the customer at each step.

With polling, your server asks the partner’s API for the status of every open order on a schedule:

GET /v1/orders/ord_42      → {"status":"accepted"}
GET /v1/orders/ord_42      → {"status":"accepted"}   (no change)
GET /v1/orders/ord_42      → {"status":"packed"}     (changed: send email)
… repeated every interval until the order closes

With a webhook, you register a URL once and the partner POSTs each change:

POST /webhooks  {"type":"order.packed","order_id":"ord_42"}   → 200
Try itChange the volume and polling interval to compare the request counts and detection delay.

Polling: 576,000 requests/day · Webhooks: 600 deliveries/day

Polls per order while open
2,880
Polls that find no change
575,400 (99.9%)
Average delay before you notice a change
30 s with polling vs. typically under a few seconds with a webhook

Assumes one status request per open order per interval, the simplest polling design. Batch endpoints reduce the request count but not the detection delay.

With the defaults (200 orders a day, polled every 60 seconds while open for 48 hours, three changes each) the calculator gives 576,000 polling requests a day versus 600 webhook deliveries, and more than 99.8% of the polls find nothing new. Polling more often cuts the delay but multiplies the requests; polling less often saves requests but leaves customers waiting.

Comparison

Polling the APIWebhook
Who starts the requestyour systemthe provider
Delayup to one polling intervalusually seconds
Wasted requestsmost polls return “no change”none
Rate limitseasy to hit at scale (429 responses)not an issue for you
Needs a public endpointnoyes, HTTPS, reachable by the provider
Failure handlingyou retry your own callsprovider retries; you must deduplicate
Missed eventsimpossible, you see current statepossible if retries run out; reconcile periodically
Works behind a firewallyesonly with an inbound route or tunnel

Use both

A robust integration typically combines them:

  1. Webhook as the trigger. Receive order.packed, verify its signature, and acknowledge quickly. The webhook guide covers signing, retries and duplicates.
  2. API as the source of truth. Fetch the order from the API before acting, so out-of-order or duplicate events cannot put you in a wrong state.
  3. Occasional polling as a safety net. A nightly job that lists recently changed orders catches anything missed while your endpoint was down beyond the provider’s retry window.

When polling is the better choice

  • The provider does not offer webhooks.
  • You cannot expose a public HTTPS endpoint (strict corporate networks, local scripts).
  • Changes are constant, so nearly every poll finds new data anyway, and a batch “list changes since” endpoint is cheaper than thousands of individual events.
  • You only need the data occasionally, for example in a daily report.

Calls to the API, polling included, are authenticated with a key on your side; the API key guide shows what happens when that key is missing, expired or lacks a scope.

Sources

  1. Receive Stripe events in your webhook endpoint — Stripe Docs
  2. RFC 9110: HTTP Semantics — IETF
  3. RFC 6585: Additional HTTP Status Codes (429) — IETF

How we made this

Computed and checked by tests. Request counts come from a simple, stated model (one status request per open order per interval) implemented in the page's calculator; the figures quoted in the text are its outputs for the default values. Webhook delivery behaviour is cited from Stripe's documentation.

Performed by Claude, an AI assistant working in the BinConvert repository (Node.js 25), November 16, 2026.

This article was drafted with AI assistance. Every example, calculation and command output on this page was re-run or checked before release; the quoted request counts were recomputed from the model. Review: automated test suite and source check, November 16, 2026.

Spotted an error? Tell us and we will correct it.

Copied to clipboard!