Documentation Index
Fetch the complete documentation index at: https://yieldxyz.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Webhooks allow you to receive real-time notifications when events occur in your Yield.xyz integration. The system is designed for reliability with at-least-once delivery, automatic retries, and per-subject ordering.At-least-once delivery
Guaranteed delivery with automatic retries
Per-subject ordering
Sequence numbers for event ordering
HMAC signing
Cryptographic verification of payloads
Comprehensive diagnostics
Delivery status and error tracking
Concepts
Endpoint
Endpoint
A customer destination URL + secret. This is where webhook payloads are delivered via HTTP POST.
Subscription
Subscription
Rules determining which events an endpoint receives:
events(resources): e.g.,transaction,balance,positionactions: e.g.,status_changed,amount_changed- Optional filters:
yield_id,address,network,balance_type
Event
Event
An immutable record of “something happened” — the payload we deliver.
Delivery
Delivery
A mutable work item representing one attempt to send one event to one endpoint.
How It Works
Events are emitted
When something happens (transaction confirmed, balance changed), an event is created
Dispatcher sends webhooks
A background worker claims deliveries and sends HTTP POST requests with HMAC signatures
Event Envelope
All webhook payloads use a consistent envelope format:Supported Events
| Resource | Action | Description |
|---|---|---|
transaction | status_changed | Transaction status updated (pending → confirmed → success/failed) |
balance | amount_changed | Balance amount changed |
balance | amount_increased | Balance increased (deposits, rewards) |
position | state_changed | Position lifecycle state changed |
rewards | sweep_eligible | Rewards ready to claim |
yield | metadata_changed | Yield metadata updated (APY, TVL) |
Signing & Headers
Every webhook request is an HTTP POST with JSON body and these headers:| Header | Description |
|---|---|
X-Yield-Delivery | Unique delivery ID |
X-Yield-Event | Resource type |
X-Yield-Action | Action type |
X-Yield-Timestamp | Unix timestamp (seconds) |
X-Yield-Signature | HMAC signature |
Signature Format
Verification Example
Delivery Semantics
At-Least-Once Delivery
Receivers may see the same event more than once. Dedupe using:event.id(recommended)X-Yield-Deliveryheader
Ordering
Events may arrive out of order. Use thesequence field (monotonic per subject) to:
- Reorder events
- Detect gaps
Retry Policy
| Attempt | Wait Time |
|---|---|
| 1 | 1 minute |
| 2 | 5 minutes |
| 3 | 15 minutes |
| 4 | 1 hour |
| 5 | 6 hours |
| 6–10 | 24 hours |
- Success: Any 2xx response
- Failure: Network errors, timeouts, non-2xx responses
- Max attempts: 10
- After max: Delivery marked as
dead
Delivery Lifecycle
| Status | Description |
|---|---|
pending | Created, ready for delivery |
sending | Claimed by dispatcher, in-flight |
delivered | Successfully delivered (2xx) |
retry_scheduled | Failed, will retry |
dead | Permanently failed after max attempts |
Configuration
Configure Webhooks
Set up webhook endpoints and subscriptions in your dashboard
Best Practices
Respond quickly
Return 2xx within 15 seconds to avoid timeouts
Deduplicate
Use event.id to handle duplicate deliveries
Verify signatures
Always verify HMAC signatures before processing
Handle ordering
Use sequence numbers to reorder events per subject
Next Steps
Quickstart
Complete integration guide
Staking Extensions
Advanced staking options

