charitystack-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify CharityStack webhooks. Use when setting up CharityStack webhook handlers, debugging X-Webhook-Signature verification (HMAC-SHA256 hex over…
от hookdeck★ 104 звезды на GitHubОб этом скилле
CharityStack Webhooks
When to Use This Skill
- How do I receive CharityStack webhooks?
- How do I verify the
X-Webhook-Signatureheader on a CharityStack webhook? - Why does my CharityStack webhook signature verification fail?
- How do I handle
donation.createdorsubscription.cancelledevents? - Where do I find the CharityStack webhook secret?
Setup note
CharityStack shows the webhook secret only once, when you create the webhook. Paste it here.
The secret is the secret field of the POST /v1/webhooks response. If you lose it, delete the webhook and create a new one. See references/setup.md.
Verification (core)
Every delivery carries three headers:
X-Webhook-Signature: sha256=<hex digest>
X-Webhook-Timestamp: <unix seconds>
X-Webhook-ID: <delivery identifier>
The signature is the lowercase hex HMAC-SHA256 of <X-Webhook-Timestamp>.<raw body>, keyed with the webhook secret's UTF-8 bytes (not hex- or base64-decoded). Build the message as bytes, never decode and re-encode the body, and don't parse the JSON before verifying. Accept the digest with or without the sha256= prefix, check it is exactly 64 hex characters, compare in constant time, and respond 401 on any failure.
const signed = Buffer.concat([Buffer.from(timestamp, 'latin1'), Buffer.from('.'), rawBody]);
const expected = crypto.createHmac('sha256', Buffer.from(secret, 'utf8')).update(signed).digest();
const digest = signature.startsWith('sha256=') ? signature.slice(7) : signature;
if (!/^[0-9a-fA-F]{64}$/.test(digest)) return false; // validate before decoding
return crypto.timingSafeEqual(expected, Buffer.from(digest.toLowerCase(), 'hex'));
signed = b"".join([timestamp.encode("latin-1"), b".", raw_body])
expected = hmac.new(secret.encode("utf-8"), signed, hashlib.sha256).digest()
digest = signature.removeprefix("sha256=")
if not re.fullmatch(r"[0-9a-fA-F]{64}", digest): # validate before decoding
return False
return hmac.compare_digest(expected, bytes.fromhex(digest))
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
CharityStack has no official webhook SDK, so verification is manual in every framework.
Timestamp tolerance is opt-in
CharityStack's guide suggests rejecting timestamps more than 5 minutes old. The examples do not do this by default: Hookdeck retries and replays resend the original headers and timestamp, so a fixed window would reject legitimate retries. Set CHARITYSTACK_WEBHOOK_TOLERANCE_SECONDS (for example 300) to turn it on; unset or 0 means off. X-Webhook-Timestamp is Unix seconds.
Read the raw body
Express: express.raw({ type: '*/*' }). Next.js: await request.arrayBuffer(). FastAPI: await request.body(). Parse the JSON only after the signature check.
Common Event Types
Dispatch on the body's type field.
| Event | Triggered when |
|---|---|
donation.created |
A new donation is received |
donation.updated |
A donation's status changes |
subscription.created |
A new recurring subscription is started |
subscription.updated |
A subscription is modified (e.g. amount changed) |
subscription.cancelled |
A subscription is cancelled |
subscription.payment_method_updated |
A payment method is updated through a hosted update link (subscription.updated is also emitted) |
contact.created / contact.updated |
A contact is added or updated |
form.created / form.updated |
A form is created or its configuration changes |
For payload notes and delivery details, see references/overview.md and the CharityStack webhooks docs.
Delivery Notes
- Method:
POSTwith a JSON body. - Any non-2xx response counts as a failed delivery. No retry or timeout policy is documented, so return a
2xxquickly and process asynchronously. Return2xxfor event types you don't handle. - The body is an envelope of
id,type,created(Unix seconds) anddata(the stored record). X-Webhook-IDidentifies a delivery attempt, so don't rely on it alone to deduplicate retries; deduplicate on the envelope'sidtogether withtype, and keep handlers idempotent.
Environment Variables
CHARITYSTACK_WEBHOOK_SECRET=your_charitystack_webhook_secret
# Optional: reject timestamps older than this many seconds (unset or 0 = off)
CHARITYSTACK_WEBHOOK_TOLERANCE_SECONDS=300
Local Development
# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 charitystack --path /webhooks/charitystack
Register the printed URL as the webhook url when you call POST /v1/webhooks.
Reference Materials
- references/overview.md - What CharityStack webhooks are, events, delivery
- [references/setup.md](
Установить charitystack-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл charitystack-webhooks?
Receive and verify CharityStack webhooks. Use when setting up CharityStack webhook handlers, debugging X-Webhook-Signature verification (HMAC-SHA256 hex over "<X-Webhook-Timestamp>.<raw body>"), or handling events like donation.created, subscription.cancelled, contact.created and form.updated.
Как установить скилл charitystack-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл charitystack-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic