Webhooks let Sellfern notify your external systems in real time when events happen — new orders, status changes, fulfillment updates, expenses, and more. Instead of polling the API, you register an HTTPS endpoint and Sellfern delivers a signed POST request the moment an event occurs.Documentation Index
Fetch the complete documentation index at: https://docs.sellfern.com/llms.txt
Use this file to discover all available pages before exploring further.
Available events
Sellfern emits the following events. You can subscribe to any combination when registering a webhook endpoint.| Event | Description |
|---|---|
order.created | A new order has been created in Sellfern |
order.updated | One or more fields on an order have been updated |
order.status_changed | An order’s status has transitioned (e.g. New → Shipped) |
order.fulfillment.shipped | A fulfillment for an order has been marked as shipped |
order.fulfillment.delivered | A fulfillment has been confirmed as delivered |
expense.created | A new expense record has been added |
ticket.created | A new support ticket has been opened |
ticket.updated | An existing ticket has been updated |
Creating a webhook endpoint
Via the dashboard
In Sellfern, go to Settings → Webhooks and click New endpoint. Paste your HTTPS URL, select the events you want to receive, and save. Sellfern generates an endpoint secret you can use to verify incoming payloads.Via the API
Send aPOST request to /api/v2/webhooks with a url and an events array. Your token must have the webhooks:manage scope.
id and the generated secret you should store securely.
All webhook management endpoints require a token with the
webhooks:manage scope. Create or rotate tokens in Settings → API Tokens.Webhook payload structure
Sellfern sends aPOST request to your endpoint with a JSON body. The request includes two headers:
X-Sellfern-Event— the event name (e.g.order.status_changed)X-Sellfern-Signature— an HMAC-SHA256 hex digest of the raw request body, signed with your endpoint secret
order.status_changed:
X-Sellfern-Signature. Always use a constant-time comparison to prevent timing attacks:
Managing webhook endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v2/webhooks | List all registered endpoints for your organization |
PATCH | /api/v2/webhooks/:id | Update the URL, events, or enabled state of an endpoint |
DELETE | /api/v2/webhooks/:id | Delete an endpoint (pass ?confirm=<id> in the query string) |
POST | /api/v2/webhooks/:id/test | Send a test event to the endpoint |
GET | /api/v2/webhooks/:id/deliveries | Retrieve recent delivery attempts and their responses |
Example: Discord order tracking bot
Sellfern ships a ready-to-deploy Express server example that listens fororder.status_changed events and posts a formatted embed to a Discord channel.
Here is the core handler pattern:
Troubleshooting
Sellfern is not calling my endpoint
Sellfern is not calling my endpoint
Check that your URL is publicly reachable over HTTPS. Sellfern will not deliver to
localhost or self-signed certificates. Use a tunnelling tool like ngrok during development and ensure the endpoint returns a 2xx status code within the timeout window.Deliveries are timing out
Deliveries are timing out
Sellfern expects your endpoint to respond within 10 seconds. If your handler does heavy work, acknowledge the webhook immediately with a 200 response and process the payload asynchronously (for example, push it to a queue).
Failed deliveries and retries
Failed deliveries and retries
If your endpoint returns a non-2xx status or times out, Sellfern retries delivery with exponential backoff. You can inspect recent delivery attempts and their response codes in the dashboard under Settings → Webhooks → Deliveries, or via
GET /api/v2/webhooks/:id/deliveries.Signature verification is failing
Signature verification is failing
Make sure you are computing the HMAC over the raw request body before any JSON parsing. Many frameworks parse the body before your handler runs — you must capture the raw bytes separately (see the
verify option in Express’s express.json() middleware).