webhooks.shopify() verifies the HMAC-SHA256 signature Shopify sends in x-shopify-hmac-sha256 on every request.
/trigger/shopify.ts
Set up Shopify
-
Start
trigger devor deploy, then copy the endpoint’s Webhook URL from the Webhooks page. -
For an app, add a subscription to
shopify.app.tomland runshopify app deploy:Or create it with the Admin API’sshopify.app.tomlwebhookSubscriptionCreatemutation. Use the JSON format. - Shopify signs app webhooks with the app’s client secret, which is in the app’s settings in the Shopify Dev Dashboard. Choose Set signing secret on the Trigger.dev endpoint and paste it.
- For a store without an app, add the webhook under Settings > Notifications > Webhooks in the store admin, and use the signing key shown on that page instead.
- Send a test event from Shopify, or use the endpoint’s Test tab, and check the endpoint’s Deliveries tab. See Verify the connection if nothing arrives.

