Command Palette

Search for a command to run...

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

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от 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-signature header?
  • What's the difference between verif-hash and flutterwave-signature?
  • Why does my Flutterwave v4 signature never match? (usually: the body was re-serialised)
  • How do I handle charge.completed or transfer.disburse from 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-signature is present, otherwise v3 verif-hash. A failed v4 check is a failure; it doesn't fall back to verif-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 compare flutterwave-signature directly 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: exactly 200. Flutterwave treats every other code, 201 and 3xx included, 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
Полный SKILL.md на GitHub

Установить flutterwave-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/flutterwave/route.tsexamples/nextjs/lib/verify-flutterwave.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

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 запускает скрипты?

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

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

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