Skip to main content

Webhooks

The list of all webhook topics you can subscribe to. You can use webhook subscriptions to receive notifications about particular events in a shop.

Caution

If your app is distributed through the Shopify App Store, it must be subscribed to Shopify's mandatory compliance topics. You can create mandatory compliance webhook subscriptions either using your Partner Dashboard or by updating your app configuration file.

Creating subscriptions using the app configuration file

You can subscribe to most topics through your app configuration file using CLI version 3.63.0 or greater.

If you create and manage your subscriptions in your app configuration file, they will be used across all shops that your app is installed on.

Creating subscriptions using GraphQL Admin API

You can make app-specific subscriptions to all non-compliance topics through your app configuration file, or shop-specific subscriptions by Shopify's GraphQL Admin API.

For subscriptions managed with the GraphQL Admin API, use the webhookSubscriptionCreate mutation. Specify the $topic and $webhookSubscription parameters to create subscriptions.

Creating subscriptions using app configuration file

[webhooks]
api_version = "2023-04"

[[webhooks.subscriptions]]
topics = [
"products/create",
"products/update",
"products/delete"
]
uri = "pubsub://example:pub-sub-topic1"

[[webhooks.subscriptions]]
topics = ["orders/create"]
uri = "pubsub://example:pub-sub-topic2"

Every webhook delivery includes headers that describe the topic, source store, API version, and delivery IDs. Treat header names as case-insensitive in your code, because HTTP/2 often lowercases them.

HeaderDescription
X-Shopify-TopicThe topic name, such as products/update.
X-Shopify-Hmac-Sha256The Base64-encoded HMAC signature that you use to verify that Shopify sent the HTTPS delivery.
X-Shopify-Shop-DomainThe myshopify.com domain of the store that triggered the event.
X-Shopify-API-VersionThe API version that Shopify uses to serialize the payload.
X-Shopify-Webhook-IdA unique composite key for each delivery that you use to identify and deduplicate individual deliveries.
X-Shopify-Triggered-AtThe timestamp for when Shopify triggered the delivery.
X-Shopify-Event-IdA unique ID shared across all deliveries from the same merchant action.
X-Shopify-Name (optional)The developer-supplied subscription name, set with the name field in your subscription.

To learn more, see Webhooks delivery structure.

Example request headers

POST /webhooks/products HTTP/1.1
Host: your-app.example.com
Content-Type: application/json
X-Shopify-Topic: products/update
X-Shopify-Hmac-Sha256: xT6yH5jZfQm6Q3lC8nA0r7sV2bP9dK1eL4wG0hM5nYI=
X-Shopify-Shop-Domain: snowdevil.myshopify.com
X-Shopify-API-Version: 2026-07
X-Shopify-Webhook-Id: 545ebdd4-b7be-4d3d-b14e-54aa78e0e0f9
X-Shopify-Triggered-At: 2025-07-10T16:15:47.000000Z
X-Shopify-Event-Id: 59d6d79c-595f-4e7e-bc6f-72f5c3d0c66f
X-Shopify-Name: product-sync

All webhook topics you can subscribe to.

Was this section helpful?

inventory_items/update: Sample Payload

{
"id": 271878346596884015,
"sku": "example-sku",
"created_at": "2021-12-31T19:00:00-05:00",
"updated_at": "2021-12-31T19:00:00-05:00",
"requires_shipping": true,
"cost": null,
"country_code_of_origin": null,
"province_code_of_origin": null,
"harmonized_system_code": null,
"tracked": true,
"country_harmonized_system_codes": [],
"weight_value": 0.0,
"weight_unit": "lb",
"admin_graphql_api_id": "gid://shopify/InventoryItem/271878346596884015"
}

Filter events

Manage the number of event messages your app receives by filtering events. Unlike payload modifications, filters are made up of rules, applied to a webhook subscription, which act as a gate for whether or not webhooks are delivered when an event occurs.

Modify payloads

Shopify provides you with a way to modify the payload you receive when you subscribe to webhook topics. Unlike filters, which always return the same payload, this feature enables you to specify what subset of information is most relevant to your use case from a webhook.

Use alongside Events

For topics with Events support, you can run both an Events subscription and a webhook in the same shopify.app.toml. Events gives you field-level triggers and custom GraphQL payloads. Use webhooks for topics that don't yet have Events support.

Info

Events require Shopify CLI 3.92 or higher. Run shopify version to check your version.

Filter events

[[webhooks.subscriptions]]
topics = ["products/update"]
uri = "https://example.com/webhooks"
filter = "id:* AND status:active AND (product_type:Music OR product_type:Movies) AND -invalid_field:* AND variants.taxable:true AND variants.weight:<5 AND variants.price:>=100 AND variants.title:Album*"

Was this page helpful?