Command Palette

Search for a command to run...

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

tokenio-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Token.io webhooks. Use when setting up Token.io webhook handlers, debugging Ed25519 signature verification, subscribing to webhook config…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Token.io Webhooks

When to Use This Skill

  • How do I receive Token.io webhooks?
  • How do I verify the Token.io token-signature Ed25519 signature?
  • Why is my Token.io webhook signature verification failing?
  • How do I subscribe to webhooks with PUT /webhook/config?
  • How do I handle PAYMENT_STATUS_CHANGED, REFUND_STATUS_CHANGED, VRP_STATUS_CHANGED, or VIRTUAL_ACCOUNT_CREDIT_RECEIVED events?
  • What do the payment statuses INITIATION_PROCESSING, INITIATION_COMPLETED, and INITIATION_REJECTED mean?

How Token.io Webhooks Work (Read This First)

Token.io is an open banking / account-to-account (A2A) payments provider. Its webhooks are not HMAC and not Standard Webhooks. Every delivery is signed with an asymmetric Ed25519 signature:

  • token-signature — the Ed25519 signature of the raw POST body, base64url encoded.
  • token-event — the event type, e.g. PAYMENT_STATUS_CHANGED (a separate header; only Payments v2 and low-balance bodies repeat it as eventType).

You verify with the Token.io Ed25519 public key from the Token Dashboard (Settings → Member Information), which is base64url-encoded (no padding). There is no shared secret: Token.io signs with its private key and you verify with its public key.

Token.io ──POST body + token-signature + token-event──▶ your endpoint
                                                          │  Ed25519.verify(publicKey, rawBody, signature)
                                                          ▼
                                          dispatch on token-event → act → return 200

Critical: the signed message is the exact raw bytes of the POST body. Capture the raw body before JSON parsing — any re-serialization (key reorder, whitespace, unicode escaping) changes the bytes and the signature will not match.

Verification (core)

Import the base64url public key as an Ed25519 JWK and verify the raw body with Node's built-in crypto — no external SDK is needed for verification. The official token-io npm package is a broad API client (used to subscribe to webhooks), not a webhook verifier, so verify manually with a crypto library.

const crypto = require('crypto');

// token-signature: Ed25519 signature of the RAW body, base64url.
// token-event:     the event type (e.g. PAYMENT_STATUS_CHANGED).
// publicKeyB64url: the Token.io Ed25519 public key from the Token Dashboard
//                  (Settings → Member Information), base64url, no padding.
function verifyTokenWebhook(rawBody, signatureHeader, publicKeyB64url) {
  if (!signatureHeader || !publicKeyB64url) return false;
  try {
    const key = crypto.createPublicKey({
      key: { kty: 'OKP', crv: 'Ed25519', x: publicKeyB64url },
      format: 'jwk',
    });
    const message = Buffer.isBuffer(rawBody) ? rawBody : Buffer.from(rawBody, 'utf8');
    return crypto.verify(null, message, key, Buffer.from(signatureHeader, 'base64url'));
  } catch {
    return false; // malformed key/signature = invalid
  }
}

Always verify against the raw body — parse JSON only after the signature checks out.

For complete handlers with route wiring, event dispatch, and tests, see:

Common Event Types

The event type arrives in the token-event header. Subscribe to the ones you need via PUT /webhook/config (see references/setup.md).

Event (token-event) Fires When Common Use Cases
PAYMENT_STATUS_CHANGED A Payments v2 payment changes status Update order/payment state, fulfilment
TRANSFER_STATUS_CHANGED A Payments v1 transfer changes status Legacy payment tracking
REFUND_STATUS_CHANGED A refund changes status Reconcile refunds
VRP_STATUS_CHANGED A Variable Recurring Payment changes status Subscriptions, sweeping
VRP_CONSENT_STATUS_CHANGED A VRP consent/mandate changes status Mandate lifecycle
VIRTUAL_ACCOUNT_CREDIT_RECEIVED A virtual account (payin) is credited Reconcile inbound funds
PAYOUT_STATUS_CHANGED A payout changes status Settlement tracking

Token.io also emits SETTLEMENT_RULE_PAYOUT_EXECUTION_FAILED, SETTLEMENT_ACCOUNT_LOW_BALANCE, VRP_CONSENT_INACTIVITY_WARNING, BANK_AIS_OUTAGE_STATUS_CHANGED, and BANK_SIP_OUTAGE_STATUS_CHANGED. See references/overview.md for the full list and payloads.

Payment status values

PAYMENT_STATUS_CHANGED carries a payment object with a Token.io status, such as INITIATION_PROCESSING, INITIATION_COMPLETED or INITIATION_REJECTED, and SETTLEMENT_IN_PROGRESS / SETTLEMENT_COMPLETED when a Token.io settlement account is the beneficiary. INITIATION_COMPLETED confirms the initiation, not that funds arrived.

Полный SKILL.md на GitHub

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

FAQ

Что делает скилл tokenio-webhooks?

Receive and verify Token.io webhooks. Use when setting up Token.io webhook handlers, debugging Ed25519 signature verification, subscribing to webhook config via PUT /webhook/config, or handling open banking / A2A payment events like PAYMENT_STATUS_CHANGED, REFUND_STATUS_CHANGED, VRP_STATUS_CHANGED, and VIRTUAL_ACCOUNT_CREDIT_RECEIVED. Note: Token.io does NOT use HMAC or Standard Webhooks — it signs the raw body with an ASYMMETRIC Ed25519 signature in the token-signature header, verified with the Token.io Ed25519 public key.

Как установить скилл tokenio-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tokenio-webhooks запускает скрипты?

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

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

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