Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

tolt-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Tolt webhooks (affiliate and partner program software for SaaS, delivered via Svix). Use when setting up Tolt webhook handlers, debugging…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Tolt Webhooks

Tolt runs affiliate and partner programs for SaaS: partners, referral links, referred customers, transactions and commissions. It delivers webhooks through Svix, which implements Standard Webhooks. Every delivery is a signed JSON POST with three signature headers: svix-id, svix-timestamp, and svix-signature. The body is always { type, data, timestamp }: type is the event name, and data is the same resource the Tolt API returns, plus organization_id. Money fields are strings in cents ("980").

When to Use This Skill

  • How do I receive Tolt webhooks?
  • How do I verify Tolt webhook signatures (svix-signature)?
  • How do I handle commission.created or customer.created events?
  • How do I deduplicate Tolt webhooks (there is no event id in the body)?
  • Why is my Tolt webhook signature verification failing, or rejecting Hookdeck retries?

Verification (core)

Signed content is {svix-id}.{svix-timestamp}.{raw body}. Svix signs it with HMAC-SHA256 using the base64-decoded secret (the part after whsec_), base64-encodes the result, and sends one or more space-separated v1,<signature> entries. Use the official svix library, which compares in constant time. Read the svix-* headers, and when svix-id is absent fall back to the webhook-* headers (webhook-id, webhook-timestamp, webhook-signature).

import { Webhook } from 'svix'; // svix 2.x is ESM-only

const prefix = req.headers['svix-id'] ? 'svix' : 'webhook';
const id = req.headers[`${prefix}-id`];
const timestamp = req.headers[`${prefix}-timestamp`];
const signature = req.headers[`${prefix}-signature`];
// rawBody: the raw Buffer/string, never re-serialized JSON
new Webhook(process.env.TOLT_WEBHOOK_SECRET).verify(rawBody, {
  'svix-id': id, 'svix-timestamp': timestamp, 'svix-signature': signature,
  'webhook-id': id, 'webhook-timestamp': timestamp, 'webhook-signature': signature,
}); // throws on a bad signature or a timestamp outside the window
const event = JSON.parse(rawBody.toString('utf8')); // parse only after verify passes
from svix.webhooks import Webhook, WebhookVerificationError

wh = Webhook(os.environ["TOLT_WEBHOOK_SECRET"])  # "whsec_..."
wh.verify(raw_body, {"svix-id": id, "svix-timestamp": ts, "svix-signature": sig,
                     "webhook-id": id, "webhook-timestamp": ts, "webhook-signature": sig})

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Each endpoint gets its own secret under Settings > Webhooks in the Tolt dashboard; it starts with whsec_. Keep the full whsec_... value in TOLT_WEBHOOK_SECRET. Handlers fail closed: with the variable unset they return 500 instead of accepting anything.

Hookdeck retries and replays hit the 5-minute window

The svix and standardwebhooks libraries always enforce a fixed 5-minute timestamp window, and it can't be configured. Hookdeck retries and replays resend the original svix-timestamp, so the library rejects any retry or replay that happens more than 5 minutes after the original delivery. If you verify behind Hookdeck (or replay old events), use the manual verifier in references/verification.md, where the window can be dropped or widened. Deduplicate on svix-id instead of relying on the timestamp.

Tolt also publishes an npm package, @tolt/webhooks (verifyWebhook({ payload, headers, secret }), Node 18+, 300-second default tolerance via toleranceInSeconds). It verifies the same Svix signature but its documented errors name only the svix-* headers, so the examples here use svix for the webhook-* fallback.

Common Event Types

10 events are documented: each of five resources has a .created and an .updated event (there are no delete events). The name is type in the JSON body.

Event Triggered When
partner.created A partner joins your program
partner.updated A partner's details change, they are approved, rejected or suspended, or tags are added or removed through the API
link.created A referral link is created
link.updated A referral link is edited
customer.created A referred visitor signs up and is bound to a partner
customer.updated A customer's details or status change (for example, a first payment makes them active)
transaction.created A payment is recorded for a referred customer
transaction.updated A payment is edited or refunded
commission.created A partner earns a commission
commission.updated A commission is approved, declined or edited (API refunds send transaction.updated instead)

See references/overview.md for the payload shape and delivery rules.

Delivery Semantics

  • Return 2xx quickly and do slow work afterwards. Failed or
Полный SKILL.md на GitHub

Установить tolt-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/tolt/route.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл tolt-webhooks?

Receive and verify Tolt webhooks (affiliate and partner program software for SaaS, delivered via Svix). Use when setting up Tolt webhook handlers, debugging svix-signature verification (whsec_ secret), deduplicating on svix-id, or handling events like partner.created, customer.created, transaction.created, and commission.created.

Как установить скилл tolt-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tolt-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить tolt-webhooks с