The moment it happens
Track PayPal refunds in Slack
Every refund is reported with the buyer, amount and the payment it reverses.
- Runs
- The moment it happens
- Apps
- PayPal
- AI
- Not needed
- Access
- REST app (client credentials)
Send this to your assistant
Create a ClickRuntime automation: when a PayPal payment is refunded, post the buyer, refunded amount and original transaction ID to #finance in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Refunds matter to more than the person who clicked the button. When a PayPal payment is refunded, the finance lead needs to adjust the books, the support team wants to know the customer was taken care of, and the shop owner wants to spot refund spikes. Without an alert, a refund is just another line in PayPal that nobody sees until the monthly review.
When PayPal sends a refund event, its signature is verified, the refund amount is read, and the link back to the original capture is picked up. A Slack message then tells the team that a refund happened, how much it was and which payment it relates to, so people can follow the trail without searching.
It is useful for stores with several people handling support and for owners who want a quick sense of how often returns happen.
What you get out of it
Books stay accurate
Finance can record the refund on the day it happens rather than discovering it at month end. The books then match the PayPal balance and reconciliation takes much less effort.
Support sees the whole story
If the customer writes in afterward, the person answering can find the refund in the channel and confirm the amount. That avoids asking the customer for a reference or double refunding.
Spot refund spikes quickly
A cluster of refunds on a single product often signals a defect, a shipping delay or a misleading listing. The channel makes the pattern visible days before the monthly numbers would.
Catch accidental or unauthorized refunds
If a refund appears that nobody on the team remembers issuing, you can investigate right away. Fast awareness limits the damage from a mistake, a compromised login or a dispute handled badly.
Direct link to the original payment
The message points to the capture the refund relates to, so you do not need to hunt through PayPal. One click shows the original sale and its details. That saves several minutes on each lookup.
How it works
What happens, step by step
When a PayPal refund is issued, PayPal tells ClickRuntime straight away.
ClickRuntime checks the message really came from PayPal, then reads the refund amount and the original transaction.
A message goes to your #finance Slack channel with the amount, the customer and the original transaction ID.
Before it runs live
- Connect PayPal
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
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
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.REFUNDED":
return {"posted": False}
headers = paypal_headers()
refund = http.get(f"{API}/v2/payments/refunds/{body['resource']['id']}", headers=headers).json()
capture_url = next(l["href"] for l in refund["links"] if l["rel"] == "up")
capture = http.get(capture_url, headers=headers).json()
order_id = capture["supplementary_data"]["related_ids"]["order_id"]
payer = http.get(f"{API}/v2/checkout/orders/{order_id}", headers=headers).json()["payer"]
amount = refund["amount"]
notify.slack(f"↩️ Refund of {amount['currency_code']} {amount['value']} to {payer['email_address']}\n"
f"Original transaction: {capture['id']}", channel="#finance")
return {"refund": refund["id"]}FAQ
Common questions
Does a partial refund trigger the alert?
Can refunds issued from outside PayPal show up?
Is the customer's name included in the message?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post each PayPal payment to Slack
Every completed payment shows up in Slack with who paid and how much.
See how it worksHear about denied PayPal payments
When a payment is denied, you know straight away and can contact the buyer.
See how it worksGet dispute details before the deadline
A new dispute lands in your inbox with its reason, amount and the date you must reply by.
See how it worksKeep exploring
Set up “Track PayPal refunds in Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.