Skip to content

The moment it happens

Post failed Braintree renewals to Slack

When a subscription renewal charge fails, Slack shows the subscription ID, plan and amount.

Runs
The moment it happens
Apps
Braintree
AI
Not needed
Access
Control Panel webhook destination; API key to parse

Send this to your assistant

Create a ClickRuntime automation: when a Braintree subscription renewal charge fails, post the subscription ID, plan name and amount to #billing 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 subscription business collects its revenue in small, automatic charges. When a renewal fails, because the card expired, the funds were short or the bank declined, Braintree records it as a past due subscription and retries according to its settings, but the customer is not always told, and neither is your team. Weeks later, the account is canceled for non-payment and the customer says they never knew.

When a subscription charge fails, Braintree sends a webhook that ClickRuntime verifies and parses using your API key. It extracts the subscription and the last transaction from the payload, and posts a message to your channel naming the customer plan and the failed attempt. Your team sees the failure the moment Braintree reports it.

It is built for SaaS and membership businesses where one missed renewal means a lost recurring customer.

What you get out of it

  • Involuntary churn gets rescued

    Many cancellations are not decisions but expired cards. A same-day personal note, asking the customer to update their payment method, often recovers a subscription that would have quietly lapsed. Even a modest recovery rate pays for the effort many times over.

  • Revenue is protected at the moment it is at risk

    A failed charge is recurring revenue that is about to stop. Hearing about it right away, instead of at month end, lets you act while the retry schedule is still running.

  • Support can reach out proactively

    When a customer writes in about access problems, support already knows a renewal failed. They can fix the real cause, an outdated card, rather than troubleshooting the product. Replies become faster and more useful, and customers feel looked after.

  • Plan and customer are in the message

    Because the subscription and last transaction are extracted, the post tells you which plan failed and for how much. Prioritizing a high-value account over a small one takes a glance.

  • Failures stay visible to the whole team

    A channel record of every failed renewal gives finance and customer success a shared view. Nobody has to export a past-due report to see what happened this week. Weekly reviews of churn then rest on real events, not a guess.

How it works

What happens, step by step

  1. When a Braintree subscription renewal fails, Braintree tells ClickRuntime straight away.

  2. ClickRuntime checks the message really came from Braintree and reads the subscription, plan and amount.

  3. A message goes to your #billing Slack channel so someone can follow up with the customer.

Before it runs live

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

What you get

RunsThe moment it happens
Post failed Braintree renewals to Slackjust nowSucceeded
Slack · #billing⚠️ Renewal failed: subscription f7k2mb, plan pro_monthly, amount 49.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 Braintree 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_subscription_charge_alert.pyexample
from clickruntime import on_event, credentials, notify
import braintree
from urllib.parse import parse_qs

def gateway():
    return braintree.BraintreeGateway(braintree.Configuration(
        braintree.Environment.Production, merchant_id=credentials.secret("BRAINTREE_MERCHANT_ID"),
        public_key=credentials.secret("BRAINTREE_PUBLIC_KEY"), private_key=credentials.secret("BRAINTREE_PRIVATE_KEY")))

def parse(event):
    form = parse_qs(event.body)
    return gateway().webhook_notification.parse(form["bt_signature"][0], form["bt_payload"][0])

@on_event
def handle(event):
    n = parse(event)
    if n.kind != braintree.WebhookNotification.Kind.SubscriptionChargedUnsuccessfully:
        return {"posted": False}
    s = n.subscription
    notify.slack(f"⚠️ Renewal failed: subscription {s.id}, plan {s.plan_id}, amount {s.price}", channel="#billing")
    return {"subscription": s.id}

FAQ

Common questions

Does it alert on every retry or only the first failure?
It posts for each failed charge notification Braintree sends. If your retry schedule produces several failures for one subscription, you may see more than one message. A rule to post only the first failure can be added if that is too noisy.
Which Braintree webhook does this use?
It uses the subscription charged unsuccessfully notification. In the Braintree control panel, under webhooks, you add the ClickRuntime address and tick that notification type. The payload arrives signed, and the workflow verifies it with your API key.
Can it message the customer directly?
It posts to your team by default. Sending a note to the customer is possible if the customer email is in the payload or fetched, but customer-facing messages should be reviewed carefully. Ask your AI assistant for a draft step and approve it first.
What permissions does it need?
Control Panel webhook destination; API key to parse. 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 “Post failed Braintree renewals to Slack” from your assistant

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