Skip to main content
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.

The svix-id Header

Every webhook request includes a svix-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
Rarely, storekit itself can create the same event twice, for example when an internal retry follows a timeout. Those copies are separate messages with different svix-id values. If a duplicate would cause harm, also deduplicate one-off events on the event and the order, for example order.created.v2 plus the order id. Don’t do this for events that can legitimately repeat for the same order, such as order.refund.* (an order can have several refunds, even of the same amount) or order.rating.updated. Rely on svix-id for those. The order.refund.* payload has no refund ID, so if a rare duplicate refund event matters to you, reconcile against the order’s refunds in your storekit dashboard rather than matching on amount or reason.

Implementing Deduplication

To ensure you only process each event once, store the svix-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:
Set an expiry of at least 72 hours (3 days) on stored webhook IDs. Automatic retries run for about 28 hours under the retry schedule, but failed messages can be resent by hand at any time after that, so a resend after your expiry gets past this check. If that would cause harm, keep IDs for longer or make the handler itself idempotent.
Even without deduplication, designing your webhook handlers to be idempotent (producing the same result when called multiple times) is a good practice.