# Migrate from Shop-Specific Webhooks to App-Specific Webhooks

**URL:** <https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548>\
**Category:** Webhooks and Events\
**Tags:** configuring\
**Created:** [October 6, 2025, 9:38pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548 "2025-10-06T21:38:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [October 6, 2025, 9:38pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/1 "2025-10-06T21:38:41Z")

</div>

I have a Ruby on Rails app which uses the Shopify Ruby Template. The webhooks are currently configured in `web/config/initializers/shopify_app.rb`. I’m looking to migrate these to my TOML file. The current instructions I see for migrating are for apps using the GraphQL API. However, I do see methods in the `ShopifyApp::WebhooksManager`, like `destroy_webhooks`, which should be able to remove the existing webhooks before registering them again in the TOML file. Is this the correct method to use when migrating? If not, what is the protocol?

---

<div class="post-metadata">

**Author:** ![Ruben\_Stacksync](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/ruben_stacksync/32/10159_2.png) [@Ruben\_Stacksync](https://community.shopify.dev/u/Ruben_Stacksync)\
**Post date:** [October 6, 2025, 11:06pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/2 "2025-10-06T23:06:15Z")

</div>

Moving those shop-specific webhooks out of config/initializers/shopify\_app.rb and into shopify.app.toml is the right direction.

App-configured webhooks live in the TOML under [webhooks] and [[webhooks.subscriptions]]; once you deploy (shopify app deploy or your template’s npm run deploy), Shopify registers them for every store where your app is installed ([App configuration](https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#webhooks))

For cleanup, you’re correct that ShopifyApp::WebhooksManager.destroy\_webhooks is the safe way to remove the old per-shop registrations.

I typically run a small task that iterates each installed shop with an authenticated session and calls destroy\_webhooks, then remove any runtime webhook registration from the initializer so you don’t recreate them on next auth.

After that, rely solely on the TOML config and redeploy. You can confirm everything in your app’s Webhooks section or by firing a test delivery.

Shopify’s webhook docs give the broader context on behavior and delivery if you want to double-check expectations during the cutover ([About webhooks](https://shopify.dev/docs/apps/build/webhooks))

In short: delete legacy shop webhooks via `WebhooksManager`, remove initializer config, define webhooks in TOML, deploy, and verify deliveries. If this solves it, marking as solution will help others find the path.

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [October 6, 2025, 11:46pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/3 "2025-10-06T23:46:07Z")

</div>

Thanks for the detailed response @Ruben_Stacksync!

Can you expand on this part?

> I typically run a small task that iterates each installed shop with an authenticated session and calls destroy\_webhooks, then remove any runtime webhook registration from the initializer so you don’t recreate them on next auth.

Is this a Rake task?

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [October 7, 2025, 4:28pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/4 "2025-10-07T16:28:38Z")

</div>

👋 hey @chrismgala , I can’t speak to how @Ruben_Stacksync has set up his task, but you could set this up as a rake task or as a basic cron job if you’re not using Ruby. Essentially, you’d just query the existing webhooks for your app on the shop:

> **[webhookSubscriptions - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/latest/queries/webhooksubscriptions)**
>
> Retrieves a paginated list of shop-scoped webhook subscriptions configured for the current app. This query returns webhook subscriptions created via the API for this shop, not including app-scoped subscriptions configured via TOML files.
> 
> For...

Then, run this mutation on each of the subscriptions as needed:

> **[webhookSubscriptionDelete - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/latest/mutations/webhooksubscriptiondelete)**
>
> Removes an existing webhook subscription, stopping all future event notifications for that subscription. This mutation provides a clean way to deactivate webhooks when they're no longer needed.
> 
> For example, when an app feature is disabled or when...

Hope this helps, let me know if I can clarify anything on my end here!

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [October 10, 2025, 9:39pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/5 "2025-10-10T21:39:14Z")

</div>

Hey folks 👋 - just going to mark this thread as solved for tracking on our end here, but let me know if I can help out further.

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [October 11, 2025, 2:29am UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/6 "2025-10-11T02:29:49Z")

</div>

Thanks for the advice everyone. I ended up completing the migration last night with a Rake task using the `ShopifyApp::WebhooksManager.destroy_webhooks` method.

```ruby
shops = Shop.all

shops.each do |shop|
  shop.with_shopify_session do
    session = ShopifyAPI::Context.active_session
    ShopifyApp::WebhooksManager.destroy_webhooks(session: session)
  rescue => err
    puts err.inspect
  end
end

```

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [October 14, 2025, 5:53pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/7 "2025-10-14T17:53:03Z")

</div>

Glad to hear this solved the issue @chrismgala , and thanks for sharing your solution, really appreciated 🙂

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [June 15, 2026, 5:03pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/8 "2026-06-15T17:03:57Z")

</div>

It seems like this never actually worked. I just assumed it did, but I still get thousands of webhooks being sent to the old endpoint here from pre-migration. Thousands of webhooks for a handful stores that have uninstalled my app a long time ago. I tried deleting again for only uninstalled stores, but no luck in reducing the amount of webhooks.

This particular shop uninstalled last December, more than 6 months ago.

cc @Alan_G

 ![Screenshot 2026-06-15 at 12.02.06 PM](https://global.discourse-cdn.com/shopifycommunity/original/3X/a/b/ab8b4c9729d8adca2018669e7370e8f119a8cd4f.png)

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [June 17, 2026, 5:08pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/9 "2026-06-17T17:08:08Z")

</div>

Hey @chrismgala - thanks for looping back here, sorry to hear the issue is still popping up

I think the best thing we can check is whether these deliveries are coming from an app-specific/config-managed subscription, or from an older shop-specific subscription that was created through the Admin API.

Could you click into one of those failed log rows and share:

- the delivery URI/endpoint
- the subscription method
- subscription ID / webhook ID, if shown
- shop ID for [glo-portugal.myshopify.com](http://glo-portugal.myshopify.com)
- delivery attempt count + timestamp

That should tell us which cleanup path we’re on. If it’s shop-specific and the shop is already uninstalled/no longer has a valid token, you likely won’t be able to delete it from your side anymore, so we may need to look at things on our end. If it’s app-specific/config-managed, then I’d want to check the currently deployed app config/version to make sure the old endpoint isn’t still present there.

If you have one failed delivery’s details and can send it when you can and I’ll dig into the right path from there. If you’d prefer to set up a DM for this just let me know and I can get that sorted on my side.

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [June 18, 2026, 8:53pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/10 "2026-06-18T20:53:12Z")

</div>

Thanks @Alan_G.

Here are those details:

**Delivery URI** : `https://web-qla9.onrender.com/api/webhooks/orders_updated`

**Subscription Method** : Shop installed Oct 25th (after migration completed), so should be **App-Specific / Config-Managed**

**Webhook ID** : `14d38e2b-5f28-58fb-871f-8bff520d683f`

**Subscription ID** : `gid://shopify/WebhookSubscription/1614189592908`

**Shop ID** : `gid://shopify/Shop/61247029444`

**Delivery attempt** : 6

The Delivery URI is the old endpoint so it just results in `500` errors. My app no longer accepts webhooks at that path. I would’ve assumed since the shop uninstalled on Dec 14th, 2025, that Shopify’s retry limit of 8 would’ve handled this on its own.

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [June 24, 2026, 1:58pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/11 "2026-06-24T13:58:38Z")

</div>

Hey @chrismgala - thanks, this helps and sorry for the delay here.

One thing I want to confirm first: could you click into one of the newest failed rows and share the exact Subscription method value shown in the delivery details panel?

If it shows App specific/config-managed, the retry limit won’t clean up the subscription itself; we’ll want to check the active app version’s webhook config and app URL to make sure `orders/updated` isn’t still resolving to the old Render endpoint.

Those two cases are handled differently, so I don’t want to steer you toward deleting shop-specific webhooks if this is actually coming from the deployed app config, or vice versa.

If it shows shop-specific and the shop no longer has a valid token, that’s likely something we’ll need to look at on our end. A fresh failed row with the exact timestamp, API version, subscription method, subscription ID, webhook ID, and shop ID would be perfect.

Just wanted to grab those exact fields because the visible logs show the failure, but not the cleanup path. They should confirm `orders/updated` is still being delivered to the old endpoint and returning 500s, but we need the Subscription method/details to tell whether Shopify is sending that from the current app config or from an older shop-specific subscription. Hope to hear from you soon!

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [June 24, 2026, 6:31pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/12 "2026-06-24T18:31:56Z")

</div>

No worries @Alan_G! I’m sure things are crazy with Editions 😄

Turns out that store is **still on Shop-specific**. But, they _should’ve_ been subscribed to **App-specific**. Migration happened in early-mid October and they installed late October. Good thing is this problem is only limited to a handful of stores who have since uninstalled.

Details:

 ![Screenshot 2026-06-24 at 1.03.25 PM](https://global.discourse-cdn.com/shopifycommunity/original/3X/a/9/a9fd15424bed52579d4631f9a364ae2792f11682.png)

---

<div class="post-metadata">

**Author:** ![chrismgala](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/chrismgala/32/19159_2.png) [@chrismgala](https://community.shopify.dev/u/chrismgala)\
**Post date:** [October 4, 2026, 4:43pm UTC](https://community.shopify.dev/t/migrate-from-shop-specific-webhooks-to-app-specific-webhooks/23548/13 "2026-10-04T16:43:26Z")

</div>

Hey @Alan_G, hope your Summer was warm and relaxing 🏖

I’ve revisited this and re-attempted a `ShopifyApp::WebhooksManager.destroy_webhooks` for shops. No luck there.

Another wrinkle is that a lot of the shops still have the app installed, but they’re not using it (no active subscription).

The original issue from this 🧵 is still that their webhooks are going to an old endpoint and that something didn’t fully migrate over between the Shop-specific and App-specific switch.

This isn’t urgent or a huge priority, but it’d be nice to clean some of this up. Please let me know if you were able to find the needle in the haystack.
