Skip to content

The moment it happens

Get alerted when a Stripe refund is issued

Every refund issued in Stripe is posted to Slack with the amount, customer, reason and who the original charge was for, as soon as Stripe sends the event.

Runs
The moment it happens
Apps
Stripe
AI
Not needed
Access
webhook signing secret; chat:write

Send this to your assistant

Create a ClickRuntime automation: whenever a refund is issued in Stripe, post the amount, the customer's email, the refund reason and a link to the payment in #billing on Slack.

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 are easy to issue and easy to forget. Support refunds a customer on a Friday, finance sees a lower number on Monday, and nobody can say why without digging through the Stripe dashboard.

This automation listens for Stripe's charge.refunded event and posts each refund to a Slack channel straight away, with the amount, the customer, the reason and a link to the payment.

The channel turns into a running record that support, finance and founders can all see, and an unexpected refund gets noticed the same day.

What you get out of it

  • Seen the same day

    Every refund lands in Slack the moment Stripe processes it.

  • Context included

    Amount, customer, reason and the original payment are in one message.

  • Partial refunds handled

    The message says how much of the payment has been refunded so far.

  • Signed events only

    Each event is checked against your Stripe webhook secret.

  • Nothing else to maintain

    No polling and no state; Stripe pushes each refund as it happens.

How it works

What happens, step by step

  1. You add a ClickRuntime webhook URL in Stripe for the charge.refunded event.

  2. When a refund goes through, Stripe sends the event and ClickRuntime checks its signature.

  3. It reads the newest refund on the charge, with its amount and reason.

  4. A message with the customer, amount, reason and a link to the payment goes to #billing.

Before it runs live

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

What you get

RunsThe moment it happens
Get alerted when a Stripe refund is issuedjust nowSucceeded
Slack · #billing:leftwards_arrow_with_hook: Refund of 49.00 USD to maria@cobaltstudio.com (requested_by_customer) Original payment: 49.00 USD, Pro monthly · fully refunded https://dashboard.stripe.com/payments/pi_3QxR2bL

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 Stripe 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.
get_alerted_when_a_stripe_refund_is_issued.pyexample
from clickruntime import on_event, credentials, notify, verify

@on_event
def handle(event):
    if not verify.stripe(event.body, event.header("Stripe-Signature"), credentials.secret("STRIPE_WEBHOOK_SECRET")):
        return {"ignored": "bad signature"}
    if event.json["type"] != "charge.refunded":
        return {"ignored": event.json["type"]}
    charge = event.json["data"]["object"]
    refund = charge["refunds"]["data"][0] if charge.get("refunds", {}).get("data") else None
    amount = (refund["amount"] if refund else charge["amount_refunded"]) / 100
    reason = (refund or {}).get("reason") or "no reason given"
    who = (charge.get("billing_details") or {}).get("email") or charge.get("receipt_email") or charge.get("customer") or "unknown"
    full = "fully refunded" if charge["refunded"] else f"{charge['amount_refunded'] / 100:,.2f} refunded so far"
    notify.slack(f":leftwards_arrow_with_hook: Refund of {amount:,.2f} {charge['currency'].upper()} to {who} ({reason})\n"
                 f"Original payment: {charge['amount'] / 100:,.2f} {charge['currency'].upper()}, "
                 f"{charge.get('description') or 'no description'} · {full}\n"
                 f"https://dashboard.stripe.com/payments/{charge['payment_intent']}", channel="#billing")
    return {"charge": charge["id"]}

FAQ

Common questions

Does it catch partial refunds?
Yes. Stripe sends charge.refunded for partial refunds too. The message shows the amount of this refund and how much of the original payment has been refunded so far.
Who issued the refund?
Stripe's event does not say which team member clicked refund. The reason field shows whether it was requested by the customer, a duplicate or fraud, if one was chosen.
Will refunds from disputes show up here?
No. Money lost to a dispute is not a refund in Stripe. Use a dispute alert for those.
What permissions does it need?
webhook signing secret; chat:write. 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 alerted when a Stripe refund is issued” from your assistant

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