Skip to content

The moment it happens

Get emailed about every Square refund

Each refund triggers an email with the amount, location and reason as soon as Square reports it.

Runs
The moment it happens
Apps
Square
AI
Not needed
Access
read (PAT has full access)

Send this to your assistant

Create a ClickRuntime automation: when a refund is created in Square at any location, email me the refund amount, location, reason and original payment time.

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

Refunds at a busy counter happen fast: a customer returns a coffee, a cashier refunds a salon service, someone processes a $240 return at the end of a shift. At a multi-location business, the owner or finance manager only sees them in a report days later. By then, nobody remembers the circumstances, a pattern at one location has gone unnoticed, and a refund made in error or without permission cannot easily be traced back to what really happened at the till.

When Square records a refund, it sends an event to ClickRuntime. The request is first checked using the x-square-hmacsha256-signature header, so only genuine Square events are accepted. ClickRuntime then reads the refund amount, location and reason and emails them to you within moments.

Owners of shops, restaurants and salons with staff at the till, and finance managers overseeing several sites, find it most useful.

What you get out of it

  • Odd refunds are noticed while fresh

    An email within moments allows the owner to ask the cashier what happened the same day, while memories are clear and the customer is possibly still reachable. Questions asked the same day are answered with detail, and later ones are answered with a shrug.

  • Patterns by location emerge

    If one site issues many more refunds than others, the emails make it visible quickly. That may point to training needs, product issues or something less innocent. A simple comparison between sites often reveals where extra attention is needed.

  • Fraud and mistakes are easier to catch

    Refund fraud, such as refunding to a personal card, is hard to spot in monthly totals. Individual alerts make an unusual amount or time stand out immediately. The cost of one caught case often exceeds the effort of setting the alert up.

  • Reasons are kept with the amount

    Cashiers often record why a refund was made. Having that note in an email builds a record of the causes, which helps improve products and service. Over months, the reasons show which products or processes cause the most returns.

  • Bookkeeping has a trail

    Each email is a dated record that can be matched with the sales report and payouts, which makes reconciliation simpler at the end of the month. Auditors and accountants appreciate a clear paper trail for every refund.

How it works

What happens, step by step

  1. When a refund is made in Square, Square tells ClickRuntime straight away.

  2. ClickRuntime checks the message really came from Square, then reads the amount, location and reason.

  3. You get an email with those details and the time of the original payment.

Before it runs live

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

What you get

RunsThe moment it happens
Get emailed about every Square refundjust nowSucceeded
Email · Square refundAmount: USD 18.50 · Location: Northwind Café Main St Reason: Wrong order · Original payment: 2026-10-18T08:41:12Z

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 Square 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_square.pyexample
from clickruntime import on_event, credentials, http, notify

API = "https://connect.squareup.com/v2"

def square_headers():
    return {"Authorization": f"Bearer {credentials.secret('SQUARE_ACCESS_TOKEN')}", "Square-Version": "2024-10-17"}

@on_event
def handle(event):
    if not event.is_verified:  # set up with the x-square-hmacsha256-signature header in Trigger link settings
        return {"emailed": False, "reason": "unverified"}
    refund = event.json["data"]["object"]["refund"]
    h = square_headers()
    payment = http.get(f"{API}/payments/{refund['payment_id']}", headers=h).json()["payment"]
    location = http.get(f"{API}/locations/{refund['location_id']}", headers=h).json()["location"]["name"]
    amount = refund["amount_money"]
    notify.email_me(f"Square refund: {amount['currency']} {amount['amount'] / 100:,.2f} at {location}",
                    f"Amount: {amount['currency']} {amount['amount'] / 100:,.2f}\nLocation: {location}\n"
                    f"Reason: {refund.get('reason') or 'none given'}\nOriginal payment: {payment['created_at']}")
    return {"refund": refund["id"]}

FAQ

Common questions

What is the signature check?
Square signs each webhook with an HMAC signature in the x-square-hmacsha256-signature header. ClickRuntime verifies it with your signature key before doing anything, so fake requests are ignored and cannot trigger false emails. This protects your inbox from forged messages.
Can I be alerted only for large refunds?
Yes. A filter on the amount can be added, for example only refunds above $50, so routine small refunds are skipped. Anything above the line still arrives immediately, with its location and reason. The cutoff is up to you.
Does the email show which employee issued the refund?
It shows what Square includes in the refund event, such as the amount, location, reason and payment reference. Where the event identifies the team member, that detail can be added to the email as well.
What permissions does it need?
read (PAT has full access). 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 about every Square refund” from your assistant

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