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

# Shopify

> Capture Shopify webhooks and prove your handler against forged and unsigned deliveries, bursts and Shopify's 5-second limit.

## Point Shopify at your capture URL

**1. Copy your capture URL**

It is on **Arrivals**: `https://in.webhooktrap.dev/c/` followed by a 12-character key.

**2. Create the webhook**

In the Shopify admin, open **Settings › Notifications › Webhooks › Create webhook**. Choose format JSON, set the URL to the capture URL, and pick API version 2025-10.

**3. Trigger events**

Use **Send test** on the webhook, or create a test order.

Webhook Trap recognises a Shopify delivery by its `X-Shopify-Topic` header, takes the event type from that header and the event id from `X-Shopify-Webhook-Id`, and groups events by order and product.

## Configure the agent

```yaml webhooktrap.yml theme={"theme":{"light":"github-light","dark":"github-dark"}}
target: http://127.0.0.1:3000/webhooks/shopify
provider: shopify
secret: env:SHOPIFY_API_SECRET
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export SHOPIFY_API_SECRET=...
webhooktrap agent
```

If you leave out `secret`, the agent looks for `SHOPIFY_API_SECRET`, the name in the Shopify pack.

> [!NOTE]
>
> Your signing secret stays on your machine. `webhooktrap.yml` holds only the name of the environment variable (`secret: env:NAME`). The agent reads the value when it signs a delivery, strips every known secret variable from the environment of probe and reset commands, and refuses to write or upload a run document that contains the secret. The server learns the variable's name, never its value.

Shopify signs no timestamp, so the body and its original `X-Shopify-Hmac-Sha256` still verify later. Without the secret the agent sends valid deliveries with the captured signature header; with it, it re-signs them.

## What the scenarios do for Shopify

| Scenario | For Shopify |
| - | - |
| Once | Each selected event. |
| Twice | `n/a (not verified for Shopify)`: the Shopify pack's duplicate rule is not verified yet. |
| Shuffled | The events in reverse order. Needs 2 or more events. |
| Late | `n/a (provider signs no timestamp)`. |
| Retry after error | `n/a (not verified for Shopify)`. |
| Tampered | The body with one field changed, signed for the original body. For `orders/*` the pack sets `total_price`, then `subtotal_price`, to `"0.00"`. |
| Unsigned | The first event with `X-Shopify-Hmac-Sha256` removed. |
| Burst | Every selected event at once (two copies when you select one). |
| Slow budget | One more delivery, measured against the 5 s budget. |

The 5 s budget comes from Shopify's docs. A `budget:` above it in `webhooktrap.yml` is refused as a configuration error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.