Magento 2 Webhooks: Send Events Reliably to External URLs
SKU: WEBHOOKS1
- order, customer and stock events to your own URLs
- signature in the header, verified by the receiver
- automatic retry with growing wait times
- delivery log with status code and manual resend
Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.
Magento 2 webhooks: your shop reports events instead of being polled
With the Magento 2 webhooks module from Mironsoft your shop automatically sends a message to an external URL when an event occurs. A new order, a changed stock figure or a customer registration reaches your inventory system, carrier or chat channel at the moment it happens. Delivery runs through a queue and does not slow down checkout. You maintain endpoints, events and signature in the admin.
Choose events
Order created, status changed, invoice, shipment, credit memo, customer registered or stock changed.
Own endpoints
Any number of target URLs, each endpoint with its own event selection, secret and store scope.
Signature
Every message carries a signature in the header. The receiver uses it to verify that it comes from your shop.
Retry
If the receiver answers with an error, the module tries again with growing wait times.
Delivery log
Every attempt is stored with time, status code and response and can be resent.
Decoupled
Sending runs in the background through the queue, so the customer does not wait for external systems.
Why Magento 2 webhooks beat constant polling
The REST API of Magento is a retrieval path: the external system asks at fixed intervals whether anything is new. That creates load even when nothing happens and delivers news only on the next run. Merchants therefore look for Magento 2 webhooks, for a way to set up a Magento 2 order webhook, or for a way to send events to a URL.
With Magento 2 webhooks the direction reverses. The shop speaks up when something happens. Your warehouse sees the order immediately, your team gets the message in chat and the newsletter service knows new customers without delay. At the same time the polling job that strains the system disappears.
Set up Magento 2 webhooks: endpoints and events in the admin
An endpoint consists of a URL, an event list and optional extra headers, for instance a token. Per endpoint you choose which events are sent and restrict them to one store view if only part of your shop is affected. A test send checks whether the receiver answers. Endpoints can be deactivated individually without deleting the configuration.
- Event selection per endpoint, optionally per store view
- Additional headers, for example for access tokens
- Test send and single activate or deactivate
Define the message content of Magento 2 webhooks
The message is a JSON document with event name, time, a unique identifier and the data of the object. You decide which fields are included: whoever needs only the order number and status sends no address. The unique identifier helps the receiver to detect duplicate deliveries. Which personal data you may transmit to which service is for the shop owner to assess legally.
- JSON with event name, time and identifier
- Fields selectable per endpoint, data minimisation possible
- Unique identifier against duplicate processing
Verify the signature of Magento 2 webhooks
Every message carries a signature in the header, calculated from the content and a secret key. The receiver recalculates it on its side and thereby knows that message and sender are genuine. The secret is stored per endpoint and can be renewed at any time. The header also contains a timestamp so that old messages cannot be replayed. The target address must use HTTPS.
- Signature from content and secret key
- Timestamp against replay of old messages
- Key renewable per endpoint, HTTPS required
Retry and delivery log for Magento 2 webhooks
External systems are not always reachable. If a receiver answers with an error or not at all, the module tries the delivery again after growing wait times until the maximum you set is reached. After that the message is marked as failed and appears in the log. There you see time, status code and a response excerpt and can resend the message with one click. A cron job cleans up old entries after your retention period.
- Retry with growing wait times, maximum adjustable
- Log with status code, time and response excerpt
- Resend by click, automatic cleanup by cron
Where Magento 2 webhooks help in daily shop work
Typical connections that work without a polling job.
Inventory system and ERP
With Magento 2 webhooks new orders reach the inventory system at the moment they are created. The polling job disappears.
Shipping and warehouse
A carrier receives the order immediately and a changed stock figure goes to the warehouse system.
Chat and notification
The team sees large orders or low stock directly in a chat channel without checking a mailbox.
Marketing and newsletter
New customers and changed order statuses flow into a newsletter or automation system as soon as they arise.
Magento 2 webhooks compared: without and with the module
The difference to retrieval via REST API.
| Topic | Without the module | With Mironsoft Webhooks |
|---|---|---|
| Direction | External system asks at intervals | Shop reports the event itself |
| Timeliness | Only at the next retrieval | Seconds after the event |
| Load | Requests even without news | Message only on event |
| Receiver outage | Data gets lost in the retrieval | Retry and resend |
| Evidence | Hard to trace | Log with status code |
How we set up Magento 2 webhooks for you
The process after your order.
Agreement
You name the target systems and the events that should arrive there.
Installation
We install Magento 2 webhooks and set up the queue with cron.
Endpoints
We create endpoints, fields, signature and retry rules together with you.
Test
We send test messages, verify the signature at the receiver and simulate an outage.
Handover
Your team gets an introduction to log and resend.
Scope: REST API and ready-made integrations
The REST API of Magento remains the right path when a system should fetch data itself or write data into the shop. Magento 2 webhooks complements it with the opposite direction: the shop reports events. It is not a ready-made connection to a particular ERP or carrier. The receiver has to be able to process the message or an intermediate step translates it.
Configuration happens in the admin, without frontend output. The Hyvä theme and its Alpine.js components remain untouched and no script is loaded in the shop.
No download, but personal setup
Webhooks is not listed here as a finished download file for self-installation. The purchase is a commission: after the purchase we get in touch, install the module in your shop and set up the first endpoints together with you.
Frequently asked questions
Everything important about events, signature, retry and how the purchase works.
How can I set up webhooks in Magento 2?
Which events can I send by webhook in Magento 2?
How can I secure webhooks in Magento 2?
What happens if the receiver does not answer?
Do Magento 2 webhooks slow down checkout?
Can I resend a message?
How can I control which data a webhook contains in Magento 2?
Do Magento 2 webhooks work with Hyvä?
Does the module replace the REST API?
Can I download and install the module myself?
Magento 2 Webhooks – Mironsoft