Best way to unsubscribe from a webhook in all stores?

My app is subscribed to the discounts/delete webhook but I don’t need it anymore. After I deleted the webhook endpoint from my app I noticed that stores are still subscribed to this webhook.

What’s the best way to cancel that subscription from all stores that currently have one?

Any insight is appreciated, thank you!

Hi @Pridentt

You should be able to use the webhookSubscriptionDelete mutation for this, but you will need to query webhookSubscriptions first to get the ID of the specific webhook.

Got it, thank you @Liam-Shopify