Monitor your Lemon Squeezy webhook

If your Lemon Squeezy webhook endpoint goes down for an hour, paid subscriptions don't activate, cancellations don't propagate, and recovered payments don't lift dunning. You don't find out from Lemon Squeezy — you find out from a support ticket the next day.

A naïve monitor that just sends GET /api/payments/webhook won't help: the endpoint requires a valid X-Signature header, so any unsigned request returns 400. Here's how to do it right.

Approach 1 — POST a synthetic payload (recommended)

Valpero supports POST monitors with custom headers and body. Add a lightweight ping path that bypasses the signature check when a special token is present.

1. Add a ping branch to your webhook handler

@router.post("/api/payments/webhook")
async def payment_webhook(request: Request):
    if request.headers.get("x-valpero-ping") == settings.VALPERO_PING_TOKEN:
        return {"ok": True, "ping": True}
    raw_body = await request.body()
    sig = request.headers.get("x-signature", "")
    # …normal Lemon Squeezy verification below

2. Create a Valpero monitor

HTTP, POST, body {}, header X-Valpero-Ping: <your token>. Add a keyword check for "ping": true.

If the endpoint is unreachable, returns 5xx, or stops matching the keyword, Valpero alerts you within 30 seconds (Pro plan).

Approach 2 — Watch a downstream side-effect (heartbeat)

If you can't modify the webhook handler, watch what happens after a real subscription_payment_success event lands. Hit a Valpero heartbeat URL after each successful event:

import httpx
await httpx.get("https://valpero.com/heartbeat/PING_TOKEN")

If no event arrives in N minutes, Valpero alerts you. Catches both "endpoint down" and "Lemon Squeezy stopped delivering events."

Don't rely on heartbeats alone — they miss the case where your endpoint quietly returns 200 but doesn't process the event. Combine with Approach 1.

Bonus — monitor Lemon Squeezy's own status

Add a Valpero monitor against https://status.lemonsqueezy.com/ with a keyword check for All Systems Operational. When Lemon Squeezy itself is degraded, you'll know before your customers ask.

Wrapping up

Three monitors total — synthetic POST, heartbeat, LS status page. Together they cover the full failure surface with minimal overhead.

// share:
// try the tools: SSL · DNS · Ping · Headers

Stop checking by hand. Get paged automatically.

Free forever for one site. No card required.

Start free →
// related
Custom domain for your status page
6 min read
Redeeming an AppSumo / lifetime deal code
3 min read
Free web tools — what each one does
5 min read