creem-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Creem webhooks. Use when setting up a Creem webhook endpoint, verifying the creem-signature header (hex HMAC-SHA256 of the raw body)…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Creem Webhooks
Creem is a merchant-of-record payments platform for SaaS. Its webhooks push
checkout, subscription, refund, dispute and customer-credit events to your HTTPS endpoint as
JSON POST requests. Each request carries a creem-signature header: a hex HMAC-SHA256 of the
raw request body, keyed with the endpoint's signing secret.
When to Use This Skill
- How do I receive Creem webhooks?
- How do I verify the
creem-signatureheader? - How do I handle
checkout.completed,subscription.paidorrefund.createdevents? - Why is my Creem webhook signature verification failing?
- How do I make my Creem webhook handler idempotent?
Verification (core)
creem-signature is the bare lowercase hex HMAC-SHA256 of the raw request body: no
prefix, no timestamp, no other header is signed. The key is the signing secret used as a UTF-8
string (not hex- or base64-decoded). Check the header is exactly 64 hex characters before
decoding, because Buffer.from(x, 'hex') silently drops invalid characters.
const crypto = require('crypto');
function verifyCreemSignature(rawBody, signature, secret = process.env.CREEM_WEBHOOK_SECRET) {
if (!secret || typeof signature !== 'string') return false;
if (!/^[0-9a-f]{64}$/i.test(signature)) return false; // also guards the hex decode
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest();
return crypto.timingSafeEqual(expected, Buffer.from(signature, 'hex'));
}
// rawBody: Buffer from express.raw({ type: '*/*' }); signature: req.headers['creem-signature']
Return 401 when this fails, 400 for a body that isn't a JSON object, and 200 once handled.
In Python use hmac.compare_digest on bytes (encode both sides) so a non-ASCII header gives
401, not 500. Creem also ships verifyWebhookSignature in its TypeScript SDK
(creem/webhooks); the examples verify manually so the same check works in Express, Next.js
and FastAPI. Details in references/verification.md.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Setup
Register the endpoint on the Developers tab of the Creem dashboard (or with
POST /v1/webhooks, the TypeScript SDK or the CLI) and copy the signing secret from the
Developers > Webhook page into CREEM_WEBHOOK_SECRET. Full steps in
references/setup.md.
Payload and Event Types
Every payload has a top-level id (evt_...), eventType, created_at (milliseconds) and the
resource under object; object.object names the kind (checkout, subscription, ...).
Dispatch on eventType; no header names the event.
eventType |
Triggered When |
|---|---|
checkout.completed |
A checkout finishes |
subscription.paid |
A subscription payment succeeds (Creem recommends it for granting access) |
subscription.active |
A new subscription is paid, or a subscription returns to active (use for synchronisation) |
subscription.canceled |
The merchant or customer canceled the subscription |
subscription.scheduled_cancel |
Cancellation is scheduled for the end of the period |
subscription.past_due / subscription.unpaid |
A payment failed |
subscription.expired |
The period ended without a new payment (not terminal: payment can still be collected until canceled) |
subscription.update / subscription.trialing / subscription.paused |
The subscription changed |
refund.created |
A refund is created |
dispute.created |
A dispute is opened |
credits.granted / credits.consumed / credits.auto_recharged |
Customer credits change |
customer_credits.exhausted |
A customer's credits ran out during prepaid usage settlement |
More detail in references/overview.md.
Delivery and Idempotency
Return a 2xx within 15 seconds: Creem counts a slower response as a failed attempt, and any 2xx
as delivered. Creem makes up to 5 attempts (initial, then after 30 s, 5 min, 30 min and 6 h) and
stops after 24 hours. Delivery is at least once, and automatic retries keep the event id, so
deduplicate on it. Events can also be resent from the dashboard, but a manual resend arrives with
a new id and created_at, so key payment work on the transaction (last_transaction.id) too.
Environment Variables
CREEM_WEBHOOK_SECRET=your_creem_webhook_secret # Developers > Webhook page
Local Development
The Creem CLI forwards your store's events to a local URL, with the real signature header, and prints the signing secret to verify with:
creem listen --forward-to http://localhost:3000/webhooks/creem
Or use the Hookdeck CLI and register the printed URL as a webhook endpoint in the Creem dashboard (no Hookdeck account required):
npx hookdeck-cli listen 3000 creem --path /webh
Установить creem-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл creem-webhooks?
Receive and verify Creem webhooks. Use when setting up a Creem webhook endpoint, verifying the creem-signature header (hex HMAC-SHA256 of the raw body), debugging signature failures, or handling events like checkout.completed, subscription.paid, refund.created and dispute.created.
Как установить скилл creem-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл creem-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