Overview
Webhook Delivery explains how Streams sends events to your backend, from the moment an on-chain event occurs to when your server successfully processes it. Moralis Streams is designed for high reliability at scale, handling retries, reorgs, confirmation logic, and backpressure automatically - so you can focus on building application logic. This page covers delivery behavior. For payload structure, configuration, or retries, see the linked pages below.How Webhook Delivery Works
At a high level:- A block is produced on-chain
- Streams detects matching events
- Moralis sends a webhook to your endpoint
- Delivery is retried automatically if it fails
- Events are finalized once the block is confirmed
Confirmed vs Unconfirmed Webhooks
For most blockchain events, Streams delivers two webhooks:1. Unconfirmed (confirmed: false)
- Sent as soon as the block is mined
- Low latency
- Block may still be reorganized
2. Confirmed (confirmed: true)
- Sent after sufficient confirmations
- Safe to persist as final state
Edge case: In rare scenarios, a confirmed webhook may arrive before the unconfirmed one. Your system should handle both cases gracefully.
Delivery Guarantees
Moralis provides at-least-once delivery for all webhooks. This means:- A webhook will be delivered until your server acknowledges it
- Failed deliveries are retried automatically
- Duplicate deliveries are possible (and expected)
Automatic Retries
If your server fails to respond successfully:- Streams retries delivery using an exponential backoff schedule
- Retries continue for up to 24 hours
- Retry count is included in the payload
Queueing & Backpressure
To protect system stability, Streams maintains an internal delivery queue per webhook URL. Key points:- If your server processes webhooks too slowly, events queue up
- The current queue size is sent in the
x-queue-sizeresponse header - If the queue reaches its limit, the stream may enter an error state
- Ensure your webhook endpoint responds quickly
- Offload heavy processing to background workers
- Deploy streams in a region close to your backend
Ordering Guarantees
Webhook delivery is not strictly ordered. This can happen due to:- Network retries
- Regional failover
- Confirmed vs unconfirmed delivery timing
- Transaction hash
- Log index
- Block number
- Confirmation state
Failure States
Streams have multiple operational states:| Status | Description |
|---|---|
active | Stream is live and delivering webhooks |
paused | Stream is temporarily disabled |
error | Stream encountered a configuration or delivery error |
terminated | Stream was automatically stopped after 24 hours in error state |
- A stream enters error state
- A stream is terminated
Security & Verification
Every webhook includes anx-signature header.
You must verify this signature to ensure the payload originated from Moralis.
Signature verification is covered here Webhook Security.
When to Use Replays
If your system was down or missed events:- You can replay individual failed webhooks
- You can replay entire blocks for a stream
Common Next Steps
Depending on what you’re building:- Want to understand the payload structure? Explore Webhook Payload
- Need to handle retries or replays? Explore Retries & Replays
- Debugging stream failures? Explore Error Handling
- Hardening security? Explore Webhook Security

