The moment it happens
Know when a Xero invoice is paid
A Slack message as soon as an invoice turns to paid, sent once per invoice.
- Runs
- The moment it happens
- Apps
- Xero
- AI
- Not needed
- Access
- accounting.transactions.read
Send this to your assistant
Create a ClickRuntime automation: when a Xero invoice changes to PAID, send me a Slack message with the contact and amount.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
After you send a Xero invoice, the next thing you care about is whether it was paid, and the answer arrives on no schedule. A client pays by bank transfer on a Thursday evening, the money appears in Xero after reconciliation or a bank feed update, and you only find out when you next open the invoice list. Meanwhile you may have sent a polite chaser to someone who already paid, which is embarrassing for everyone.
When Xero reports a change to an invoice, the automation fetches that invoice and checks its status. If it is now PAID and has not been announced before, a Slack message goes out naming the invoice and the amount. Invoices that changed for other reasons, or that were already reported, are ignored.
Freelancers, agencies and shops with a few large invoices a month use it to celebrate wins and to stop chasing people who have settled.
What you get out of it
No chasers to people who already paid
Learning about a payment the day it lands means you never send a reminder to a customer who settled last week, which protects the relationship and your credibility. That also saves you the small awkwardness of apologizing for a reminder that crossed with a payment.
Cash can be committed with confidence
When a large invoice is marked paid, you know the money is real and can approve the supplier order or payroll run that was waiting on it. That confidence is hard to get from a bank balance you cannot tie to a customer.
Each payment is announced only once
The automation remembers which invoices it already reported, so a later edit to a paid invoice does not send the same good news a second time into your channel. A quiet channel after a settled invoice is a sign the process is working.
The whole team shares the win
A message in a team channel tells the sales rep and the project lead that their client paid, which keeps them informed without anyone from finance having to forward emails.
Late payers stand out by contrast
When paid notices arrive for every other customer and one is missing, the gap itself tells you where to direct your follow-up effort this week. That contrast is a cheap way to prioritize which customers to call first.
How it works
What happens, step by step
When an invoice changes in Xero, Xero tells ClickRuntime straight away.
ClickRuntime looks up the invoice and checks whether it is now marked as paid.
It skips invoices it has already announced, so each one is posted only once.
Your Slack channel gets the invoice number, customer and amount paid.
Before it runs live
- Connect Xero
- 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 Xero steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, notify, verify, state
API = "https://api.xero.com/api.xro/2.0"
def xero_headers():
token = credentials.connection("xero", "work")
tenant = http.get("https://api.xero.com/connections", headers={"Authorization": f"Bearer {token}"}).json()[0]["tenantId"]
return {"Authorization": f"Bearer {token}", "xero-tenant-id": tenant, "Accept": "application/json"}
@on_event
def handle(event):
if not verify.generic_hmac_sha256(event.body, event.header("x-xero-signature"), credentials.secret("XERO_WEBHOOK_KEY"), encoding="base64"):
return {"ok": False}
headers = xero_headers()
seen = state.get("paid") or []
for e in event.json.get("events", []):
if e["eventCategory"] != "INVOICE" or e["resourceId"] in seen:
continue
inv = http.get(f"{API}/Invoices/{e['resourceId']}", headers=headers).json()["Invoices"][0]
if inv["Status"] == "PAID":
notify.slack(f"Paid: {inv['InvoiceNumber']} from {inv['Contact']['Name']}, {inv['Total']:,.2f} {inv['CurrencyCode']}", channel="#accounts")
seen.append(e["resourceId"])
state.set("paid", seen[-500:])
return {"ok": True}FAQ
Common questions
How quickly does the alert appear after a customer pays?
Does a part payment trigger it?
Will it announce bills I pay to suppliers?
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 new Xero invoice to Slack
Whenever a sales invoice is created, Slack shows the contact, total and due date.
See how it worksHear when a contact is added to Xero
A Slack message whenever a new customer or supplier appears in Xero.
See how it worksRaise a draft Xero invoice when a deal closes
A won deal elsewhere creates a draft invoice for the right contact, and Slack gets a link to review it.
See how it worksKeep exploring
Set up “Know when a Xero invoice is paid” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.