Command Palette

Search for a command to run...

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

wix-webhooks

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

Receive and verify Wix webhooks. Use when setting up Wix webhook handlers for self-hosted/self-managed apps, debugging JWT signature verification with your…

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

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

Wix Webhooks

When to Use This Skill

  • How do I receive Wix webhooks in a self-hosted app?
  • How do I verify Wix webhook signatures (the JWT)?
  • Where do I get my Wix public key to verify webhooks?
  • How do I handle wix.ecom.v1.order_created / order_approved / order_canceled events?
  • Why is my Wix webhook JWT verification failing?

How Wix Webhooks Work

Wix delivers each webhook as an HTTP POST whose entire request body is a signed JWT (RS256), signed by Wix. There are no X-Wix-Signature/HMAC headers and it is not Standard Webhooks — verification means validating the JWT with your app's public key.

  • Get your public key from the app dashboard → Custom Apps → your app → Webhooks → "Get Public Key" (also under View ID & keys). It is per-app; there is no global JWKS endpoint.
  • Verify against the raw, unparsed body. Re-serializing the JSON breaks the signature.
  • The decoded JWT is a nested envelope: outer { data, iat, exp } → data is a JSON string → parse it to { eventType, instanceId, data } → parse the inner data string to get { id, entityFqdn, slug, entityId, eventTime, createdEvent | updatedEvent | deletedEvent | actionEvent }.
  • The two layers name the event differently. The dotted string wix.ecom.v1.order_created lives on the middle envelope as eventType. The inner payload has no eventType — it names the same event as the pair entityFqdn: "wix.ecom.v1.order" + slug: "created". Wix's own reference pages show the inner form, so match on eventType at the middle layer (or let the SDK dispatch), not on a dotted string inside the inner payload.

Verification (core)

Node.js — official @wix/sdk verifies (RS256, via jose) and decodes in one call. Pass the raw text body:

import { AppStrategy, createClient } from '@wix/sdk';
import { orders } from '@wix/ecom';

const client = createClient({
  auth: AppStrategy({
    appId: process.env.WIX_APP_ID,
    publicKey: process.env.WIX_PUBLIC_KEY.replace(/\\n/g, '\n'), // PEM, or base64-encoded PEM
  }),
  modules: { orders },
});

// Register typed handlers up front...
client.orders.onOrderCanceled((event) => {
  console.log('Order canceled', event.metadata.entityId, 'event', event.metadata._id);
});

// ...then verify + dispatch the raw JWT body (throws if the signature/exp is invalid):
await client.webhooks.process(rawBody);

Python (no official server SDK) — verify the JWT manually with PyJWT + your public key:

import json, jwt  # PyJWT

def verify_and_decode(raw_body: bytes, public_key: str) -> dict:
    decoded = jwt.decode(raw_body, public_key, algorithms=["RS256"])  # raises on bad signature/exp
    event = json.loads(decoded["data"])          # -> { eventType, instanceId, data: "<json>" }
    event["entity"] = json.loads(event["data"])  # inner event/entity payload (has id, entityId, ...)
    return event

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

Common Event Types

Most event type strings follow wix.<product>.<version>.<entity>_<action> and appear as eventType on the middle envelope. Older events use other forms, such as AppInstalled and the Stores Catalog V1 com.wix.ecommerce.catalog.api.v1.ProductCreated, so match the exact string. Configure each one on the Webhooks page of your app dashboard.

Wix's reference pages document the same events by their inner-payload pair instead — entityFqdn: "wix.ecom.v1.order" plus slug: "created"/"approved"/"updated"/"canceled"/"fulfilled"/"payment_status_updated". Both forms describe one event; the table below gives the eventType value, which is what @wix/sdk keys handler dispatch on.

Event Type Triggered When
wix.ecom.v1.order_created A new eCommerce order is created
wix.ecom.v1.order_approved An order is approved (e.g. payment authorized)
wix.ecom.v1.order_updated An order is updated
wix.ecom.v1.order_canceled An order is canceled
AppInstalled Your app is installed on a site (App Instance Installed)
AppRemoved Your app is uninstalled from a site (App Instance Removed)

See references/overview.md for more events and payload structure. For the full list, browse events alongside their API methods in the Wix API Reference.

Environment Variables

WIX_APP_ID=your-app-id            # OAuth page of your app dashboard
WIX_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"  # Webhooks > Get Public Key

Store the PEM public key on one line with \n escapes (the examples convert them back to newlines). A base64-encoded PEM also works

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

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

FAQ

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

Receive and verify Wix webhooks. Use when setting up Wix webhook handlers for self-hosted/self-managed apps, debugging JWT signature verification with your app's public key, or handling events like wix.ecom.v1.order_created, wix.ecom.v1.order_approved, wix.ecom.v1.order_updated, and wix.ecom.v1.order_canceled.

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

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

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

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

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

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