Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
I have a Rails Shopify app, which belongs to different shops.
I tried to create a new webhook fulfillments/create with the shopify-app gem.
This is my config:
ShopifyApp.configure do |config| config.api_key = ENV["SHOPIFY_API_KEY"] config.secret = ENV["SHOPIFY_API_SECRET"] config.scope = ENV["SHOPIFY_SCOPE"] config.embedded_app = true config.webhook_jobs_namespace = "shopify_webhooks" config.webhooks = %w( app/uninstalled fulfillments/create orders/create shop/update ).map do |topic| { topic: topic, address: "https://#{ENV['APPLICATION_HOST']}/webhooks/#{topic.gsub(%r{/}, '_')}", format: "json", } end end
and my job:
module ShopifyWebhooks class FulfillmentsCreateJob < WebhookJob def process_webhook(shop, webhook) # do something end end end
However, i cannot see the webhook firing, when it should.
How can I check if the webhook exists? And if it does, why it is not firing?
Solved! Go to the solution
This is an accepted solution.
I found out that I should have run a rake task on the app to register Webhooks.
Now everything works perfectly.
This is an accepted solution.
I found out that I should have run a rake task on the app to register Webhooks.
Now everything works perfectly.