> ## Documentation Index
> Fetch the complete documentation index at: https://bobprince.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Capture Shopify webhook events with Hookdrop

## Setup

<Steps>
  <Step title="Open Notifications settings">
    In your Shopify Admin, go to **Settings → Notifications**, then scroll down to the **Webhooks** section.
  </Step>

  <Step title="Add a webhook">
    Click **Create webhook**.
  </Step>

  <Step title="Select the event">
    Choose the event you want to capture from the **Event** dropdown.
  </Step>

  <Step title="Paste your Hookdrop URL">
    Enter your Hookdrop capture URL in the **URL** field:

    ```
    https://hookdrop.dev/in/{your-token}
    ```
  </Step>

  <Step title="Save">
    Make sure the format is set to **JSON**, then click **Save**. Repeat for each event you want to capture.
  </Step>
</Steps>

## Common events

| Event              | When it fires             |
| ------------------ | ------------------------- |
| `orders/create`    | New order placed          |
| `orders/paid`      | Order payment completed   |
| `products/update`  | Product details updated   |
| `customers/create` | New customer registered   |
| `refunds/create`   | Refund issued on an order |

## Verifying signatures

Shopify signs each webhook with an HMAC-SHA256 signature in the `X-Shopify-Hmac-SHA256` header. Verify it before processing events in your handler:

```typescript theme={null}
import crypto from 'crypto'

const verifyShopifyWebhook = (payload: string, signature: string, secret: string) => {
  const hash = crypto.createHmac('sha256', secret).update(payload).digest('base64')
  return hash === signature
}
```

Your webhook secret is listed in **Settings → Notifications → Webhooks** under the webhook details.

<Note>
  Shopify requires you to respond with a `200` status within 5 seconds, or it will mark the delivery as failed and retry. Hookdrop responds immediately on your behalf, so all deliveries are captured — even if your downstream handler is slow or offline.
</Note>

## Inspecting order payloads

<Tip>
  Use the Hookdrop dashboard to inspect full order payloads during development. Shopify's `orders/create` and `orders/paid` events include detailed line item, customer, and shipping data that can be difficult to reproduce manually.
</Tip>
