Command Palette

Search for a command to run...

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

polygon-technology-webhooks

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

Receive and verify Polygon Technology OMS payments webhooks (stablecoin payments and orchestration at docs.polygon.technology/payments). Use when registering…

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

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

Polygon Technology Webhooks

Polygon Technology's OMS payments platform (stablecoin payments: customers, deposit addresses, virtual accounts, transactions, transfers, payouts) delivers signed webhooks for state changes. See the Receiving webhooks guide.

Not this skill: Polygon PoS chain events (blocks, logs, token transfers) come from third parties such as Alchemy or QuickNode, not from OMS. polygon.io is an unrelated market-data company.

When to Use This Skill

  • How do I receive Polygon Technology OMS webhooks?
  • How do I verify the OMS Webhook-Signature header?
  • Is this Standard Webhooks? (No. Only Webhook-Signature: there is no webhook-id or webhook-timestamp header, and the key is used as-is.)
  • Why does signature verification fail? (parsed JSON instead of raw body, base64 instead of hex, missing <t>. prefix, clock skew)
  • How do I handle transaction.statusChanged and transfer.statusChanged?
  • How do I recover deliveries after my endpoint was down or the webhook was suspended?

Verification (core)

Webhook-Signature: t=1767225600,v1=5d41402abc4b2a76b9719d911017c592...

v1 is the lowercase hex HMAC-SHA256 of <t>.<raw request body>, keyed with the signingKey from POST /webhooks as UTF-8 bytes (no whsec_ prefix, no decoding). Reject when |now - t| > 300 seconds: stale and future-dated timestamps alike.

const crypto = require('crypto');

function verifyOmsSignature(rawBody, header, signingKey, now = Math.floor(Date.now() / 1000)) {
  const parts = new Map();
  for (const kv of String(header || '').split(',')) {
    const i = kv.indexOf('=');
    if (i > 0) parts.set(kv.slice(0, i).trim(), kv.slice(i + 1).trim());
  }
  const t = parts.get('t'), v1 = parts.get('v1');           // by key, never by position
  if (!signingKey || !/^\d+$/.test(t || '') || !/^[0-9a-f]{64}$/i.test(v1 || '')) return false;
  if (Math.abs(now - Number(t)) > 300) return false;        // both directions
  const expected = crypto.createHmac('sha256', signingKey)
    .update(`${t}.`).update(rawBody).digest();              // rawBody: exact bytes
  const received = Buffer.from(v1, 'hex');
  return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}

Python: hmac.new(key.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest() and hmac.compare_digest. There's no official verification SDK: every example verifies manually, as the OMS docs do.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

  • Raw body. Express: express.raw({ type: 'application/json' }). Next.js: await request.text(). FastAPI: await request.body().
  • Bad signature: 401 (as the docs do). Missing key: 500. Any non-2xx is retried.
  • Key shown once. To read it again, retry the original POST /webhooks with the same Idempotency-Key and body. POST /webhooks/{webhookId}/rotate-key kills the old key immediately, with no overlap: deploy the new key at the same moment or deliveries in between fail (they're retried, so they recover once the key matches).
  • No handshake, no challenge, no documented IP allowlist.

Handling Deliveries

Every body has six fields: id (evt_…), idempotencyKey, type, createdAt, schema ("v1"), data. Route on type, then read data.resource (the GET shape, empty lists left out). *.statusChanged adds data.previousStatus; *.updated adds data.changedFields. Absent fields are left out, never null.

  1. Respond before you process. timeoutMs defaults to 5000 (max 10000). A slow 2xx counts as failed and is retried.
  2. Dedupe on id and idempotencyKey. Delivery is at-least-once; the same change is occasionally emitted twice with different ids.
  3. Order by createdAt per resource. Deliveries are parallel and unordered. Apply only if createdAt is newer than the last applied; the strings compare correctly as text.
  4. Tolerate the unknown. Unknown type: return 2xx and ignore. Unknown subStatus: use the part before the dot. schema not "v1": pre-v1 event, ignore or handle separately.

Event Types

26 types across 9 resources. Each sends created, statusChanged and updated, except transaction (no transaction.updated).

Resource Events
customer customer.created, customer.statusChanged, customer.updated
externalAccount externalAccount.created, externalAccount.statusChanged, externalAccount.updated
counterparty counterparty.created, counterparty.statusChanged, counterparty.updated
customerWallet customerWallet.created, customerWallet.statusChanged, customerWallet.updated
depositAddress depositAddress.created, depositAddress.statusChanged, depositAddress.updated
virtualAccount `vi
Полный SKILL.md на GitHub

Установить polygon-technology-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

TODO.mdexamples/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/polygon-technology/route.tsexamples/nextjs/lib/polygon-technology.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

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

Receive and verify Polygon Technology OMS payments webhooks (stablecoin payments and orchestration at docs.polygon.technology/payments). Use when registering an endpoint with POST /webhooks, verifying the Webhook-Signature header (t=<unix>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">, 300 second window), rotating the signing key, deduplicating on id and idempotencyKey, ordering by createdAt, recovering failed or suspended deliveries, or handling events like transaction.statusChanged, transfer.statusChanged, customer.statusChanged and depositAddress.created. Not for Polygon PoS chain events or polygon.io.

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

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

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

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

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

Сравнить polygon-technology-webhooks с