Add a webhook channel
- Open Alerts. In the dashboard, open Alerts in the sidebar and pick the Webhook tile.
- Name and target. Give the channel a Name and paste your endpoint into Target. It must be an
http://orhttps://URL. - Choose the stores. Applies to sends alerts for All stores or for a single store.
- Decide when it fires. When it fires, and reminders holds Min severity (Error by default), Alert after a number of failures in a row, and reminders. The defaults send every new failure.
- Add and test. Press Add channel, then Test on the channel’s row. The test request goes out at once and its result appears under Recent deliveries.
Recovery notices are on by default; switch off Notify on recovery in the channel’s Edit form if you only want failures. Each channel counts toward your plan’s alert channel limit, which is one on the Free plan. The dashboard treats the target as a secret: the field is masked and the saved URL is never shown again.
The request
Every alert is one POST to your URL with content-type: application/json and a JSON body. MageSentinel does not sign webhook requests: there is no signature header and no shared secret in the request. How to keep strangers out is covered under Securing the endpoint below.
| Field | Type | Meaning |
|---|---|---|
source | string | Always magesentinel. |
kind | string | failure, recovery, config-gap, config-gap-closed or test. |
tone | string | fail, recovery or test. A config-gap is fail, a config-gap-closed is recovery. |
storeUrl | string | The store’s URL as added in MageSentinel. |
runId | string | The check that produced the alert. Absent on a test. |
status | string | The status of that check, such as FAIL or PASS, or TEST on a test. |
code | string | The failure code, such as PAYMENT_NO_METHODS, or CONFIG_GAP. Absent on recoveries and tests. |
subject | string | One-line summary, the same as the email subject. |
text | string | The whole alert as plain text, the same as the email’s text body. |
host | string | The store’s host name. |
failureMessage | string | What broke, in plain words. |
failedStep | string | The step that failed, such as cart, shipping or payment. |
startedAt | string | When the check started, ISO 8601 in UTC. |
durationMs | number | How long the check ran, in milliseconds. |
incidentSummary | string | Who is affected and the most likely cause. |
topCause | object | title, confidence (0 to 1), nextStep and explanation of the most likely cause. |
failedAssertions | array | Up to five { name, message } pairs for the checks that failed. Empty on recoveries. |
links | object | run, incident and store links into the dashboard, where they apply. |
dashboardUrl | string | https://magesentinel.com. |
sentAt | string | When this request was sent, ISO 8601 in UTC. |
A field that does not apply is left out of the body, not sent as null. Always present: source, kind, tone, storeUrl, status, subject, text, host, failedAssertions, links, dashboardUrl and sentAt. Ignore fields and kind values you do not recognise.
The subject names which of the store’s checks changed state: checkout, http check, customer sign-in or store search. Each has its own failures and recoveries. The text of every field is in English.
Failure
Sent when a store starts failing, when an open failure changes to a different failure code, and as a reminder if the channel has reminders on. A check that ends UNKNOWN or only slow (DEGRADED) never sends one. See Scheduling and alerts for the full rules.
{
"source": "magesentinel",
"kind": "failure",
"tone": "fail",
"storeUrl": "https://shop.example.com/",
"runId": "cmiq7x2lk00a1qs8f3ce9d0b4",
"status": "FAIL",
"code": "PAYMENT_NO_METHODS",
"subject": "[MageSentinel] shop.example.com checkout FAILED — PAYMENT_NO_METHODS",
"text": "Checkout check FAILED for shop.example.com\n\nNo customer can complete a purchase on shop.example.com. Most likely cause: Payment methods are enabled in admin but none reached the checkout.\n\nWhat broke: No payment method is offered. Failed at: payment.\nTechnical: No payment methods available at checkout\nError code: PAYMENT_NO_METHODS (PAYMENT, critical)\nFailed step: payment\nStore: https://shop.example.com/\nRun: cmiq7x2lk00a1qs8f3ce9d0b4 at 2026-12-04T09:30:02.114Z (41.9s)\n\nLikely cause (75% confidence): Payment methods are enabled in admin but none reached the checkout\n The store has active payment methods configured, yet the checkout offered none. That points at country/currency restrictions, a failing payment extension, or an error while loading payment information.\n Next step: Compare the payment method restrictions with the country used by the check, and look for errors from the payment extension.\n\nFailed checks:\n - PaymentAvailable: No payment methods available at checkout\n\nView run evidence: https://magesentinel.com/app/runs/cmiq7x2lk00a1qs8f3ce9d0b4",
"host": "shop.example.com",
"failureMessage": "No payment method is offered. Failed at: payment.",
"failedStep": "payment",
"startedAt": "2026-12-04T09:30:02.114Z",
"durationMs": 41870,
"incidentSummary": "No customer can complete a purchase on shop.example.com. Most likely cause: Payment methods are enabled in admin but none reached the checkout.",
"topCause": {
"title": "Payment methods are enabled in admin but none reached the checkout",
"confidence": 0.75,
"nextStep": "Compare the payment method restrictions with the country used by the check, and look for errors from the payment extension.",
"explanation": "The store has active payment methods configured, yet the checkout offered none. That points at country/currency restrictions, a failing payment extension, or an error while loading payment information."
},
"failedAssertions": [
{
"name": "PaymentAvailable",
"message": "No payment methods available at checkout"
}
],
"links": {
"run": "https://magesentinel.com/app/runs/cmiq7x2lk00a1qs8f3ce9d0b4",
"incident": "https://magesentinel.com/app/incidents/cmiq7x2lk00a1qs8f3ce9d0b4",
"store": "https://magesentinel.com/app/stores"
},
"dashboardUrl": "https://magesentinel.com",
"sentAt": "2026-12-04T09:31:12.408Z"
}Recovery
Sent on the first passing check after a failure, only to channels that were told about that failure and have Notify on recovery on.
{
"source": "magesentinel",
"kind": "recovery",
"tone": "recovery",
"storeUrl": "https://shop.example.com/",
"runId": "cmiq8b0rd00c4qs8f9a1k2m7x",
"status": "PASS",
"subject": "[MageSentinel] shop.example.com checkout recovered",
"text": "Checkout RECOVERED for shop.example.com\nStatus: PASS\nStore: https://shop.example.com/\nRun: cmiq8b0rd00c4qs8f9a1k2m7x at 2026-12-04T10:00:03.551Z (38.2s)\nView run: https://magesentinel.com/app/runs/cmiq8b0rd00c4qs8f9a1k2m7x",
"host": "shop.example.com",
"startedAt": "2026-12-04T10:00:03.551Z",
"durationMs": 38214,
"failedAssertions": [],
"links": {
"run": "https://magesentinel.com/app/runs/cmiq8b0rd00c4qs8f9a1k2m7x",
"store": "https://magesentinel.com/app/stores"
},
"dashboardUrl": "https://magesentinel.com",
"sentAt": "2026-12-04T10:00:44.032Z"
}Checkout-method notices
A config-gap notice says that a payment method the store reports as enabled was not offered at checkout on the last two checks, while the checkout still offered other methods. It needs the Magento module or the WordPress plugin to be connected, since that is where the enabled methods come from. A config-gap-closed notice follows when the method is offered again, only to channels that got the first one. Both go to every enabled channel of the store, whatever its severity and escalation settings.
{
"source": "magesentinel",
"kind": "config-gap",
"tone": "fail",
"storeUrl": "https://shop.example.com/",
"runId": "cmiq9c1te00d2qs8f4b7h1n3y",
"status": "PASS",
"code": "CONFIG_GAP",
"subject": "[MageSentinel] shop.example.com: payment method missing at checkout",
"text": "shop.example.com: customers can no longer choose payment: checkmo.\nThe store reports these methods as enabled, and the checkout did not offer them on the last two checks. The checkout still works with other methods, so nothing else alerted.\nNext: Check that method's country, currency or shipping-zone restrictions and its minimum order total, then the error log of the extension or plugin that provides it.\nView run: https://magesentinel.com/app/runs/cmiq9c1te00d2qs8f4b7h1n3y",
"host": "shop.example.com",
"failureMessage": "Enabled in admin but not offered at checkout (payment: checkmo)",
"startedAt": "2026-12-04T11:00:02.900Z",
"durationMs": 39120,
"incidentSummary": "Enabled in admin but not offered at checkout (payment: checkmo)",
"failedAssertions": [],
"links": {
"run": "https://magesentinel.com/app/runs/cmiq9c1te00d2qs8f4b7h1n3y",
"store": "https://magesentinel.com/app/stores"
},
"dashboardUrl": "https://magesentinel.com",
"sentAt": "2026-12-04T11:00:43.120Z"
}Test
What Test on the channel’s row sends. Use it to check that your endpoint parses the body and answers 2xx.
{
"source": "magesentinel",
"kind": "test",
"tone": "test",
"storeUrl": "https://example.test",
"status": "TEST",
"subject": "[MageSentinel] Test alert — Ops webhook",
"text": "This is a test notification from MageSentinel for the \"Ops webhook\" channel.\nIf you can see this, delivery works.\n\nDashboard: https://magesentinel.com/app",
"host": "example.test",
"failureMessage": "Test notification for the Ops webhook channel",
"failedAssertions": [],
"links": {},
"dashboardUrl": "https://magesentinel.com",
"sentAt": "2026-12-04T08:12:05.517Z"
}Delivery, timeouts and retries
| Rule | Behaviour |
|---|---|
| Timeout | MageSentinel waits 10 seconds for an answer. |
| Success | Any 2xx status. Anything else, a timeout or a connection error is a failed delivery, recorded with the status and up to 200 characters of your response body. |
| Redirects | Followed up to four hops. A 301, 302 or 303 turns the POST into a GET without a body, so point the channel at the final URL. |
| Address | The host must resolve to a public address. Private, loopback and link-local addresses such as 10.x, 192.168.x, 127.0.0.1 and 169.254.x are refused. |
| Retries | No immediate retry. A failure alert only counts as sent once delivered, so one that did not get through is sent again with the next failing check of that store. A recovery, notice or test that fails is not sent again. |
Every delivery, sent or failed, is listed under Recent deliveries on the Alerts page. After three failed deliveries in a row on a channel (tests not counted), the workspace owner gets one email naming the channel and the error.
MageSentinel can hold the first page of a new failure for up to 30 minutes while it re-checks the store or reviews the evidence; if the store passes the re-check, the page is dropped. That is why sentAt can be later than startedAt by more than the run’s duration. Use runId with kind to recognise a request you have already handled.
Securing the endpoint
Because requests are unsigned, the URL is the only secret. Put a long random value in it, as a path segment or a query parameter, and reject any request that does not carry it. Answer quickly and do slow work after the response: MageSentinel stops waiting after 10 seconds.
// Target: https://hooks.example.com/magesentinel?key=YOUR_SECRET
import { createServer } from 'node:http';
import { timingSafeEqual } from 'node:crypto';
const SECRET = Buffer.from(process.env.MAGESENTINEL_WEBHOOK_SECRET ?? '');
createServer((req, res) => {
const key = Buffer.from(new URL(req.url, 'http://localhost').searchParams.get('key') ?? '');
if (req.method !== 'POST' || SECRET.length === 0 || key.length !== SECRET.length || !timingSafeEqual(key, SECRET)) {
res.writeHead(404).end();
return;
}
let raw = '';
req.on('data', (chunk) => (raw += chunk));
req.on('end', () => {
let alert;
try {
alert = JSON.parse(raw);
} catch {
res.writeHead(400).end();
return;
}
res.writeHead(204).end(); // answer first: MageSentinel waits 10 seconds at most
if (alert.kind === 'failure') console.log(alert.subject, alert.links?.run);
});
}).listen(8080);<?php
// Target: https://example.com/magesentinel-hook.php?key=YOUR_SECRET
$secret = (string) getenv('MAGESENTINEL_WEBHOOK_SECRET');
$key = (string) ($_GET['key'] ?? '');
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || $secret === '' || !hash_equals($secret, $key)) {
http_response_code(404);
exit;
}
$alert = json_decode((string) file_get_contents('php://input'), true);
if (!is_array($alert)) {
http_response_code(400);
exit;
}
if (($alert['kind'] ?? '') === 'failure') {
error_log($alert['subject'] . ' ' . ($alert['links']['run'] ?? ''));
}
http_response_code(204);If the secret leaks, set a new one on your side and paste the new URL with Edit on the channel.
More docs
- How checkout monitoring works: MageSentinel drives a real browser through product, cart, checkout, shipping and payment on your Magento or WooCommerce store, then asserts the business result.
- Failure codes: Each MageSentinel failure has one stable code: STORE, PRODUCT, CART, CHECKOUT, SHIPPING, TAX, PAYMENT, ORDER, NETWORK or INTERNAL. Never a raw exception.
- What UNKNOWN means: MageSentinel never forces an unclear run into PASS or FAIL. UNKNOWN is a first-class outcome for runs that reached no conclusive point, and it never pages.
- Evidence and redaction: A failing MageSentinel run keeps a full-page screenshot, a redacted network log, console errors and Web Vitals. Secrets are stripped as evidence is written.
- Scheduling and alerts: MageSentinel runs the checkout check from once a day on Free to every 5 minutes on Scale and alerts once per PASS/FAIL change, not on every failing check.
- REST API reference: The MageSentinel REST API: authenticate with an API key, list stores, monitors, runs and incidents, and start a checkout check from CI after a deploy.
- Install the Magento 2 module: Install magesentinel/module-monitor with Composer, paste the connector token in Stores › Configuration › MageSentinel and check that the connection works.
- Install the WordPress plugin: Install the MageSentinel plugin for WooCommerce from WordPress.org, use its free health page and email alerts, then switch on the connector with a token.