storekit webhooks are delivered with “at least once” semantics. This means if there are issues during delivery (e.g., network problems), a webhook may occasionally be delivered more than once.Documentation Index
Fetch the complete documentation index at: https://storekit.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The svix-id Header
Every webhook request includes asvix-id header. This ID is:
- Unique per message - Each distinct event gets a unique ID
- Consistent across retries - The same ID is used when retrying a failed delivery
Implementing Deduplication
To ensure you only process each event once, store thesvix-id and check it before processing:
When to Use Deduplication
Deduplication is especially important for:- Payment processing - Avoid charging customers twice
- Order creation - Prevent duplicate orders
- Inventory updates - Ensure accurate stock counts
- Notification sending - Don’t spam users with duplicate messages
Storage Options
You can store processed webhook IDs in:| Storage | Pros | Cons |
|---|---|---|
| Redis | Fast, built-in TTL | Requires Redis instance |
| Database | Already available | Slower, needs cleanup job |
| In-memory | Simplest | Lost on restart, not for distributed systems |
Even without deduplication, designing your webhook handlers to be idempotent (producing the same result when called multiple times) is a good practice.