Skip to content

The moment it happens

Get emailed when a renewal fails or a subscriber cancels

An email for each failed renewal payment or cancellation, so you can follow up before the customer is gone.

Runs
The moment it happens
Apps
Lemon Squeezy
AI
Not needed
Access
API key

Send this to your assistant

Create a ClickRuntime automation: email me at hello@mystore.com whenever a Lemon Squeezy subscription payment fails or a subscription is cancelled, with the customer email, product and what happened.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Subscription revenue leaks in two ways that are easy to miss: a card fails when a renewal is attempted, and a customer cancels, often after a bad experience that you could have fixed. In Lemon Squeezy both events happen quietly. Without being told, a founder may spend a month before realizing that payment recovery was needed or that three customers canceled for the same reason.

When a subscription payment fails or a customer cancels, Lemon Squeezy notifies ClickRuntime, which emails you the customer, the plan and what happened. You can reach out to a failed renewal while the card issue is fresh and ask a canceling customer what went wrong.

It matters most for software and membership products where a few customers account for a large share of income. Each alert is a chance to keep a customer.

What you get out of it

  • Failed payments get recovered

    Many failed renewals come from expired cards or a bank flag, and customers update their details if asked. A prompt personal email recovers revenue that would otherwise lapse into an unintended cancellation.

  • Cancellation reasons can still be learned

    A short message sent right after someone cancels often gets an honest answer. Those answers show the problems, from pricing to missing features, that cost you customers. Those answers shape the roadmap better than guessing does.

  • Patterns appear before they hurt

    If three cancellations in a week mention the same missing feature or a confusing invoice, you notice the trend at once. Waiting for a monthly report would hide it for weeks.

  • Support can prepare for angry customers

    When a renewal fails and the customer is charged twice or loses access, they often write in upset. Knowing the event happened lets support answer in context instead of searching for what went wrong.

  • Churn is tracked without a spreadsheet

    The emails themselves form a log of when and why customers left. You can count them at month end and compare with revenue, without compiling a manual list. That makes churn easy to explain to partners or investors.

How it works

What happens, step by step

  1. When a Lemon Squeezy renewal payment fails or a subscriber cancels, Lemon Squeezy tells ClickRuntime straight away.

  2. ClickRuntime picks out the customer, the product and what happened.

  3. You get an email with those details, including when access ends for a cancellation.

Before it runs live

  • Connect Lemon Squeezy
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get emailed when a renewal fails or a subscriber cancelsjust nowSucceeded
Email · Lemon Squeezy subscriptionCustomer: dana@acme.example Product: Icon Pack Pro Subscription cancelled, access ends 2026-11-19

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Lemon Squeezy steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
failed_renewal_cancellation_alert.pyexample
from clickruntime import on_event, credentials, notify

import hashlib, hmac

def signed(event):
    digest = hmac.new(credentials.secret("LEMONSQUEEZY_SIGNING_SECRET").encode(), event.body.encode(),
                      hashlib.sha256).hexdigest()
    return hmac.compare_digest(digest, event.header("X-Signature") or "")

@on_event
def handle(event):
    if not signed(event):
        return {"emailed": False, "reason": "bad signature"}
    body = event.json
    name, attrs = body["meta"]["event_name"], body["data"]["attributes"]
    if name == "subscription_payment_failed":
        what, product = f"Renewal payment of {attrs['total_formatted']} failed", f"subscription {attrs['subscription_id']}"
    elif name == "subscription_cancelled":
        what, product = f"Subscription cancelled, access ends {attrs['ends_at'][:10]}", attrs["product_name"]
    else:
        return {"emailed": False}
    notify.email_me(f"Lemon Squeezy: {what}", f"Customer: {attrs['user_email']}\nProduct: {product}\n{what}")
    return {"event": name}

FAQ

Common questions

Which Lemon Squeezy events does it listen for?
It listens for subscription events that signal a failed payment and for subscription cancellations. Both arrive as webhooks. Lemon Squeezy has more subscription events, such as expiry and pause, and those can be added if you want to hear about them too.
Does a failed payment mean the subscription is canceled?
Not immediately. Lemon Squeezy retries failed payments for a period before the subscription moves on, so the alert is your chance to contact the customer during that window. A later cancellation event, if it comes, will produce its own email.
Can the email go to a teammate in support?
Yes. The recipient is set in the automation, and it can be a shared support address or several people. Some teams send failed payments to billing and cancellations to the person who owns customer success.
What permissions does it need?
API key. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get emailed when a renewal fails or a subscriber cancels” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.