Skip to content

The moment it happens

Track failed Recurly renewals and dunning in Slack

Each failed renewal or dunning step appears in your channel with the account, amount and plan.

Runs
The moment it happens
Apps
Recurly
AI
Not needed
Access
private API key

Send this to your assistant

Create a ClickRuntime automation: when Recurly reports a failed payment or a new dunning event, post the account name, amount owed and plan to #collections in 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

A Recurly renewal fails because the card expired, and Recurly begins its dunning cycle, sending emails and retrying on a schedule. For most customers that works. For an account paying $3,000 a year, waiting for automated emails is a gamble, and the sales rep who owns the relationship has no idea that the payment is in trouble.

When a renewal payment fails, ClickRuntime receives the event, fetches the account from Recurly to get the company and contact details, and posts a message in Slack that includes the amount and the number of retry attempts so far. The account owner can step in during the dunning window instead of discovering a lapsed subscription after the final retry has failed.

It suits subscription businesses with account managers or founders who want to personally rescue valuable renewals.

What you get out of it

  • Personal outreach beats automated emails

    A short note from the account owner usually recovers a payment faster than a third automated reminder. The alert gives that person the chance to write it. People often answer a real person even when they ignore reminders.

  • Retry count shows how urgent it is

    A first failure may resolve itself, while the third is close to a lapse. Seeing the attempt number tells you whether to wait or to call right now. You can spend your effort where the risk is highest.

  • Account details are one click away

    The message includes the account name and contact, so there is no lookup in the Recurly admin. Time between seeing the alert and sending a message drops to a minute. Nobody needs to search for who the customer is.

  • Involuntary churn shrinks

    Customers who lose their subscription because of a failed card never chose to leave. Recovering even a few each month adds up over a year of renewals. Those customers did nothing wrong except have a card expire.

  • Finance and sales see the same facts

    Posting in a shared channel means both teams know about the failed payment. Sales avoids upselling a customer whose card is declining, while finance knows the cash is delayed. Both can plan accordingly.

How it works

What happens, step by step

  1. When a Recurly payment fails or a customer moves to a new stage of payment chasing, Recurly tells ClickRuntime straight away.

  2. ClickRuntime looks up the account to find the company name, the plan and how much is owed.

  3. A message goes to your #collections Slack channel with those details.

Before it runs live

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

What you get

RunsThe moment it happens
Track failed Recurly renewals and dunning in Slackjust nowSucceeded
Slack · #collections⚠️ Northwind Traders: payment problem (failed). Owes USD 450.00 on *Business annual*

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

API = "https://v3.recurly.com"

def recurly(path):
    resp = http.get(f"{API}{path}", auth=(credentials.secret("RECURLY_API_KEY"), ""),
                    headers={"Accept": "application/vnd.recurly.v2021-02-25+json"})
    resp.raise_for_status()
    return resp.json()

@on_event
def handle(event):
    body = event.json
    if (body.get("object_type"), body.get("event_type")) not in {("payment", "failed"), ("charge_invoice", "past_due")}:
        return {"posted": False}
    account = recurly(f"/accounts/code-{body['account_code']}")
    owed = recurly(f"/accounts/{account['id']}/balance")["balances"]
    subs = recurly(f"/accounts/{account['id']}/subscriptions?state=active")["data"]
    name = account.get("company") or f"{account.get('first_name', '')} {account.get('last_name', '')}".strip()
    amount = ", ".join(f"{b['currency']} {b['amount']:,.2f}" for b in owed) or "0"
    plan = subs[0]["plan"]["name"] if subs else "no active plan"
    notify.slack(f"⚠️ {name}: payment problem ({body['event_type']}). Owes {amount} on *{plan}*", channel="#collections")
    return {"account": body["account_code"]}

FAQ

Common questions

What is dunning in Recurly?
Dunning is the automated process of retrying failed payments and emailing the customer, defined by a dunning plan in your Recurly settings. The alert complements it, by notifying your team during that sequence so people can intervene as well.
Which Recurly notification does this rely on?
It uses the failed payment notification that Recurly sends when a transaction is declined. You turn on push notifications in the Recurly integrations settings and point them at the address provided, then failures arrive in near real time.
Can I limit the Slack message to larger accounts?
Yes. Because the account is fetched before posting, a minimum amount or plan can be applied. Small plans can be left to the automated dunning emails, while larger renewals go to the channel for personal follow-up.
What permissions does it need?
private 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 “Track failed Recurly renewals and dunning in Slack” from your assistant

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