Installing the Webhooks module and starting the queue consumer
Requirements
- Magento Open Source or Adobe Commerce 2.4.7 - 2.4.8
- PHP 8.2, 8.3, or 8.4
- A working Magento cron (
bin/magento cron:runscheduled every minute) - the module relies on cron for retries, log pruning, and (by default) running the queue consumer
Install via Composer
composer require ocmlabs/module-webhookbin/magento module:enable OCMLabs_Webhookbin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:flushAdobe Commerce customers instead run composer require ocmlabs/module-webhook-commerce - a metapackage that licenses the module for Adobe Commerce and pulls in ocmlabs/module-webhook automatically. The remaining bin/magento steps are identical.
Verify the installation
bin/magento module:status OCMLabs_WebhookIn the admin panel, navigate to System > OCM Labs > Webhooks. If the menu item is visible, the module installed correctly. Ten disabled sample webhooks - one per curated event, each carrying its default payload template - are installed on first setup so you can start from a working example.
Start the queue consumer - the module does nothing without it
This is the step people miss. Publishing an event to the queue is not delivery: the consumer ocmlabs.webhook.trigger has to actually be running for anything to reach a destination URL. On the default db queue connection there is no broker pushing messages to you. If webhooks save fine but nothing ever arrives, this is why.
There are two supported ways to keep the consumer running - use one, not both:
Option 1: Magento cron (default behavior). If your app/etc/env.php has no cron_consumers_runner key, Magento’s cron starts every registered consumer automatically, including this one. With a working system cron, no extra configuration is needed. To scope it explicitly:
'cron_consumers_runner' => [ 'cron_run' => true, 'max_messages' => 10000, 'consumers' => ['ocmlabs.webhook.trigger'],],Option 2: process supervisor. Run the consumer as a long-lived daemon under supervisord or similar:
bin/magento queue:consumers:start ocmlabs.webhook.trigger --max-messages=10000--max-messages makes the process exit periodically so the supervisor can restart it, avoiding unbounded memory growth in long-running PHP processes.
Grant admin access
The module registers three ACL resources under System > Permissions > User Roles:
- OCMLabs_Webhook::manage - create, edit, enable/disable webhooks (with a separate delete child resource)
- OCMLabs_Webhook::log - view the delivery log
- OCMLabs_Webhook::config - change module configuration
Create your first webhook
- Go to System > OCM Labs > Webhooks and click Add New Webhook.
- Name it, pick an event (for example “Order Placed”), and choose the store views it should fire for.
- Enter your destination URL. Optionally set a secret (enables HMAC signing) and authentication.
- Adjust the prefilled payload template if needed - the “Available Template Variables” panel below the editor documents everything you can reference.
- Click Send Test to deliver a sample payload synchronously and see the response, then Save Webhook.
Trigger the real event (place an order) and watch it arrive in System > OCM Labs > Delivery Log.
Production notes
Payload logging (Stores > Configuration > OCM Labs > Webhooks > General > Log Payloads) is off by default so potentially sensitive request bodies are not stored in the log table - enable it only while debugging. The Advanced flags “Allow Private Networks” and “Allow Insecure URL (HTTP)” are development conveniences; leave them off in production so the SSRF guard stays meaningful.