flutterwave-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Flutterwave webhooks, v4 and v3. Use when setting up a Flutterwave webhook URL and secret hash, verifying the v4 flutterwave-signature…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Flutterwave Webhooks
Flutterwave sends a POST with a JSON body when something happens on your account: a payment completes, a transfer settles, a refund finishes. You set the webhook URL and a secret hash under Settings > Webhooks in the dashboard. How Flutterwave proves a request is genuine depends on the API version:
| Version | Header | Value |
|---|---|---|
| v4 | flutterwave-signature |
Base64 HMAC-SHA256 of the raw body, keyed with the secret hash |
| v3 | verif-hash |
The secret hash itself (no signature) |
Both versions are supported: Flutterwave has said it has no plans to deprecate v3.
When to Use This Skill
- How do I receive Flutterwave webhooks?
- How do I verify the Flutterwave
flutterwave-signatureheader? - What's the difference between
verif-hashandflutterwave-signature? - Why does my Flutterwave v4 signature never match? (usually: the body was re-serialised)
- How do I handle
charge.completedortransfer.disbursefrom Flutterwave?
Verification (core)
const crypto = require('crypto');
function verifyFlutterwaveWebhook(rawBody, headers, secretHash) { // rawBody: exact bytes
if (!secretHash) return false;
const signature = headers['flutterwave-signature'];
if (signature) {
// v4: base64 HMAC-SHA256 of the raw body, keyed with the secret hash as-is.
const expected = crypto.createHmac('sha256', secretHash).update(rawBody).digest();
const given = Buffer.from(signature, 'base64');
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}
const verifHash = headers['verif-hash']; // v3: the secret hash itself
if (!verifHash) return false;
const a = crypto.createHash('sha256').update(verifHash).digest();
const b = crypto.createHash('sha256').update(secretHash).digest();
return crypto.timingSafeEqual(a, b);
}
- v4 if
flutterwave-signatureis present, otherwise v3verif-hash. A failed v4 check is a failure; it doesn't fall back toverif-hash. - Flutterwave's v4 docs contradict themselves. The "Sample hashing" helper computes
createHmac('sha256', secretHash).update(rawBody).digest('base64'), but the framework examples further down the same page compareflutterwave-signaturedirectly to the secret hash, like v3. The examples follow the HMAC helper. If live v4 deliveries fail verification and the header turns out to equal your secret hash, the framework examples describe your account: switch that branch to a constant-time compare against the secret hash. - Verify the raw body. The helper's raw-body capture (
bodyParser.json({ verify })) exists for that reason; re-serialised JSON won't match. - Bad or missing signature:
401(Flutterwave's samples do the same). Secret not set:500. Success: exactly200. Flutterwave treats every other code,201and3xxincluded, as a failure.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Python uses the same steps with hmac.new(secret.encode(), raw_body, hashlib.sha256), base64.b64decode and hmac.compare_digest. See references/verification.md.
Hookdeck: the Flutterwave source type (FLUTTERWAVE) verifies the v4 flutterwave-signature with your secret hash. Verification is optional on the source; v3 sends no signature, so leave it off for v3 webhooks. Flutterwave signs no timestamp, and Hookdeck applies no timestamp window.
Payloads
v4 bodies have a webhook ID, a millisecond timestamp, a type and data:
{
"webhook_id": "wbk_rp0bjKyAWA52ViM8xlZ0",
"timestamp": 1739877172874,
"type": "transfer.disburse",
"data": { "id": "trf_yMZATJ11yVPNkZ", "amount": 50000, "status": "SUCCESSFUL", "reference": "5748745ug8ufdgjhveyebjhcdbchb" }
}
The webhooks page shows the ID as id; the API reference and other v4 pages call it webhook_id. Read either.
v3 bodies have event and data (and sometimes "event.type"):
{ "event": "charge.completed", "data": { "id": 285959875, "tx_ref": "Links-616626414629", "amount": 100, "currency": "NGN", "status": "successful" } }
Event Types
v4 type |
v3 event |
Fired when |
|---|---|---|
charge.completed |
charge.completed |
A payment succeeds or fails (check data.status) |
transfer.disburse |
transfer.completed |
A transfer (payout) reaches a final status |
transfer.reversal |
A transfer is reversed (listed in the v4 API reference) | |
refund.completed |
refund payload (no event field) |
A refund finishes |
order.authorization |
Listed in the v4 API reference's type enum; no payload documented |
|
subscription.cancelled |
A payment plan subscription is cancelled | |
bvn.completed, singlebillpayment.status, chargeback.*, account.tokenize, quote.completed |
Produ |
Установить flutterwave-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flutterwave-webhooks?
Receive and verify Flutterwave webhooks, v4 and v3. Use when setting up a Flutterwave webhook URL and secret hash, verifying the v4 flutterwave-signature header (base64 HMAC-SHA256 of the raw body) or the v3 verif-hash header, debugging signature mismatches, or handling events like charge.completed, transfer.disburse, transfer.completed, refund.completed and subscription.cancelled.
Как установить скилл flutterwave-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flutterwave-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