Skip to content

Search the docs

Jump to any page or section

Guides

Webhooks

Get a signed HTTPS request the moment an order starts, progresses, finishes or is refunded — instead of polling.

Setting up an endpoint

  1. Build an HTTPS endpoint that accepts POST requests with a JSON body and answers 2xx quickly. Verify each request as shown below.
  2. In Dashboard → Webhooks, add its URL and pick the events you want, or all of them.
  3. Copy the endpoint’s signing secret. It starts with whsec_; keep it on your server like an API key.
  4. Send a test event from the dashboard and check your endpoint received and verified it.

Each endpoint gets its own copy of every event it subscribes to. Disabled endpoints get nothing, and events aren’t queued for them while disabled.

Events

Webhook events
EventSent whendata
order.createdAn order was accepted and charged.data.order
order.startedDelivery began. Includes the start count.data.order
order.progressDelivery crossed 25%, 50% or 75%.data.order
order.completedThe full quantity was delivered.data.order
order.partialDelivery stopped early and the remainder was refunded.data.order
order.canceledThe order was canceled and fully refunded.data.order
refill.createdA refill request was accepted.data.refill
refill.completedA refill finished restoring dropped units.data.refill
refill.rejectedA refill request was rejected, with the reason.data.refill
balance.lowYour balance fell below your alert threshold.data.balance, data.threshold, data.currency
payment.succeededFunds were added to your balance.data.payment: id, amount, fee, method, status, balance_after, currency
  • data.order is the full order object, the same as GET /api/v3/orders/{id} returns. data.refill is the refill object.
  • order.progress fires once each at 25%, 50% and 75%. A small or fast order can cross several at once.
  • balance.low fires when a debit (usually an order charge) takes your balance from at or above your alert threshold to below it. Amounts are decimal strings with five places, such as "142.10000", like everywhere else in the API.

Payload

Every event has the same envelope:

POST to your endpoint
{
  "id": "evt_EUKJ9j3Frm9zlEUVxB",
  "type": "order.progress",
  "created": "2026-11-15T10:36:12.410Z",
  "data": {
    "order": {
      "id": 184610,
      "object": "order",
      "status": "in_progress",
      "status_label": "In progress",
      "status_reason": null,
      "service": {
        "id": 102,
        "name": "Followers — Premium, 30-day refill"
      },
      "link": "https://www.tiktok.com/@mila.makes",
      "target": {
        "kind": "profile",
        "username": "mila.makes"
      },
      "quantity": 1000,
      "runs": null,
      "interval": null,
      "total_quantity": 1000,
      "start_count": 28105,
      "delivered": 518,
      "remains": 482,
      "progress": 0.518,
      "rate": "2.20800",
      "list_rate": "2.40000",
      "discount_percent": 8,
      "charge": "2.20800",
      "refunded": "0.00000",
      "net_charge": "2.20800",
      "currency": "USD",
      "reference": "panel-48213",
      "source": "api_v3",
      "comments": null,
      "username": null,
      "estimated_completion_at": "2026-11-15T11:19:40.000Z",
      "cancel_requested_at": null,
      "refill": {
        "available": false,
        "reason": "Refill opens once the order is completed.",
        "window_ends_at": null
      },
      "cancel": {
        "available": true,
        "reason": null
      },
      "created_at": "2026-11-15T10:14:03.532Z",
      "started_at": "2026-11-15T10:21:40.049Z",
      "completed_at": null,
      "updated_at": "2026-11-15T10:47:02.792Z"
    }
  }
}
Envelope fields
FieldMeaning
idThe event ID (evt_…). The same on every retry and for every endpoint — use it to drop duplicates.
typeOne of the events above.
createdWhen it happened (ISO 8601, UTC) — the moment of the transition, not when we sent it.
dataThe objects involved.

data.order is the order as it stood when we recorded the event. Delivery keeps moving, so it can be a little ahead of the milestone that triggered it — a 50% event may already show 518 of 1,000 delivered.

Headers

Webhook request headers
HeaderValue
Content-Typeapplication/json
User-Agenttiksmm-webhooks/1.0
Tiksmm-EventThe event type, e.g. order.completed.
Tiksmm-DeliveryThis delivery’s ID (whd_…): one event to one endpoint. Shown in the dashboard’s delivery log.
Tiksmm-Signaturet=<unix seconds>,v1=<hex> — see below.

Verifying signatures

Anyone can POST to your URL, so check every request came from us. The signature is an HMAC-SHA256 of the timestamp, a period and the raw body, keyed with your endpoint’s secret:

Tiksmm-Signature: t=1794786741,v1=<hex>

v1 = hex( HMAC-SHA256( key = secret, message = t + "." + raw_body ) )
  1. Split the header on commas and read t and v1.
  2. Compute the HMAC over `${t}.${rawBody}` with the whole secret, including the whsec_ prefix. Use the body exactly as received — parsing and re-serializing the JSON changes it.
  3. Compare with a constant-time comparison.
  4. Reject timestamps more than a few minutes old to stop replays. Each retry is signed again with a fresh t, so a tolerance of five minutes never rejects a genuine retry.
import crypto from "node:crypto"
import express from "express"

const SECRET = process.env.TIKSMM_WEBHOOK_SECRET // the whole whsec_… string
const TOLERANCE_SECONDS = 300

function verify(rawBody, header) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")))
  const t = Number(parts.t)
  if (!t || Math.abs(Date.now() / 1000 - t) > TOLERANCE_SECONDS) return false
  const expected = crypto.createHmac("sha256", SECRET).update(`${t}.${rawBody}`).digest("hex")
  const a = Buffer.from(expected)
  const b = Buffer.from(parts.v1 ?? "")
  return a.length === b.length && crypto.timingSafeEqual(a, b)
}

const app = express()

// Use the raw body: re-serialized JSON won't match the signature.
app.post("/webhooks/tiksmm", express.raw({ type: "application/json" }), (req, res) => {
  const raw = req.body.toString("utf8")
  if (!verify(raw, req.get("Tiksmm-Signature") ?? "")) return res.sendStatus(400)

  res.sendStatus(200) // acknowledge first…
  const event = JSON.parse(raw)
  queue.add(event) // …then do the work (dedupe on event.id)
})

Check your implementation against this test vector:

Signature test vector
InputValue
Secretwhsec_test_8f2kQ
t1794786741
Body{"id":"evt_EUKJ9j3Frm9zlEUVxB","type":"order.completed","created":"2026-11-15T10:59:40.112Z","data":{}}
v19186e8516b558a37f3e3ef1739237b2e788689d95c95e14d2501e2d84f31ab55

Responding

  • Answer with any 2xx status to acknowledge. The body is ignored, though we keep the first 2,000 characters in the delivery log.
  • Respond within 10 seconds. Acknowledge first, then do slow work (database writes, emails, calls back to our API) in the background.
  • Anything else is a failure: a 3xx (we don’t follow redirects — register the final URL), 4xx, 5xx, a timeout or a connection error. The delivery log shows which, with your response.

Retries

A failed delivery is retried on this schedule — 6 attempts in all, the last one 8h 36m after the first:

Retry schedule
AttemptSentSince the first attempt
1Immediately—
21m after attempt 1 fails1m
35m after attempt 2 fails6m
430m after attempt 3 fails36m
52h after attempt 4 fails2h 36m
66h after attempt 5 fails8h 36m

After the last attempt the delivery is marked failed. You can resend any delivery — failed or not — from the dashboard, which sends the original payload with a fresh signature. Retries go out on the next dispatch cycle, so times can be a few seconds later than shown.

Duplicates and ordering

  • Expect duplicates. If your endpoint processed an event but timed out answering, we’ll send it again. Store the ids you’ve handled and skip repeats.
  • Don’t rely on order. Events due at the same time are sent in parallel, and retries arrive late. Compare created, or the order’s updated_at, before overwriting newer state with older.
  • Final statuses never change, so an order.completed, order.partial or order.canceled is always safe to apply.
  • When in doubt, fetch the order with GET /orders/{id} — it’s always current.

The built-in test receiver

To see real deliveries without deploying anything, point an endpoint at /api/dev/webhook-receiver on this server (relative URLs are resolved against the app’s own address). It acknowledges every POST with 200 and keeps the last 50 deliveries in memory, with their headers:

Read what it received (use your app’s address)
curl http://localhost:3000/api/dev/webhook-receiver
Response (one delivery)200OK
{
  "received": [
    {
      "at": "2026-11-15T10:36:13.808Z",
      "event": "order.progress",
      "delivery": "whd_iJNt3VNHl8xxUpHymr",
      "signature": "t=1794742573,v1=…",
      "body": {
        "id": "evt_EUKJ9j3Frm9zlEUVxB",
        "type": "order.progress",
        "created": "2026-11-15T10:36:12.410Z",
        "data": {
          "order": "…"
        }
      }
    }
  ]
}

The demo account comes with an endpoint pointed at this receiver, subscribed to every event. The list resets when the server restarts, and the receiver doesn’t check signatures — it’s for looking, not for production.

Something unclear or out of date? Write to [email protected] and quote the page.