shopify-webhooks
Installation
SKILL.md
Shopify Webhooks Skill
Webhooks are the preferred way to stay in sync with Shopify data. They allow your app to receive real-time notifications when events occur in a shop (e.g., orders/create, app/uninstalled).
1. Verification (CRITICAL)
ALL webhook requests must be verified to ensure they came from Shopify.
HMAC Verification
Shopify includes an X-Shopify-Hmac-Sha256 header in every webhook request. This is a base64-encoded HMAC-SHA256 digest of the request body, using your Client Secret (API Secret Key) as the signing key.
[!IMPORTANT] Always use the raw request body (Buffer) for verification. Parsed JSON bodies may have subtle differences that cause verification to fail.
Node.js Example (Generic)
const crypto = require('crypto');