Skip to content

The moment it happens

Get an email for each Lemon Squeezy refund

Every refunded order reaches your inbox with the product, customer and amount returned.

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

Send this to your assistant

Create a ClickRuntime automation: when a Lemon Squeezy order is refunded, email me the product, the customer's email and the refunded amount.

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

A refund is rarely just a refund. It might mean a buyer found the product confusing, a duplicate charge, a customer who never got the download link or a pattern of chargebacks waiting to happen. When someone requests one in Lemon Squeezy, the money simply leaves the balance. Founders who see it only in a monthly statement have lost the chance to ask why or to fix whatever caused it.

Whenever an order is refunded, Lemon Squeezy sends an event to ClickRuntime. The automation verifies the signature on the request and then emails you the order, the product, the amount refunded and the customer, so the refund reaches the person who can follow up with the buyer while the conversation is still alive.

It is especially valuable for sellers of digital products, where refund rates quietly shape profit.

What you get out of it

  • The reason behind a refund can be asked

    A brief, polite email shortly after a refund often gets a candid answer. That feedback is among the most honest you will receive about product quality and the clarity of your sales page.

  • Fraud and abuse patterns appear sooner

    Repeated refunds from similar accounts, or a spike right after a promotion, point to abuse. Being told about each one lets you act before it becomes a pattern that costs real money.

  • Access can be revoked on time

    If a refunded customer still has a license key or course access, you want to remove it. An immediate email means that cleanup happens the same day, not whenever you reconcile.

  • Refund rate stays in view

    An email per refund makes the count easy to see. If the rate climbs after a change to the product or page, the cause is fresh enough to identify. Early signs of trouble are easier to deal with than late ones.

  • Bookkeeping is easier at month end

    Each email lists amount, product and customer, which is what your accountant asks for. You do not have to dig through the dashboard to explain why revenue differs from sales.

How it works

What happens, step by step

  1. When an order is refunded in Lemon Squeezy, Lemon Squeezy tells ClickRuntime straight away.

  2. ClickRuntime checks the message really came from Lemon Squeezy.

  3. You get an email with the product, the customer and the amount refunded.

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 an email for each Lemon Squeezy refundjust nowSucceeded
Email · Lemon Squeezy refundProduct: Icon Pack Pro Customer: lee@northwind.example Refunded: $39.00

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.
refund_alert_lemon_squeezy.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
    if body["meta"]["event_name"] != "order_refunded":
        return {"emailed": False}
    order = body["data"]["attributes"]
    product = order["first_order_item"]["product_name"]
    notify.email_me(f"Refund: {product} ({order['refunded_amount_formatted']})",
                    f"Product: {product}\nCustomer: {order['user_email']}\nRefunded: {order['refunded_amount_formatted']}")
    return {"order": body["data"]["id"]}

FAQ

Common questions

Does it fire for partial refunds?
Yes. Lemon Squeezy raises a refund event for partial refunds as well as full ones, and the message includes the amount that was refunded. That helps you tell a goodwill gesture on one item from a complete reversal of an order.
Will I be told about refunds made from the Lemon Squeezy dashboard?
The event fires whenever the order is refunded, whether you did it yourself in the dashboard or the customer disputed it. That means you may get an email for an action you just took, which can serve as a quick confirmation.
Why does the automation verify the X-Signature header?
Lemon Squeezy signs its webhooks with a secret, and checking the signature confirms the call really came from Lemon Squeezy. Without it, someone could send fake refund notices to your webhook URL and cause false alarms in your inbox.
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 an email for each Lemon Squeezy refund” from your assistant

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