Xero Overdue Payment Tracker
LiveFetches aged receivables from Xero, buckets invoices by aging period, and delivers a formatted Excel report via Lark Bot on a daily cron schedule.
How It Works
Xero API
Fetch aged receivables
Invoice Parser
Extract contacts, dates & amounts
Aging Calculator
Bucket: Current / <1M / 1M / 2M / 3M+
History Builder
On-time rate & avg days late per customer
Excel Generator
3-sheet workbook: Summary, Invoices, By Customer
Lark Bot
Auto-deliver via Bot API · runs on cron
AUD 48,350
Total Overdue
23.9
Avg Days Overdue
7
Overdue Invoices
AUD 12,400
Collected This Month
| Customer | Invoice # | Issued | Due Date | Days Overdue | Aging Bucket | Amount Due (AUD) | On-Time Rate |
|---|---|---|---|---|---|---|---|
| Richmond Hospitality Pty Ltd | INV-0821 | 15 Jan 2026 | 15 Mar 2026 | 43 | 2 Months | AUD 8,450.00 | 42% |
| Southbank Catering Group | INV-0834 | 22 Jan 2026 | 22 Mar 2026 | 36 | 2 Months | AUD 12,300.00 | 31% |
| St Kilda Food Services | INV-0847 | 1 Feb 2026 | 1 Apr 2026 | 26 | 1 Month | AUD 3,210.00 | 58% |
| Fitzroy Provisions Co. | INV-0852 | 5 Feb 2026 | 5 Apr 2026 | 22 | 1 Month | AUD 5,880.00 | 67% |
| Melbourne City Caterers | INV-0861 | 10 Feb 2026 | 10 Apr 2026 | 17 | < 1 Month | AUD 2,100.00 | 75% |
| Collingwood Kitchen Supplies | INV-0865 | 14 Feb 2026 | 14 Apr 2026 | 13 | < 1 Month | AUD 7,640.00 | 83% |
| Northcote Bistro Holdings | INV-0871 | 17 Feb 2026 | 17 Apr 2026 | 10 | < 1 Month | AUD 8,770.00 | 50% |
Source Repository
ian60012/xeroinvoicetracker
Daily Xero aged receivables report — fetches unpaid invoices, generates Excel in Xero format, and delivers to Lark via Bot API. Dockerised, runs on cron.
Tech Stack
The problem
Aged receivables in Xero are already a report. The report goes stale because someone has to export it, decide who to call, and remember what was promised last week. In a kitchen, a wholesale desk, or a small group of venues, that someone is also buying, rostering, or packing. The file is exported on Monday and ignored by Thursday.
Chasing from memory favours the loudest customer and the largest single invoice. A pattern of smaller invoices that are always a month late stays invisible. So does the customer who is already on a payment plan and should not receive another generic reminder.
The tracker on this page is a daily sort, not an automatic debt collector. It reads aged receivables, buckets them, writes a workbook, and delivers the file to the chat the team already opens. The public repository is ian60012/xeroinvoicetracker. The numbers in the demo are sample rows.
How the process works
The routine is short on purpose. A longer routine is the one that stops being run.
- 1
Read Xero
Pull open invoices and contacts for the organisation you named. Keep the scope to read access. The job stores its own token. People receive the report, they do not share a login.
- 2
Keep the fields that change a phone call
Contact, invoice number, issue date, due date, amount still owing, and status. Line items stay in Xero for disputes. Copying them into a second system is how the two copies drift.
- 3
Bucket in language the team already uses
Current, under one month, one month, two months, and three months or more. If your bookkeeper uses different names, the sheet should use those names. The buckets are labels, not a credit score.
- 4
Rank inside the bucket
Amount due, then days overdue. A large invoice that is a week late and a small invoice that is four months late are both on the sheet. Hiding the small one hides the pattern.
- 5
Add a plain customer history
A page by customer with recent on-time behaviour stops the meeting arguing from memory. It describes dates. It does not invent a rating.
- 6
Deliver it on a weekday morning
The reference build sends a three-sheet workbook through a Lark bot on a cron, after the previous day’s receipts are in Xero. Email or another chat is fine. Hourly is noise. Monthly is the stale report you already have.
Before and after
Before
- Someone remembers to export aged receivables, or they do not.
- The chase list is a highlight on a PDF, and the highlight is not shared.
- Disputed invoices and ordinary late invoices look the same in the pile.
After
- A workbook arrives without an export step, with totals by bucket and one row per open invoice.
- The same file is what the meeting looks at, so two people are not working from two downloads.
- Rows that must not be auto-chased can be marked and still reconcile to the Xero total.
The tool does not know that a buyer is on leave or that a credit note is about to be raised. Those calls stay with a person. The list they start from matches Xero that morning.
Questions
Will this email my customers?
Not in this design. It delivers a report to your team. Sending customer reminders is a separate decision, with a list of who must be left alone.
Does it match Xero’s aged receivables exactly?
It should tie to the open balances you pulled. If a tracking category or a contact group limits the report, the summary should say so, so nobody compares it to the unfiltered Xero total and calls it wrong.
Why Excel and a chat bot?
Because that is where the follow-up already happens. A dashboard nobody opens is a second stale report. The three sheets are summary, invoices, and by customer.
Can I see the code?
Yes. The repository linked on this page is public. It is a reference implementation, not a hosted product you log into.
If the Monday export is the process
Tell me which Xero organisation, which chat should receive the file, and which customers must never get an automatic nudge. The buckets should use the words your team already says.
Talk through the chase list