paypercut-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Paypercut webhooks. Use when setting up a Paypercut webhook endpoint, verifying the Paypercut-Signature header (HMAC-SHA256), debugging…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Paypercut Webhooks
Paypercut (paypercut.io) is a payments platform: checkout, payment intents, connected accounts, payouts and identity verification. It sends a signed JSON webhook to each endpoint you configure in the Merchant Dashboard or with the Webhooks API. An endpoint has enabled_events, a fixed api_version (v1 or v2) and an optional connect flag that also delivers events from connected accounts.
When to Use This Skill
- How do I receive Paypercut webhooks?
- How do I verify the
Paypercut-Signatureheader? - Why does my Paypercut webhook signature verification fail?
- How do I handle
payment.succeeded,checkout_session.completedorpayout.paidevents? - How do I dedupe Paypercut deliveries?
Verification (core)
Paypercut-Signature: t=<unix seconds>,v1=<hex>, where v1 is the hex HMAC-SHA256 of "<t>.<raw body>", keyed with the endpoint's secret as-is (UTF-8 bytes).
const crypto = require('crypto');
function verifyPaypercut(rawBody /* Buffer */, header, secret) {
const parts = String(header || '').split(',').map((p) => p.trim().split(/=(.*)/s));
const t = parts.find(([k]) => k === 't')?.[1];
const candidates = parts.filter(([k]) => k === 'v1').map(([, v]) => v);
if (!t || candidates.length === 0) return false;
const expected = Buffer.from(
crypto.createHmac('sha256', secret)
.update(Buffer.concat([Buffer.from(`${t}.`), rawBody])) // t exactly as sent, body as bytes
.digest('hex')
);
let ok = false; // any v1 entry may match (key rotation); ignore other keys such as v0
for (const c of candidates) {
if (!/^[0-9a-fA-F]{64}$/.test(c)) continue; // validate format before comparing
if (crypto.timingSafeEqual(Buffer.from(c.toLowerCase()), expected)) ok = true;
}
return ok;
}
- Sign the raw body bytes (
express.raw({ type: '*/*' }), Next.jsrequest.arrayBuffer(), FastAPIawait request.body()). NeverJSON.parseand re-stringify first. - Use
tas the exact string from the header. The key is the secret's UTF-8 bytes, not hex- or base64-decoded. - The header may hold several
v1=entries: accept if any matches. A header with not=fails. - Hex is compared case-insensitively: require exactly 64 hex characters, lowercase, then compare in constant time. Python:
hmac.compare_digeston bytes. - Missing or empty header, malformed value or mismatch:
401. Missing secret:500(fail closed). A verified body that isn't an event (typemust be a string):400. - No timestamp window by default. Hookdeck retries and replays resend the original headers and timestamp, so a fixed window would reject legitimate retries. The examples offer an opt-in
PAYPERCUT_WEBHOOK_TOLERANCE_SECONDS(unset or0= off;tis Unix seconds; Paypercut suggests 300) if you want one. - Dedupe on the
Paypercut-Delivery-Idheader, which retries of a delivery repeat;Paypercut-Event-Idcarries the event id.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
HTTP Methods
Paypercut's docs don't name the HTTP method of a delivery. The examples therefore accept GET, POST, PUT, PATCH and DELETE on the webhook route, verify the signature first for every method, and treat a missing body as empty bytes (a bodyless request is verified over zero bytes, then acknowledged with 200). If Paypercut uses a method other than POST, also allow that method on the Hookdeck source (custom methods).
Event Payload and Types
Dispatch on the body's type field, which holds the event identifier. data.object is a snapshot of the resource, and connected-account events name their account in a top-level account. Paypercut's Types of events page has an example body for every event. Dashboard endpoint tests arrive as webhook_endpoint.test, which can't be subscribed to: acknowledge it.
| Event | Sent When |
|---|---|
checkout_session.completed |
A Checkout Session has been completed |
payment.succeeded |
A payment has succeeded |
payment.failed |
A payment has failed |
payment_intent.authorized |
A Payment Intent has been authorized |
payment_intent.captured |
A Payment Intent has been captured |
payout.paid |
A payout has been paid |
payout.failed |
A payout has failed |
account.updated |
An account has been updated |
invoice.paid |
An invoice has been paid |
invoice.payment_failed |
Payment for an invoice has failed |
identity.verification_session.verified |
An identity verification session has been verified |
Paypercut documents 29 events in all (account, person, tax invoice, payout and identity verification families too). See references/overview.md.
Delivery
Return 2xx only after processing: a 500 is retr
Установить paypercut-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл paypercut-webhooks?
Receive and verify Paypercut webhooks. Use when setting up a Paypercut webhook endpoint, verifying the Paypercut-Signature header (HMAC-SHA256), debugging signature verification failures, or handling events like payment.succeeded, checkout_session.completed, payout.paid and account.updated.
Как установить скилл paypercut-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл paypercut-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