Every 15 minutes
Get an email when a payment fails or is cancelled
A failed or cancelled Mercury transaction reaches you within about 15 minutes, with the amount and counterparty.
- Runs
- Every 15 minutes
- Apps
- Mercury
- AI
- Not needed
- Access
- read-only token
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, check Mercury for transactions marked failed or cancelled and email me the counterparty, amount and date of each new one.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A failed payment at a business bank is easy to miss. A vendor ACH that bounced because of a wrong routing number, a card payment declined for a subscription you rely on or a wire that was cancelled all show up as a status in a transaction list that nobody checks. The result is a supplier who thinks you did not pay, a service that gets switched off or a payroll contractor waiting for money that never left.
Every 15 minutes, ClickRuntime lists your recent Mercury transactions, filters for those with a failed or cancelled status, and sends an alert for any it has not reported before. Successful payments are ignored, so you hear only when something goes wrong.
It is meant for founders, finance leads and bookkeepers who want to know about a problem the same day.
What you get out of it
Suppliers are paid on time
When a payment fails, you can fix the details and resend it the same day. A short delay is easier to explain than a late fee or a damaged relationship with an important vendor.
Critical services stay on
A declined card for hosting or software can lead to a suspended account. Hearing about it within 15 minutes gives you time to update the payment method before anything goes offline.
Contractors and staff are not left waiting
A failed payout to a freelancer means a person who is counting on that money. Quick notice lets you resolve it before they have to chase you for it. A prompt apology and a resend keeps their trust.
No daily bank check required
Opening the banking portal each morning to scan statuses takes time and is easy to forget. The alert does that work and speaks up only when something fails. Someone who is already busy no longer has to remember to look, because a quiet inbox simply means nothing failed.
Clear record of problems
Each alert shows what failed and when, which helps your accountant understand why a payment appears twice or why a vendor was paid late. Each alert names the payment, so your accountant can later explain a late or repeated payment without guessing.
Fewer awkward calls from vendors
Nothing is more uncomfortable than a supplier asking where their money is. Fixing a failed payment before they notice keeps those relationships friendly and professional, and it keeps your reputation as a reliable payer intact.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks your Mercury accounts for transactions that failed or were cancelled.
It skips any it has already told you about.
You get one email listing each new problem with its date, counterparty, amount and status.
Before it runs live
- Connect Mercury
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 Mercury steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched
API = "https://api.mercury.com/api/v1"
@on_trigger
def run(event):
h = {"Authorization": f"Bearer {credentials.secret('MERCURY_TOKEN')}"}
alerted = set(state.get("alerted") or [])
bad = []
for acct in http.get(f"{API}/accounts", headers=h).json()["accounts"]:
for t in http.get(f"{API}/account/{acct['id']}/transactions", headers=h, params={"limit": 100}).json()["transactions"]:
if t["status"] in ("failed", "cancelled") and t["id"] not in alerted:
bad.append(t)
report_fetched(len(bad))
if not bad:
return {"new": 0}
notify.email_me(f"{len(bad)} Mercury transaction(s) failed or cancelled",
"\n".join(f"{t['createdAt'][:10]} {t['counterpartyName']} ${abs(t['amount']):,.2f} {t['status']}" for t in bad))
state.set("alerted", sorted(alerted | {t["id"] for t in bad})[-500:])
return {"new": len(bad)}FAQ
Common questions
Which statuses count as failed?
Will I get the same alert more than once?
Does it need access to move money?
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 every Mercury transaction to Slack
Deposits and payments appear in your channel within about 15 minutes, each one posted once.
See how it worksGet warned when your balance drops below $20,000
You get one email when checking falls under your floor, and another only after it has recovered and dropped again.
See how it worksGet your cash position every Monday
Each Monday you see your account balances and how much came in and went out the week before.
See how it worksKeep exploring
Set up “Get an email when a payment fails or is cancelled” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.
