apps.patrol docs

Shopify webhooks

Forward app/uninstalled and shop/update to Apps Patrol.

Point two of your app's Shopify webhooks at Apps Patrol and uninstalls and shop changes arrive within seconds, instead of at the next Partner sync.

Set up

  1. Open Settings → Apps & integration and copy the app's webhook URL. It looks like
    https://www.apps-patrol.com/webhooks/shopify/<app public id>
  2. On the same card, save the app's client secret (from the app's settings in the Partner Dashboard). Apps Patrol uses it to verify Shopify's signature. Without it every delivery is rejected.
  3. Add the subscription to your app's shopify.app.toml and deploy:
    [[webhooks.subscriptions]]
    topics = ["app/uninstalled", "shop/update", "app_subscriptions/update"]
    uri = "https://www.apps-patrol.com/webhooks/shopify/<app public id>"
    
    [[webhooks.subscriptions]]
    compliance_topics = ["customers/data_request", "customers/redact", "shop/redact"]
    uri = "https://www.apps-patrol.com/webhooks/shopify/<app public id>"

Your app can keep its own subscriptions to the same topics; Shopify delivers to every subscriber.

Topics handled

TopicEffect
app/uninstalledMarks the shop's installation as uninstalled and cancels its subscription, at the time of receipt.
shop/updateUpdates the shop's name, email, country and Shopify plan.
app_subscriptions/updateSets the shop's subscription to active, frozen or cancelled as Shopify reports it, minutes before the Partner sync would.
shop/redactErases what Apps Patrol holds about the shop for this app: its usage events, its email contact, and its name, email, country and plan. Install and billing history stays, keyed by the shop domain, so revenue figures remain correct.
customers/redact, customers/data_requestAcknowledged. Apps Patrol stores no data about a merchant's customers, so there is nothing to erase or return.

Other topics are recorded as ignored.

If you forward the compliance topics here, your app must still handle them for the data it stores itself. Shopify delivers to every subscribed address.

Delivery log

Settings → Apps & integration → Recent webhook deliveries lists the last 50 deliveries for an app with topic, shop, time and result: processed, ignored (unknown topic or shop), failed, or received while it is still queued.

Verification and responses

Each delivery is checked against the X-Shopify-Hmac-Sha256 header using the saved client secret. Deliveries are deduplicated on X-Shopify-Webhook-Id per app, so a retry from Shopify is answered with 200 and not processed twice.

StatusMeaning
200Accepted and queued.
401Signature did not match, or no client secret is saved.
404Unknown app ID in the URL.
400Body is not valid JSON.

Troubleshooting

  • 401 on every delivery: the client secret is missing or belongs to another app. Save it again.
  • Nothing arrives: check the delivery log for the subscription in the Partner Dashboard, and that the URL contains the right app ID.