Skip to main content

Shopify

Receive webhook events from your Shopify store for orders, products, customers, fulfillments, inventory, and more — and route them to Discord, Slack, Telegram, or any HTTP endpoint.

Set up a Shopify source​

You connect Shopify by adding webhooks in your store's own admin and pointing them at a Dispatch source. There's no app to install and nothing to authorize.

In Dispatch​

  1. Go to Sources → Add Source → Shopify (or pick Shopify in the Source step of the Connect page).
  2. On Connect Shopify webhooks, click Generate webhook URL.
  3. Copy your webhook URL. Keep this screen open: you'll paste Shopify's signing key here in a moment.

If you change your mind, click Back to pick a different source type. Dispatch removes the source you started, or archives it if it has already received events.

In your Shopify admin​

  1. Go to Settings > Notifications > Webhooks and click Create webhook.
  2. Choose an event, select JSON, and paste your Dispatch webhook URL.
  3. Save the webhook. Add one webhook per event you want to receive; they can all use the same Dispatch URL.

Paste your signing key​

Shopify signs every webhook delivery with your store's signing key. After you save a webhook, Shopify shows the key below the list of webhooks on the same page.

  1. Copy the signing key from Shopify.
  2. Back in Dispatch, paste it into Paste your Shopify signing key. Dispatch saves it as soon as you leave the field and uses it to verify every delivery.

Check the connection, then finish​

  1. Send a test notification from one of your webhooks in Shopify. The setup screen in Dispatch confirms when the event arrives, and the event appears on your Events page.
  2. Click Done, or press Enter in the signing key field. Done is available once a signing key is entered. If the key can't be saved, the setup stays open and tells you why, so you can try again — unless you closed the dialog while it was saving, in which case the dialog closes and the unfinished source is removed.

If you set up the source from the Connect page, send another test notification once you reach its Listen step to watch it arrive live.

Sending from a custom app​

If you built a custom app for your own store and subscribe to webhooks through Shopify's API, point those subscriptions at the same Dispatch URL. Shopify signs an app's webhooks with the app's client secret, so paste the client secret into Paste your Shopify signing key instead of the store's signing key.

A custom app can also subscribe to topics your store admin doesn't offer. Disputes are among them: disputes/create and disputes/update arrive as built-in Dispute Created and Dispute Updated cards.

Supported topics​

Dispatch labels each event with its Shopify topic (for example orders/create) and has built-in message formatting for Shopify topics, including:

CategoryTopic
Ordersorders/create, orders/updated, orders/paid, orders/cancelled, orders/fulfilled, orders/delete, orders/edited
Productsproducts/create, products/update, products/delete
Customerscustomers/create, customers/update, customers/delete, customers/enable, customers/disable
Collectionscollections/create, collections/update, collections/delete
Fulfillmentsfulfillments/create, fulfillments/update
Inventoryinventory_items/*, inventory_levels/connect, inventory_levels/update, inventory_levels/disconnect
Checkoutscheckouts/create, checkouts/update, checkouts/delete
Refundsrefunds/create
Shopshop/update

Which events you can choose depends on what your store's webhook settings offer. Every webhook can point at the same source, and you can filter or route events by topic with the header.X-Shopify-Topic field (see Filters).

Signature verification​

Dispatch verifies every incoming Shopify webhook against the signing key saved on your source. Requests with a missing or invalid signature are rejected with 401 Unauthorized and never reach your destinations.

If the signing key changes​

If deliveries are rejected as an invalid signature, the key saved on the source doesn't match your store's. You don't need a new source:

  1. On the Sources page, open Edit Source on the Shopify source
  2. Paste the key Shopify shows on its Webhooks page into Shopify signing key
  3. Click Save

Deliveries verify against the new key from then on, and your webhooks keep the same URL.

Remove a Shopify source​

  1. In Dispatch, delete the source from the Sources page (see Deleting and Archiving).
  2. In your Shopify admin, delete the webhooks that point at the source's URL, so Shopify stops sending to it.