Skip to Content
StarsellDocs
Developers

Webhooks

Get a signed POST when something happens in a store - setting one up, event types, payloads, verifying X-Starsell-Signature, retries, the delivery log, tests, redelivery and secrets.

A webhook is an address of yours that Starsell POSTs to whenever one of the events you picked happens in the store: an order placed, a checkout abandoned, a product running low. Each POST carries the event as JSON, signed with the webhook's own secret, in the same shapes the store API answers with.

Webhooks are how n8n, Make, Zapier and your own servers hear about the store without polling. A store can have up to 20.

Set up a webhook

Managing webhooks needs the Settings permission in the store.

Add it

Go to Settings > API and webhooks and click Add webhook in the Webhooks card.

Point it at your endpoint

Paste the Endpoint URL, the full address starting with https://. In n8n, Make or Zapier, it is the URL their webhook trigger gives you. Add a Description if it helps the team know what it is for, such as "Abandoned cart flow in n8n".

Pick the events

Tick the events under Events, grouped by Orders, Checkouts, Customers and Products. Every event sends all of them, including types added later. Click Add webhook.

Copy the signing secret

The secret (whsec_...) appears once: "Signing secret. Copy it now: it is shown once." Store it where your receiver can read it, then click Done, hide the secret. If you lose it, make a new one.

Send a test

Click Send test on the webhook. The result shows at once and the delivery log opens.

With the API

POST /webhooks with a key that can edit, made by a member with the Settings permission. The answer is 201 and is the only time the API returns the secret.

curl -X POST "$BASE/webhooks" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/starsell",
    "events": ["order.created", "order.paid", "order.refunded"],
    "description": "Orders to the ERP"
  }'
{
  "data": {
    "id": "6f0c1d2e-8a4b-4c7d-9e3f-1b5a7c9d2e40",
    "url": "https://hooks.example.com/starsell",
    "events": ["order.created", "order.paid", "order.refunded"],
    "description": "Orders to the ERP",
    "active": true,
    "failing_since": null,
    "created_at": "2026-11-27T09:58:12.044Z",
    "updated_at": "2026-11-27T09:58:12.044Z",
    "secret": "whsec_7mJbX2qkV9cR4tYp1LwN8sZf3HdG6uEa0oKiQ5vBnTj"
  }
}
  • events takes 1 to 40 types from the list below, or ["*"] for every event. A list that contains * is saved as just ["*"].
  • Send an Idempotency-Key header to make a retry safe: a repeat with the same key within 24 hours answers with the webhook made the first time, secret included, instead of making a second one. See Retrying safely.
  • url is saved in its normal form, so https://Hooks.Example.com comes back as https://hooks.example.com/.
  • A webhook gets events that happen after it was made. It is not sent older ones.

PATCH /webhooks/{webhookId} changes url, events, description or active. DELETE removes it. See the reference.

Endpoint rules

Starsell checks the URL when you save it and again right before every delivery:

  • https:// only. A plain http:// URL is refused with "Use an https URL": over http the body and its signature would travel in the clear. (A development install of Starsell also takes http://localhost and http://127.0.0.1, for a receiver on the same machine.)
  • No user name or password in the URL. Put a token in the path or query if your receiver needs one, and verify the signature anyway.
  • Port 80, 443, or one above 1023.
  • The host must resolve, and only to public addresses. localhost, names ending in .local, .internal or .home.arpa, and private, loopback, link-local and other reserved IP ranges are refused, for IPv4 and IPv6.
  • Up to 2000 characters.
  • Redirects are not followed. A 3xx answer counts as a failed delivery.

To test a receiver on your own machine, expose it with a tunnel (ngrok, Cloudflare Tunnel) and use the tunnel's public URL.

Event types

Pick types one by one, or * for every event. The same list drives automations and the events feed.

Orders

TypeAdmin labelSent whendata
order.createdOrder placedA customer places an order on the storefront, or a member adds one by hand in the admin.order, customer
order.paidOrder paidAn order is placed already paid (a card payment, or a test payment in test mode), or a pending order is marked paid in the admin or with PATCH /orders.order, customer
order.shippedOrder shippedAn order is marked shipped, with its tracking number when there is one. Changing the tracking number later doesn't send it again.order, customer
order.deliveredOrder deliveredAn order is marked delivered. Its status becomes fulfilled.order, customer
order.cancelledOrder cancelledAn order is cancelled. Only unfulfilled orders can be.order, customer
order.refundedOrder refundedAn order is marked refunded.order, customer, refund

order is the full order object as it is right after the change. customer is { email, phone, name, first_name }. On order.refunded, refund is { amount_minor, currency, test }: the order's total, and test: true when it was a test payment, so no card is credited.

Sending an order to the supplier and marking it returned change the order but send no event.

Checkouts

TypeAdmin labelSent whendata
checkout.startedCheckout startedA visitor with items in the cart types an email or phone at checkout, and Starsell saves the checkout. Once per checkout.checkout, customer
checkout.abandonedCheckout abandonedA checkout with contact details and items has been quiet for the store's waiting time (60 minutes unless changed under Settings > Checkout > Abandoned checkouts). Checked every minute. Once per checkout, even if the visitor comes back and leaves again.checkout, customer
checkout.recoveredCheckout recoveredSomeone opens the recovery link of an abandoned checkout. Once per checkout.checkout, customer
checkout.convertedCheckout convertedThe checkout became an order.checkout, customer, order

checkout is the checkout object. Its url is the recovery link: it restores the cart and opens checkout, which is what an abandoned cart reminder links to. customer here adds marketing_consent, whether they ticked to get offers. On checkout.converted, order is short: { id, number, label, total_minor, currency }. See Abandoned checkouts.

Customers

TypeAdmin labelSent whendata
customer.first_orderFirst orderAn order comes in from an email the store has never had an order from (or a phone, for orders without an email). Sent with the order's own events, after order.created.order, customer

Products

TypeAdmin labelSent whendata
product.createdProduct addedA product is added to the store.product
product.updatedProduct changedA product's details, status, price or stock change: in the admin, from Starsell AI, over MCP or with PATCH /products.product, changes
product.low_stockLow stockA version's tracked stock falls from above the store's low stock level to it or below: Alert when this many are left in Settings > Notifications, 3 by default. threshold is the level used.product, variant, threshold
product.out_of_stockOut of stockA version's tracked stock falls from above 0 to 0 or below.product, variant, threshold

product is the product object with all its versions. changes is a list of what changed, in words, when Starsell knows (["Changed the price of Linen throw (Sand) from ₪109 to ₪99"]); it can be missing. On the stock events, variant is the version that crossed, with previous_stock, and threshold is 3 or 0. A drop straight from 5 to 0 sends both, low first. Versions whose stock isn't tracked never send them.

The request

Each delivery is one POST. The OpenAPI document describes the body as the WebhookEvent schema.

POST /starsell HTTP/1.1
Host: hooks.example.com
Content-Type: application/json
User-Agent: Starsell-Webhooks/1.0
X-Starsell-Signature: t=1795802361,v1=4ff8ae1b55f65eaa54aee6e7ad984d03ce3c2aaa9669816021aa8c521b9429b1
X-Starsell-Event: order.created
X-Starsell-Delivery: 8812

{"id":"4182","type":"order.created","created_at":"2026-11-27T10:14:03.512Z","store":{"id":"3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93","name":"Lumen Home","slug":"lumen-home"},"data":{"order":{...},"customer":{...}}}
HeaderValue
X-Starsell-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>. See Verify the signature.
X-Starsell-EventThe event type, the same as type in the body.
X-Starsell-DeliveryThe delivery id: one per webhook and event. Retries and redeliveries send the same id.
User-AgentStarsell-Webhooks/1.0

The body

{
  "id": "4182",
  "type": "order.created",
  "created_at": "2026-11-27T10:14:03.512Z",
  "store": { "id": "3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93", "name": "Lumen Home", "slug": "lumen-home" },
  "data": { "order": {}, "customer": {} }
}
FieldDescription
idThe event id, as a string. The same across retries, and the same for every webhook that gets this event. It is the id in /events too.
typeThe event type.
created_atWhen the event happened.
store{ id, name, slug } of the store, so one endpoint can serve several stores.
testtrue on test deliveries. Missing on real ones.
dataThe payload. Its fields depend on the type.

Payload examples

Order placed

{
  "id": "4182",
  "type": "order.created",
  "created_at": "2026-11-27T10:14:03.512Z",
  "store": { "id": "3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93", "name": "Lumen Home", "slug": "lumen-home" },
  "data": {
    "order": {
      "id": "b5e1c9a7-2d4f-4a8b-9c3e-7f0d1a6b2e58",
      "number": 1042,
      "label": "#1042",
      "status": "open",
      "payment_status": "paid",
      "fulfillment_status": "unfulfilled",
      "currency": "ILS",
      "subtotal_minor": 21800,
      "shipping_minor": 2900,
      "tax_minor": 3768,
      "tax_included": true,
      "total_minor": 24700,
      "channel": "online",
      "tracking": null,
      "test": false,
      "customer": { "email": "[email protected]", "phone": "+972501234567", "name": "Dana Levi", "first_name": "Dana" },
      "shipping_address": { "line1": "Herzl 12", "city": "Tel Aviv", "zip": "6100000", "country": "IL" },
      "note": null,
      "items": [
        {
          "id": "e7a2c4b1-5d8f-4e3a-9b6c-2f1d0a8e7c45",
          "product_id": "c2b7e9a4-1f3d-4c8e-9a6b-5d0f2e7c1a84",
          "variant_id": "0f4d8b2a-6e1c-4a9d-8b3f-7c5e2a0d9b16",
          "title": "Linen throw",
          "variant_name": "Sand",
          "quantity": 2,
          "price_minor": 10900,
          "image_url": "https://<admin host>/api/files/1d7e4b2a-6c9f-4a3e-8b5d-0f2c9e7a1b64",
          "parts": []
        }
      ],
      "item_count": 2,
      "status_url": "https://lumenhome.co.il/orders/b5e1c9a7-2d4f-4a8b-9c3e-7f0d1a6b2e58?token=q8Lr2mXv5NcT0bWk",
      "admin_url": "https://<admin host>/a/3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93/orders/b5e1c9a7-2d4f-4a8b-9c3e-7f0d1a6b2e58",
      "created_at": "2026-11-27T10:14:03.488Z",
      "updated_at": "2026-11-27T10:14:03.488Z"
    },
    "customer": { "email": "[email protected]", "phone": "+972501234567", "name": "Dana Levi", "first_name": "Dana" }
  }
}

status_url is the customer's own order page, safe to put in a message to them. channel is where the order came from: online, instagram, tiktok, synce or manual. parts lists what is inside a bundle line, per bundle.

Checkout abandoned

{
  "id": "4190",
  "type": "checkout.abandoned",
  "created_at": "2026-11-27T11:32:00.208Z",
  "store": { "id": "3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93", "name": "Lumen Home", "slug": "lumen-home" },
  "data": {
    "checkout": {
      "id": "a3d9f1c7-4b2e-4f8a-9c6d-0e5b7a1c3d92",
      "token": "Zr7qK1mXc9VbT4nWp2LsY8Hd",
      "url": "https://lumenhome.co.il/checkouts/Zr7qK1mXc9VbT4nWp2LsY8Hd",
      "status": "abandoned",
      "currency": "ILS",
      "subtotal_minor": 10900,
      "item_count": 1,
      "items": [
        {
          "product_id": "c2b7e9a4-1f3d-4c8e-9a6b-5d0f2e7c1a84",
          "variant_id": "0f4d8b2a-6e1c-4a9d-8b3f-7c5e2a0d9b16",
          "title": "Linen throw",
          "variant_name": "Sand",
          "quantity": 1,
          "price_minor": 10900,
          "image_url": "https://<admin host>/api/files/1d7e4b2a-6c9f-4a3e-8b5d-0f2c9e7a1b64"
        }
      ],
      "locale": "he",
      "market_id": null,
      "country": "IL",
      "marketing_consent": true,
      "customer": { "email": "[email protected]", "phone": null, "name": "Noa Cohen", "first_name": "Noa" },
      "order_id": null,
      "admin_url": "https://<admin host>/a/3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93/checkouts?sel=a3d9f1c7-4b2e-4f8a-9c6d-0e5b7a1c3d92",
      "created_at": "2026-11-27T10:29:41.776Z",
      "last_activity_at": "2026-11-27T10:31:12.390Z",
      "abandoned_at": "2026-11-27T11:32:00.190Z",
      "recovered_at": null,
      "converted_at": null
    },
    "customer": {
      "email": "[email protected]",
      "phone": null,
      "name": "Noa Cohen",
      "first_name": "Noa",
      "marketing_consent": true
    }
  }
}

Only send a reminder to someone whose marketing_consent is true, unless your law and your store's policy allow otherwise.

Low stock

{
  "id": "4195",
  "type": "product.low_stock",
  "created_at": "2026-11-27T12:05:44.031Z",
  "store": { "id": "3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93", "name": "Lumen Home", "slug": "lumen-home" },
  "data": {
    "product": {
      "id": "c2b7e9a4-1f3d-4c8e-9a6b-5d0f2e7c1a84",
      "handle": "linen-throw",
      "status": "active",
      "kind": "single",
      "title": "שמיכת פשתן",
      "titles": { "he": "שמיכת פשתן", "en": "Linen throw" },
      "type": "Throws",
      "tags": ["linen", "bedroom"],
      "source": "own",
      "currency": "ILS",
      "price_minor": 10900,
      "image_url": "https://<admin host>/api/files/1d7e4b2a-6c9f-4a3e-8b5d-0f2c9e7a1b64",
      "images": ["https://<admin host>/api/files/1d7e4b2a-6c9f-4a3e-8b5d-0f2c9e7a1b64"],
      "url": "https://lumenhome.co.il/products/linen-throw",
      "admin_url": "https://<admin host>/a/3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93/products/c2b7e9a4-1f3d-4c8e-9a6b-5d0f2e7c1a84",
      "variants": [
        { "id": "0f4d8b2a-6e1c-4a9d-8b3f-7c5e2a0d9b16", "name": "Sand", "sku": "LT-SAND", "price_minor": 10900, "compare_at_minor": null, "stock": 3, "position": 0 },
        { "id": "5b9e2c7d-1a4f-4d6b-8e3c-9f0a2d5b7e61", "name": "Slate", "sku": "LT-SLATE", "price_minor": 10900, "compare_at_minor": null, "stock": 14, "position": 1 }
      ],
      "created_at": "2026-09-14T08:10:22.517Z",
      "updated_at": "2026-11-27T12:05:44.009Z"
    },
    "variant": {
      "id": "0f4d8b2a-6e1c-4a9d-8b3f-7c5e2a0d9b16",
      "name": "Sand",
      "sku": "LT-SAND",
      "price_minor": 10900,
      "compare_at_minor": null,
      "stock": 3,
      "position": 0,
      "previous_stock": 5
    },
    "threshold": 3
  }
}

Verify the signature

Every delivery is signed with the webhook's secret. Check the signature before you trust a body: anyone who knows your URL can POST to it.

The header looks like this:

X-Starsell-Signature: t=1795802361,v1=4ff8ae1b55f65eaa54aee6e7ad984d03ce3c2aaa9669816021aa8c521b9429b1
  • t is the time the delivery was signed, in Unix seconds.
  • v1 is the HMAC-SHA256, in lowercase hex, of the string <t>.<raw body>: the t value, a dot, then the request body exactly as received. The key is the whole secret as a UTF-8 string, whsec_ included. Don't strip the prefix or base64-decode it.

To check it:

  1. Read the raw body bytes, before any JSON parsing. Parsing and re-serialising changes the bytes and breaks the match.
  2. Split the header on , and each part on the first =, to get t and v1.
  3. Compute HMAC-SHA256 of t + "." + raw body with the secret, as hex.
  4. Compare it with v1 in constant time.
  5. Refuse it if t is more than 5 minutes from your clock, in either direction.
starsell-webhook.ts
import { createHmac, timingSafeEqual } from 'node:crypto'
import express from 'express'

const SECRET = process.env.VITRINA_WEBHOOK_SECRET! // whsec_...
const TOLERANCE_SECONDS = 300

export function verifyStarsellSignature(secret: string, rawBody: Buffer | string, header: string | undefined): boolean {
  if (!header) return false
  const parts = new Map<string, string>()
  for (const piece of header.split(',')) {
    const i = piece.indexOf('=')
    if (i > 0) parts.set(piece.slice(0, i).trim(), piece.slice(i + 1).trim())
  }
  const t = parts.get('t')
  const v1 = parts.get('v1')
  if (!t || !/^\d+$/.test(t) || !v1) return false
  if (Math.abs(Date.now() / 1000 - Number(t)) > TOLERANCE_SECONDS) return false
  const expected = createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest('hex')
  const a = Buffer.from(expected)
  const b = Buffer.from(v1)
  return a.length === b.length && timingSafeEqual(a, b)
}

const app = express()

// express.raw keeps the body as bytes, so the signature can be checked.
app.post('/webhooks/starsell', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verifyStarsellSignature(SECRET, req.body, req.get('X-Starsell-Signature'))) {
    return res.status(401).end()
  }
  const event = JSON.parse(req.body.toString('utf8')) as {
    id: string
    type: string
    created_at: string
    store: { id: string; name: string; slug: string }
    test?: true
    data: Record<string, unknown>
  }

  // Answer within 10 seconds, then do the work.
  res.status(200).end()

  if (await alreadyHandled(event.id)) return // your own store of handled ids
  await handle(event)
})

In a Web Request handler (Next.js route handlers, Bun, Deno, Hono, Cloudflare Workers), read the body with await request.text() and pass that string as rawBody. Read it once, verify, then JSON.parse the same string.

Timestamp tolerance

t is set when each attempt is signed, not when the event happened, so retries a day later still carry a fresh t. A 5-minute tolerance refuses replays of an old captured request without refusing real retries. Keep your server's clock synced (NTP); a clock that is minutes off fails every delivery.

Test your verifier

Sign a body yourself with the same formula and send it to your local receiver:

SECRET='whsec_your_secret'
BODY='{"id":"1","type":"webhook.test","created_at":"2026-11-27T10:00:00.000Z","store":{"id":"s","name":"Test","slug":"test"},"test":true,"data":{}}'
T=$(date +%s)
SIG=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')

curl -X POST http://localhost:3000/webhooks/starsell \
  -H "Content-Type: application/json" \
  -H "X-Starsell-Signature: t=$T,v1=$SIG" \
  -d "$BODY"

Then change one character of BODY after signing: your receiver should answer 401.

Retries

A delivery succeeds when your endpoint answers any 2xx within 10 seconds. Anything else is a failure and is tried again: another status, 4xx included, a redirect, a timeout, a refused connection, or a URL that no longer passes the endpoint rules.

Starsell sends new deliveries every 10 seconds, so the first attempt goes out within about 10 seconds of the event. After a failure it waits 30 seconds, then doubles the wait each time, up to 3 hours between attempts, and keeps trying for a day:

AttemptWait before itAbout this long after the event
1-10 seconds
230 seconds30 seconds
31 minute1.5 minutes
42 minutes3.5 minutes
54 minutes7.5 minutes
68 minutes15 minutes
716 minutes30 minutes
832 minutes1 hour
964 minutes2 hours
10128 minutes4 hours 15 minutes
11 to 163 hours each7, 10, 13, 16, 19 and 22 hours

When the next wait would end more than 24 hours after the delivery was queued, Starsell gives up: the delivery is marked failed and not sent again on its own. You can still redeliver it. Times can run a few seconds late, since each attempt waits for the next 10-second round.

When your endpoint can't be reached at all (a timeout or a refused connection), the rest of that webhook's queued deliveries wait for the next round instead of each timing out in turn. Those don't count as attempts.

Order

Each webhook gets its deliveries one at a time, oldest event first, so when everything goes through you see order.created before order.paid. A retry doesn't hold back the queue, though: while one delivery waits for its next attempt, later events go out. To act in the right order, compare created_at, or the event id, which only grows.

Duplicates

You can get the same event more than once: a retry after your endpoint did the work but answered too late, or a redelivery. Every copy has the same id in the body and the same X-Starsell-Delivery header. Keep the ids you have handled and skip repeats.

Two webhooks that both get an event send it with the same id and different X-Starsell-Delivery ids.

Test deliveries

Send test in the admin, or POST /webhooks/{webhookId}/test, sends one delivery right away and answers with the result:

{
  "data": {
    "delivery_id": 8830,
    "type": "order.created",
    "ok": true,
    "response_status": 200,
    "response_body": "",
    "duration_ms": 184,
    "error": null
  }
}

What it sends:

  • With type in the body ({ "type": "checkout.abandoned" }), the store's latest real event of that type, as it was, with "test": true added. Without type, as from the admin's button, the first type the webhook gets is used.
  • When the store has no event of that type yet, or there is no type and the webhook gets every event, a short hello: type is webhook.test and data has a message and the webhook_id.
{
  "id": "4201",
  "type": "webhook.test",
  "created_at": "2026-11-27T12:20:31.902Z",
  "store": { "id": "3f6c2a8e-91d4-4b7a-a5e2-0c8d7b1f4e93", "name": "Lumen Home", "slug": "lumen-home" },
  "test": true,
  "data": {
    "message": "A test from Lumen Home on Starsell. Real events look like this, with the order, checkout or product under data.",
    "webhook_id": "6f0c1d2e-8a4b-4c7d-9e3f-1b5a7c9d2e40"
  }
}

A test has its own event id, so it never collides with the real event it copies. It is tried once, never retried, goes out even when the webhook is off, and doesn't count toward a webhook failing. Tests never appear in /events and never start automations. Check test and skip side effects you don't want, such as sending a real email.

The delivery log

Click Log on a webhook to see its deliveries, newest first. The log refreshes every 10 seconds while open; Show older deliveries loads more. Each line shows the answer your endpoint gave (its status code, Failed, Retrying or Waiting), the event type, a Test badge for tests, the time it took, the number of tries and when it was sent. Click a line for the delivery id, the event id, its state ("Next try 14:05", "Delivered" or "Gave up") and the first 2000 characters of your endpoint's answer.

Each webhook's line also shows how many deliveries went out in the last 24 hours and how many failed.

The same log is in the API at GET /webhooks/{webhookId}/deliveries:

{
  "data": [
    {
      "id": 8812,
      "event_id": "4182",
      "event_type": "order.created",
      "test": false,
      "status": "pending",
      "attempts": 3,
      "response_status": 503,
      "response_body": "upstream unavailable",
      "duration_ms": 92,
      "next_attempt_at": "2026-11-27T10:17:35.000Z",
      "created_at": "2026-11-27T10:14:05.120Z",
      "sent_at": null
    }
  ],
  "pagination": { "limit": 25, "next_before": 8812, "has_more": true }
}
statusMeaning
pendingWaiting for its first attempt or its next retry (next_attempt_at).
sentYour endpoint answered 2xx.
failedStarsell gave up: a day of retries ran out, a test failed, or the webhook was turned off for failing.

When the request never got an answer, response_status is null and response_body holds the reason, such as "No answer within 10 seconds", "Could not connect: ..." or "Webhooks can only call public addresses, not private or local ones". The log keeps your endpoint's answer, so don't echo secrets or customer data back in it.

Deliveries are kept for 30 days, then deleted by a daily cleanup; one still waiting for a retry stays until it is sent or gives up. Deleting a webhook deletes its log at once. Events themselves are kept for 90 days: see How long events are kept.

Redeliver

Open a delivery in the log and click Redeliver, or call POST /webhooks/{webhookId}/deliveries/{deliveryId}/redeliver. It sends the same event again right away, whatever happened to it before, with the same delivery id and a fresh signature, and counts as one more attempt. If it fails while the delivery is still inside its day of retries, the retries carry on; after that it is marked failed again.

Use it after fixing a broken endpoint, for the deliveries that gave up.

Rotate the secret

In the webhook's ... menu, click New signing secret, or call POST /webhooks/{webhookId}/secret. The new secret is shown once.

The old secret stops at once

There is no overlap: from the moment you rotate, every delivery, retries of older events included, is signed with the new secret only. Deliveries that reach your receiver before it has the new secret fail its check.

To rotate without losing events, make your receiver answer 401 (not 200) when a signature doesn't match. Then rotate and update the receiver's secret within a few minutes: deliveries refused in between are retried and go through once the receiver has the new secret.

Turn a webhook off

In the webhook's ... menu, click Turn off, or PATCH /webhooks/{webhookId} with { "active": false }. Its line shows Off.

  • Events that happen while it is off are not queued for it. When you turn it back on, read what you missed from /events.
  • Deliveries that were already waiting for a retry stay waiting, and go out when you turn it back on.
  • Turn on, or { "active": true }, starts it again with a clean slate.

Delete in the same menu removes the webhook and its delivery log, after you confirm: "Delete the webhook to hooks.example.com? Its delivery log goes with it."

Failing webhooks turn off

When a real delivery fails, the webhook is marked failing (failing_since in the API, Failing in the admin, with "Failing since ... It turns off after 3 days without a delivery going through."). Any delivery that goes through clears it.

Once it has been failing for 3 days, the next failed delivery turns the webhook off. Starsell marks its waiting deliveries failed and adds a line to the store's activity log: "Turned off the webhook to hooks.example.com: no delivery went through for 3 days". Fix the endpoint, turn the webhook on, then fill the gap from /events or redeliver what you need.

Tips

  • Answer 200 first and do the work in a queue. Slow work trips the 10-second timeout and brings retries.
  • Use one webhook per receiver and pick only the events it needs. Every webhook has its own secret.
  • One endpoint for several stores: each store's webhook has its own secret. Read store.id from the parsed body to pick the secret, then verify against the raw bytes before you act on anything.
  • For n8n, Make and Zapier, the Examples card in Settings > API and webhooks has step-by-step setups. In Zapier, use Catch Raw Hook, which keeps the raw body for the signature.
  • Payloads are a snapshot at the time of the event. For the order as it is now, GET /orders/{orderId} with the data.order.id.

Related: API and webhooks settings, Events, Automations, Webhooks reference.

On this page