Webhooks

Subscribe to events from your store and receive a signed request at your own URL as soon as they happen.

Creating a subscription

At Dashboard → Webhooks, enter the URL that should receive the events, choose which events to subscribe to, and optionally set a secret — it is used to sign every request, so whoever receives it can confirm it really came from Sellitex.

Each store can have up to 10 subscriptions. Before saving, the test button sends a signed webhook.test event to the URL, with store null and an empty data — use it to confirm your endpoint answers 2xx.

Available events

EventDescription
order.createdOrder placed
order.paidOrder paid
order.refundedOrder refunded
order.cancelledOrder cancelled
ticket.createdTicket opened
ticket.repliedTicket replied to
review.createdReview left
product.createdProduct created
product.updatedProduct updated
product.deletedProduct deleted

order.cancelled exists to match the order statuses, but no flow cancels orders today — the event is not fired yet.

Request format

Every delivery is a POST with a JSON body in the following format:

JSON
{
  "event": "order.paid",
  "store": "minha-loja",
  "data": {
    "order_id": 123,
    "number": "A1B2C3D4E5",
    "status": "paid",
    "total": 4990,
    "currency": "BRL",
    "buyer_email": "[email protected]"
  },
  "timestamp": "2026-08-19T14:32:00+00:00"
}

The shape of data varies by event — see the fields of each one below.

data fields by event

Money amounts come in cents, as in the API. In order.created, source says where the order came from: storefront (the store) or discord (the bot).

EventFields
order.createdorder_id, number, status, total, currency, buyer_email, source
order.paidorder_id, number, status, total, currency, buyer_email
order.refundedorder_id, number, status, total, currency, buyer_email
order.cancelledorder_id, number, status, total, currency, buyer_email
ticket.createdticket_id, subject, order_number
ticket.repliedticket_id, subject
review.createdreview_id, product_id, rating
product.createdproduct_id, name, slug
product.updatedproduct_id, name, slug
product.deletedproduct_id, name, slug

Headers

Every delivery arrives with Content-Type: application/json and with X-Sellitex-Idempotency-Key, which is the same across every attempt of one delivery. Because of retries, an event may arrive more than once or out of order — store the key and ignore a delivery you have already processed.

HTTP
POST /webhooks/sellitex HTTP/1.1
Content-Type: application/json
X-Sellitex-Idempotency-Key: webhook-delivery:9876
X-Sellitex-Signature: 5d41402abc4b2a76b9719d911017c592...

Verifying the signature

When a secret is configured, every request arrives with the X-Sellitex-Signature header: an HMAC-SHA256, in hexadecimal, of the exact request body, computed with your secret. To refuse replays, also verify X-Sellitex-Signature-V2: the same HMAC computed over the X-Sellitex-Timestamp value (Unix seconds), a dot and the body, and reject requests older than 5 minutes.

PHP
$payload = file_get_contents('php://input');
$expected = hash_hmac('sha256', $payload, $webhookSecret);

// Right after a secret rotation, the old secret signs a second header.
$signatures = array_filter([
    $_SERVER['HTTP_X_SELLITEX_SIGNATURE'] ?? '',
    $_SERVER['HTTP_X_SELLITEX_SIGNATURE_PREVIOUS'] ?? '',
]);

$valid = false;
foreach ($signatures as $signature) {
    $valid = $valid || hash_equals($expected, $signature);
}

if (! $valid) {
    http_response_code(401);
    exit;
}
JavaScript
const crypto = require('crypto');

const expected = crypto
  .createHmac('sha256', webhookSecret)
  .update(rawBody)
  .digest('hex');

const signatures = [
  req.headers['x-sellitex-signature'],
  req.headers['x-sellitex-signature-previous'],
].filter(Boolean);

const valid = signatures.some((signature) =>
  signature.length === expected.length &&
  crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected)),
);

if (!valid) {
  return res.status(401).end();
}
Compare the signature with a comparison function that is safe against timing attacks (hash_equals in PHP, or a fixed-size buffer comparison in other languages) — never with ==.

Rotating the secret in the panel signs every delivery with the new secret at once, and for 24 hours also with the old one in X-Sellitex-Signature-Previous. Accept either header, as in the examples above, and a rotation never drops an event.

Retries

Your endpoint has 10 seconds to answer, and redirects are not followed — a 3xx counts as a failure. If the response is not a success (a status between 200 and 299), the delivery is tried again with an increasing interval: 5 minutes, then 30 minutes, then 2 hours — up to 4 attempts in total.

After the fourth failure, the delivery is marked as permanently failed and whoever manages the store's integrations is notified. At Dashboard → Webhook deliveries you can see the body sent and the response received for each delivery, and resend one manually.

A URL pointing to a private or internal address is refused without any attempt, and the delivery goes straight to permanently failed. The store's plan may also cap how many deliveries go out per minute — above that, they wait their turn without counting as an attempt.