Complete Shopify Webhook Integration Guide
Set up Shopify webhooks for your e-commerce application. Learn about order events, inventory updates, and best practices.
HookWatch Team
December 15, 2025
Shopify webhooks let you react to events in your store in real-time—orders, inventory changes, customer updates, and more.
Setting Up Shopify Webhooks
Via Shopify Admin
- Go to Settings > Notifications > Webhooks
- Click "Create webhook"
- Select the event (e.g., "Order creation")
- Enter your webhook URL
- Select format (JSON recommended)
Via Shopify API
const shopify = new Shopify({
shopName: 'your-store',
apiKey: 'api-key',
password: 'api-password'
});
await shopify.webhook.create({
topic: 'orders/create',
address: 'https://hook.hookwatch.dev/wh/your-endpoint',
format: 'json'
});
Essential Webhook Events
Order Events
orders/create: New order placedorders/updated: Order modifiedorders/paid: Payment receivedorders/fulfilled: Order shippedorders/cancelled: Order cancelled
Inventory Events
inventory_levels/update: Stock changedproducts/create: New product addedproducts/update: Product modified
Customer Events
customers/create: New customer registeredcustomers/update: Customer info changed
Verifying Shopify Webhooks
Shopify signs webhooks with HMAC-SHA256:
const crypto = require('crypto');
function verifyShopifyWebhook(body, hmacHeader, secret) {
const hash = crypto
.createHmac('sha256', secret)
.update(body, 'utf8')
.digest('base64');
return crypto.timingSafeEqual(
Buffer.from(hash),
Buffer.from(hmacHeader)
);
}
Handling Order Webhooks
app.post('/webhook/orders/create', async (req, res) => {
const order = req.body;
// Process the order
await saveOrder({
shopifyId: order.id,
email: order.email,
total: order.total_price,
items: order.line_items
});
// Trigger fulfillment workflow
await triggerFulfillment(order.id);
res.status(200).send('OK');
});
Common Pitfalls
Duplicate Events
Shopify may send duplicates. Use order ID for idempotency:
const processed = await db.orders.findOne({ shopifyId: order.id });
if (processed) return res.status(200).send('Already processed');
Webhook Timeouts
Respond within 5 seconds or Shopify marks it as failed:
// Acknowledge immediately, process async
res.status(200).send('OK');
processOrderAsync(order);
Using HookWatch with Shopify
HookWatch is perfect for Shopify integrations:
- Create an endpoint for each event type
- Use your HookWatch URL in Shopify
- Set your server as the destination
- Get automatic retries and logging
Never miss an order webhook again.