Skip to content

The moment it happens

Hear about denied PayPal payments

When a payment is denied, you know straight away and can contact the buyer.

Runs
The moment it happens
Apps
PayPal
AI
Not needed
Access
REST app

Send this to your assistant

Create a ClickRuntime automation: when a PayPal payment is denied, post the payer, amount and transaction ID to #payments 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 customer clicks pay, PayPal denies the charge, and from the seller's side nothing visible happens. The order stays unpaid, the customer assumes it went through or gives up, and the seller finds out days later, if ever. In a store with a steady flow of orders, those silent denials are lost sales that nobody can even see, let alone recover with a quick email.

When PayPal reports a payment as denied or failed, a message goes straight to Slack so the person watching sales hears about it right away. It reacts to the event as it arrives, with no schedule, so the note shows up while the customer may still be sitting at their screen.

It helps store owners who sell high-value items, where one lost order matters, and teams who want to catch payment problems on a launch day.

What you get out of it

  • Recover sales that would otherwise vanish

    A short note to the customer saying their payment did not go through, with a retry link, can turn a lost order into a completed one. Without the alert, the customer simply disappears.

  • See trouble the minute it starts

    A cluster of denied payments in Slack within a few minutes of each other suggests a configuration or account problem. You can investigate immediately instead of after a day of lost revenue.

  • Separate bad cards from bad setup

    One denial now and then is a declined card. Many in a row point to something on your side, such as a restricted account or a misconfigured checkout. The channel makes the difference obvious.

  • Support can answer with context

    When a customer writes in asking why their order is missing, support can check the channel and see the failed attempt. That shortens replies and avoids asking the customer to repeat details.

  • Know what launch day really looked like

    After a big promotion, the history of denied payments shows how many buyers tried and failed. That figure helps you judge whether a conversion problem was demand or payment friction.

How it works

What happens, step by step

  1. When PayPal denies a payment, PayPal tells ClickRuntime straight away.

  2. ClickRuntime reads who tried to pay, the amount and the transaction ID.

  3. A message goes to your #payments Slack channel with the payer's name, email, the amount and the transaction ID, so you can follow up.

Before it runs live

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

What you get

RunsThe moment it happens
Hear about denied PayPal paymentsjust nowSucceeded
Slack · #payments❌ PayPal payment denied: Lee Park (lee@northwind.example), USD 89.00 Transaction: 7RT64812LK3390514

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

API = "https://api-m.paypal.com"

def paypal_headers():
    resp = http.post(f"{API}/v1/oauth2/token", data={"grant_type": "client_credentials"},
                     auth=(credentials.secret("PAYPAL_CLIENT_ID"), credentials.secret("PAYPAL_CLIENT_SECRET")))
    resp.raise_for_status()
    return {"Authorization": f"Bearer {resp.json()['access_token']}"}

@on_event
def handle(event):
    body = event.json
    if body.get("event_type") != "PAYMENT.CAPTURE.DENIED":
        return {"posted": False}
    capture = body["resource"]
    order_id = capture.get("supplementary_data", {}).get("related_ids", {}).get("order_id")
    payer = "unknown payer"
    if order_id:
        p = http.get(f"{API}/v2/checkout/orders/{order_id}", headers=paypal_headers()).json()["payer"]
        payer = f"{p['name']['given_name']} {p['name']['surname']} ({p['email_address']})"
    amount = capture["amount"]
    notify.slack(f"❌ PayPal payment denied: {payer}, {amount['currency_code']} {amount['value']}\n"
                 f"Transaction: {capture['id']}", channel="#payments")
    return {"capture": capture["id"]}

FAQ

Common questions

What is the difference between failed and denied in PayPal?
Denied usually means PayPal or the funding source rejected the payment, while failed can mean a technical problem during processing. The alert covers payments that did not complete, and the message tells you which status PayPal reported.
Will it alert me for every attempt a customer makes?
Each failed or denied payment event posts once. If a customer tries three times and fails each time, you see three messages, which can be a useful sign that they are really trying to pay.
Can the alert go to email instead of Slack?
Yes. The destination is flexible, so you can ask your AI assistant to send it to an email address or to a different Slack channel, such as one used by your support team. You approve the change before it takes effect.
What permissions does it need?
REST app. 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 “Hear about denied PayPal payments” from your assistant

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