Your server, told first.
A signed POST to your URL when a chain event you named lands. Retried while your server is down, rolled back when a fork orphans the block.
$10 per 1M events · plus your stack, $5/mo minimum
Signed in every format
Every delivery carries an ed25519 signature, whatever body shape you pick. Check it with one published public key.
Forks undo themselves
A reorg sends one rollback listing everything that may have reached you, so your state follows the chain back.
Failures you can read
The last 100 attempts, with a diagnosis. Failed events wait for you to resend them, so nothing is silently dropped.
One command, no subgraph to deploy
Name the events you care about and the URL to send them to. It starts at the chain tip, and the signing secret prints once.
Two lines before you trust a body
The default format carries a per-webhook HMAC. Every format also carries our ed25519 signature over the delivery id and raw body, so a payload from anyone else fails both.
4bytes as received
5ours, or it is a 401
8typed from here
When a fork orphans a block, you hear about it
The rollback names the fork point and lists every event that may have arrived, including ones whose response never made it back. Undo each entry and your state matches the chain again.
5undo everything after this
Counted when an event is delivered. Your webhooks run on your hosted stack, which bills memory plus storage. Webhooks only: $5/mo minimum while your stack runs. Pause or delete every webhook and it stops within minutes.
Nor the rows we read to match your triggers. A flaky receiver never raises the bill.
Every event Stacks emits, and the protocols on top
Each trigger accepts only the fields that make sense for it, so a typo is a 400 at create time instead of a webhook that never fires.
STX
liveFilter by sender, recipient, or an amount range.
Tokens
liveScope to one asset, or to every SIP-010 or SIP-009 token at once.
Contracts
liveMatch function names with swap-*, or every print from one contract by topic.
sBTC
liveSwept-confirmed fires once, when the sweep reaches 6 Bitcoin confirmations.
Runes
rolling outBy rune id or name, on Bitcoin blocks from 840,000.
PoX-5
liveStacking prints by topic, such as register-for-bond, as they land.
Your server will go down. Here is what happens next.
Retried, then held
Failed deliveries retry with backoff, up to 7 times hosted. After that the circuit opens so one dead endpoint can't block the queue, and the events wait for you.
secondlayer webhooks dead amm-swaps
secondlayer webhooks requeue amm-swaps <id>Diagnosed in plain numbers
Five fixed rules read your last 100 attempts: rate-limited, down, rejecting, slow, or lag on our side. Each one shows the evidence it fired on.
secondlayer webhooks doctor amm-swapsReplayed on purpose
Re-deliver up to 100,000 historical blocks over the same webhook. Replays are flagged, idempotent, and never move the live cursor.
secondlayer webhooks replay amm-swaps \
--from-block 9100000 --to-block 9137000Arrives in the shape your stack already reads
The same event data in every format, under the key that format expects. Pick one per webhook.
Same chain, other surfaces. The difference is who holds the state.
You hold the cursor
Best when you already run a consumer and would rather pull than be pushed to.
Streams →You ask, we answer
Best for history and lookups: every event from genesis, typed, behind one key.
Index →We hold the table
Best when the shape is settled and you want rows to query, not events to process.
Subgraphs →Run it yourself
Hosted webhooks run on api.secondlayer.tools, one isolated stack per account. On your own box the same CLI, SDK and delivery semantics apply, with your limits instead of ours, and Runes triggers already work there.
Webhooks questions
Are deliveries ordered?
(tx_id, event_index, block_hash) and don't assume arrival order matches chain order.What happens on a reorg?
chain.reorg.rollback listing every event that may have reached you from the orphaned blocks. Undo each one. Anything above the finalized height, six Bitcoin confirmations back, is provisional.Can a new webhook backfill history?
Do I pay for retries?
How do I know a delivery came from you?
webhook-id.rawBody, checkable against our published public key. The default format adds a per-webhook HMAC on top.