Integrations 7 min read

Complete Shopify Webhook Integration Guide

Set up Shopify webhooks for your e-commerce application. Learn about order events, inventory updates, and best practices.

H

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

  1. Go to Settings > Notifications > Webhooks
  2. Click "Create webhook"
  3. Select the event (e.g., "Order creation")
  4. Enter your webhook URL
  5. Select format (JSON recommended)

Via Shopify API

Javascript
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 placed
  • orders/updated: Order modified
  • orders/paid: Payment received
  • orders/fulfilled: Order shipped
  • orders/cancelled: Order cancelled

Inventory Events

  • inventory_levels/update: Stock changed
  • products/create: New product added
  • products/update: Product modified

Customer Events

  • customers/create: New customer registered
  • customers/update: Customer info changed

Verifying Shopify Webhooks

Shopify signs webhooks with HMAC-SHA256:

Javascript
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

Javascript
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:

Javascript
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:

Javascript
// Acknowledge immediately, process async
res.status(200).send('OK');
processOrderAsync(order);

Using HookWatch with Shopify

HookWatch is perfect for Shopify integrations:

  1. Create an endpoint for each event type
  2. Use your HookWatch URL in Shopify
  3. Set your server as the destination
  4. Get automatic retries and logging

Never miss an order webhook again.

Tags: shopifye-commercewebhookstutorial

Share this article

Ready to try HookWatch?

Start monitoring your webhooks in minutes. No credit card required.

Start Free Today