shopline-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify SHOPLINE webhooks. Use when setting up SHOPLINE webhook handlers, debugging X-Shopline-Hmac-Sha256 signature verification, or handling…
от hookdeck★ 104 звезды на GitHubОб этом скилле
SHOPLINE Webhooks
When to Use This Skill
- How do I receive SHOPLINE webhooks?
- How do I verify SHOPLINE webhook signatures (
X-Shopline-Hmac-Sha256)? - How do I handle
orders/create,products/update, orcollect/deleteevents? - Why is my SHOPLINE webhook signature verification failing?
Verification (core)
SHOPLINE (the SHOPLINE Open Platform, developer.shopline.com) signs every
webhook with HMAC-SHA256 of the raw request body keyed on your app
secret (Developer Center → App credentials) and sends the digest in the
X-Shopline-Hmac-Sha256 header. Use the raw body — parsing JSON first
changes the bytes and breaks the signature — and compare timing-safe.
Encoding — verified as lowercase hex. SHOPLINE's docs show a base64 digest in the header example (Shopify-style), while a code sample shows hex. A live delivery settles it: the code sample is right. Confirmed against a real
products/createwebhook (API versionv20240601) by recomputing HMAC-SHA256 over the raw body with the app secret — the header was 64 lowercase hex characters and matched exactly.The handlers below still accept either encoding, since the documented example disagrees with observed behaviour and SHOPLINE could differ by version or region — but expect hex. To check your own: 64
[a-f0-9]chars is hex; 44 chars ending=is base64.The topic is in
X-Shopline-Topic; the shop domain inX-Shopline-Shop-Domain.
Node:
const crypto = require('crypto');
function verifyShoplineWebhook(rawBody, hmacHeader, secret) {
if (!hmacHeader) return false;
const digest = crypto.createHmac('sha256', secret).update(rawBody).digest();
// Verified hex in practice; base64 kept as a fallback. Timing-safe either way.
return [digest.toString('hex'), digest.toString('base64')].some((expected) => {
try {
return crypto.timingSafeEqual(Buffer.from(hmacHeader), Buffer.from(expected));
} catch {
return false;
}
});
}
Python:
import hmac, hashlib, base64
def verify_shopline_webhook(raw_body: bytes, hmac_header: str, secret: str) -> bool:
if not hmac_header:
return False
digest = hmac.new(secret.encode(), raw_body, hashlib.sha256).digest()
# Verified hex in practice; base64 kept as a fallback.
return (
hmac.compare_digest(hmac_header, base64.b64encode(digest).decode())
or hmac.compare_digest(hmac_header, digest.hex())
)
Important: SHOPLINE expects a
200response within 5 seconds. It retries up to 19 times over 48 hours. If every retry fails and no other delivery of that topic succeeded meanwhile, it cancels the subscription. Process slow work asynchronously and acknowledge quickly.
For complete handlers with route wiring, event dispatch, and tests, see:
Common Event Types (Topics)
SHOPLINE topics use Shopify-style resource/action slash format:
| Topic | Description |
|---|---|
orders/create |
New order placed |
orders/updated |
Order modified |
orders/paid |
Order payment received |
orders/cancelled |
Order cancelled |
products/create |
New product added |
products/update |
Product modified |
products/delete |
Product removed |
collect/create |
Product added to a collection |
collect/delete |
Product removed from a collection |
customers/create |
New customer registered |
apps/installed_uninstalled |
App installed or uninstalled |
customers/redact |
Delete a customer's data (mandatory for App Store apps) |
merchants/redact |
Delete a store's data, 48 hours after uninstall (mandatory for App Store apps) |
For the full topic reference (134 topics in API version v20260901), see the per-topic pages under developer.shopline.com/docs/webhook. Each page's Event Identification value is the topic.
Important Headers
| Header | Description |
|---|---|
X-Shopline-Hmac-Sha256 |
HMAC-SHA256 signature for verification |
X-Shopline-Topic |
The webhook topic (e.g. orders/create) |
X-Shopline-Shop-Domain |
Store domain (e.g. my-store.myshopline.com) |
X-Shopline-Shop-Id |
Store ID |
X-Shopline-Merchant-Id |
Merchant ID |
X-Shopline-API-Version |
API version of the payload (e.g. v20260901) |
X-Shopline-Webhook-Id |
Delivery ID — stable across retries; use for idempotency |
Environment Variables
SHOPLINE_APP_SECRET=your_app_secret # Developer Center → App credentials
Local Development
# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 shopline --path /webhooks/shopline
Reference Materials
- references/overview.md - SHOPLINE webhook concepts, events, retry behav
Установить shopline-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл shopline-webhooks?
Receive and verify SHOPLINE webhooks. Use when setting up SHOPLINE webhook handlers, debugging X-Shopline-Hmac-Sha256 signature verification, or handling store events like orders/create, products/update, or collect/delete.
Как установить скилл shopline-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл shopline-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