Skip to content

The moment it happens

Flag declined Paddle payments in Slack

When a card is declined, you see who it was, how much and why, once per transaction even while Paddle retries.

Runs
The moment it happens
Apps
Paddle
AI
Not needed
Access
read (customers, transactions); notification settings

Send this to your assistant

Create a ClickRuntime automation: when a Paddle payment fails, post the customer email, amount, currency and decline reason to #billing in Slack. Only alert once per transaction.

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 on Paddle sees a failed card payment as one line in a transactions list, easy to miss. Behind it is a customer whose card expired, whose bank blocked the charge or whose balance ran short. Paddle retries on its own schedule, but the customer is usually never told, and after the last retry the subscription lapses. That is revenue lost to an ordinary, fixable problem.

When Paddle reports a failed transaction, the request signature is verified first. The payments array is then read for the error_code, the customer_id is used to fetch the customer record, and Slack gets one message with who it was, the amount and the reason. A retry on the same transaction does not post a second time.

It is most useful for teams with a few hundred subscribers, where someone can still send a friendly note to a customer instead of waiting for dunning emails to do the work.

What you get out of it

  • Reach the customer before the last retry

    Paddle keeps retrying for a while after a decline. A same-day message from your team asking the customer to update their card can save the subscription while there is still time, rather than after access has been cut.

  • The error code tells you what to say

    An expired card needs a different note from a bank block or insufficient funds. Seeing the reason in the message means the person writing to the customer sends the right fix the first time.

  • Quiet, accurate alerts instead of noise

    One post per transaction means a card retried three times does not flood the channel. Your team learns to trust that every message is a distinct customer worth a look, so it keeps getting read.

  • Keep involuntary churn from hiding

    Customers who leave because a payment failed never chose to go. Surfacing each failure makes that churn visible in the same place the team talks, so it gets owned instead of blamed on pricing.

  • Spot a pattern across many declines

    If several failures cite the same error in one afternoon, the channel shows it quickly. That can point to a processor or country-level issue worth raising with Paddle before it spreads.

How it works

What happens, step by step

  1. When a Paddle payment fails, Paddle tells ClickRuntime straight away.

  2. ClickRuntime checks the message really came from Paddle, reads why the payment failed and looks up the customer's email.

  3. A message goes to your #billing Slack channel with the customer, the amount and the reason, such as "declined".

Before it runs live

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

What you get

RunsThe moment it happens
Flag declined Paddle payments in Slackjust nowSucceeded
Slack · #billing💳 Payment failed: lee@northwind.example, USD 49.00, reason: declined

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 Paddle 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.
payment_failed_alert.pyexample
from clickruntime import on_event, credentials, http, state, notify

import hashlib, hmac

def paddle_signed(event):
    parts = dict(p.split("=", 1) for p in event.header("Paddle-Signature").split(";"))
    expected = hmac.new(credentials.secret("PADDLE_WEBHOOK_SECRET").encode(),
                        f"{parts['ts']}:{event.body}".encode(), hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["h1"])

@on_event
def handle(event):
    if not paddle_signed(event):
        return {"posted": False, "reason": "bad signature"}
    txn = event.json["data"]
    if state.get(f"alerted:{txn['id']}"):
        return {"posted": False, "reason": "already alerted"}
    customer = http.get(f"https://api.paddle.com/customers/{txn['customer_id']}",
                        headers={"Authorization": f"Bearer {credentials.secret('PADDLE_API_KEY')}"}).json()["data"]
    reason = next((p.get("error_code") for p in reversed(txn.get("payments", [])) if p.get("error_code")), "unknown")
    amount = int(txn["details"]["totals"]["grand_total"]) / 100
    notify.slack(f"💳 Payment failed: {customer['email']}, {txn['currency_code']} {amount:,.2f}, reason: {reason}",
                 channel="#billing")
    state.set(f"alerted:{txn['id']}", True)
    return {"transaction": txn["id"]}

FAQ

Common questions

Which Paddle event triggers the alert?
It listens for Paddle's failed transaction notification, which Paddle sends when a payment attempt on a transaction does not go through. The alert uses details from that event and the customer record, so no manual lookup in Paddle is needed.
What happens when Paddle retries and it fails again?
Alerts are keyed to the transaction, so repeated attempts on the same one do not produce additional posts. You hear about the first failure, and a later successful payment simply stops being a problem without any extra message.
Does the message include the customer's email?
The customer is fetched from Paddle using the customer_id, so name and email are available to include. If you would rather keep addresses out of Slack, you can ask your AI assistant to show only the customer name and amount.
What permissions does it need?
read (customers, transactions); notification settings. 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 “Flag declined Paddle payments in Slack” from your assistant

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