Skip to main content
A polling endpoint gives you the same stream of events as a webhook endpoint, but you fetch them with a GET request instead of storekit pushing them to a public URL. Each poll returns a batch of messages in the order they were received; you process the batch, commit how far you got, and the next poll continues from there.

When to Use Polling

Polling suits cases where a public HTTPS endpoint is awkward or unnecessary:
  • Local development — poll from your laptop without ngrok or a tunnel
  • Private networks — the consuming service must not be reachable from the internet
  • Batch processing — you want all of the day’s events at once, for example to archive orders for compliance or to reconcile payouts overnight
  • Systems that cannot receive HTTP — a cron job, a data pipeline or a script
If you need events within seconds of them happening, use a regular webhook endpoint. Polling and webhook endpoints can run side by side on the same account, filtered to the same or different event types.

Creating a Polling Endpoint

  1. Open Settings → Webhooks
  2. In the embedded webhooks portal, add a new endpoint and choose the polling endpoint type
  3. Select the event types you want to receive
  4. Save the endpoint
The portal then shows two things you need for every request:
The API key grants read access to every event the endpoint is subscribed to, including customer names and contact details in order payloads. Treat it like any other production secret.

Polling for Events

Send a GET request to the polling URL with your API key:
The response is a batch of messages. Each message’s payload is exactly the JSON body a webhook endpoint would receive — the { event, data } envelope from the payload format, or the top-level shape of the exceptions listed there — wrapped with message metadata and an offset:
Signature verification does not apply — the request is authenticated by your API key rather than a signed delivery.

Committing Your Position

After processing a batch, commit the offset of the last message you handled:
Until you commit, the same messages are handed out again once their lease expires. That is deliberate: if your worker crashes mid-batch, nothing is lost. It also means your handler must be idempotent — see Idempotency.

Consumer IDs

The {consumer_id} in the URL is a string you choose. Each consumer ID tracks its own position in the stream, so two consumers reading the same endpoint each receive every event.
  • Use a stable ID per worker (kitchen-archive, finance-reconciliation) so progress survives restarts
  • Never share one consumer ID between concurrently running clients. Two processes polling as the same consumer drift apart in the stream and the API returns errors
The stream starts when the polling endpoint is created. Events sent before that are not included.

A Typical Polling Loop

Run pollOnce() on whatever schedule fits — every few seconds for near-real-time, or once a night for a daily export.

Forwarding to a Private Service

If you would rather keep webhook-style HTTP delivery but your service is on a private network, run Svix Bridge inside that network. It polls the endpoint and forwards each message to an internal URL, RabbitMQ or Kafka, with retries when either side is temporarily unreachable. The polling endpoint’s page in the embedded portal includes a starter Bridge configuration with the app ID and endpoint ID filled in.

Setting Up Webhooks

Push delivery to a public HTTPS endpoint

Idempotency

Handle the same event more than once safely

Webhook Events

Every event type you can subscribe to

Testing Webhooks

Inspect deliveries and send test events