Skip to content

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.

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

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

  1. When an invoice changes in Xero, Xero tells ClickRuntime straight away.

  2. ClickRuntime looks up the invoice and checks whether it is now marked as paid.

  3. It skips invoices it has already announced, so each one is posted only once.

  4. 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

RunsThe moment it happens
Know when a Xero invoice is paidjust nowSucceeded
Slack · #accountsPaid: INV-0398 from Acme Ltd, 2,150.00 USD

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 Xero 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.
invoice_paid_alert_xero.pyexample
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?
The alert comes when Xero sends the change event for the invoice, which depends on when the payment is recorded or reconciled in Xero. If your bank feed updates once a day, the message follows that, not the moment the transfer was made.
Does a part payment trigger it?
No. The check looks for the status PAID, which Xero sets only when the amount due is zero. A part-paid invoice remains AUTHORISED with a smaller balance, so you are not told until the final payment is applied.
Will it announce bills I pay to suppliers?
Only if you include them. The check is typically aimed at sales invoices that customers pay you. Bills that you pay have a different type in Xero, and your AI assistant can add them if you also want to see supplier payments.
What permissions does it need?
accounting.transactions.read. 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 “Know when a Xero invoice is paid” from your assistant

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