How to Automate Invoice Processing with AI (Step-by-Step)
A step-by-step guide to automating invoice processing with AI — from setup to fully hands-free generation, sending, tracking, and reconciliation using Claude Code.
By the end of this guide, you'll have a working AI invoice system: invoices that generate from a single prompt, send themselves to clients, follow up at 30/60/90 days if unpaid, and reconcile automatically when payment clears. No spreadsheets, no copy-pasting last month's template, no Friday-afternoon invoice marathons.
This is a literal step-by-step walkthrough. Each step builds on the last. You can stop after any step and have a working system — or run all seven and have full end-to-end automation.
What you need before starting
- →Claude Code installed — the CLI tool from Anthropic.
- →Your business details — company name, address, payment details (bank / Stripe / PayPal), and your logo file if you have one.
- →One client to test with — name, email, and a real or sample invoice to generate.
- →Optional for steps 4–6 — Gmail or Outlook access, and a Stripe, PayPal, or bank account for payment tracking.
Download the Invoice Generator Playbook
The playbook is a CLAUDE.md template that tells Claude Code exactly how to handle invoices — what format to use, how to calculate tax, what your payment terms are, and how to number invoices sequentially.
Go to the Professional Invoice Generator playbook page and click Download. You'll get a CLAUDE.md file.
Create a folder for your invoicing work — something like ~/invoices — and drop the CLAUDE.md file inside it. This is your invoice project folder; Claude Code will read the playbook automatically whenever you open this folder.
Pro tip
Keep a separate folder per client project if you bill at different rates or currencies. Each folder can have its own CLAUDE.md with client-specific defaults baked in, so you never have to repeat rate or currency information.
Configure Your Business Profile
Open the CLAUDE.md file and fill in your business details in the configuration block at the top. This is the information that appears on every invoice — your business name, address, ABN/VAT/EIN, and payment details.
CLAUDE.md — fill in your details
BUSINESS_NAME: "Acme Studio LLC"
BUSINESS_ADDRESS: "123 Main St, Austin TX 78701"
BUSINESS_TAX_ID: "EIN 12-3456789"
DEFAULT_CURRENCY: "USD"
DEFAULT_TAX_RATE: 0 # 0 if you don't charge sales tax
PAYMENT_TERMS: "Net 30"
PAYMENT_DETAILS: "Bank transfer: Routing 021000021, Acct 1234567890
Or pay online: stripe.com/pay/yourbusinessname"
INVOICE_PREFIX: "INV"
INVOICE_START_NUMBER: 1042 # picks up from your last invoiceOnce this is saved, every invoice Claude Code generates will pull from these defaults. You'll never manually enter your own address or bank details again.
Generate Your First Invoice
Open Claude Code in your invoices folder (claude . from the terminal). Now describe the invoice in plain English:
Prompt
Generate an invoice for Bright Agency. I did 24 hours of UX design at $120/hr, plus a $400 fixed fee for the wireframe kit. They're based in London so use GBP and add 20% VAT. Net 30. Their billing contact is sarah@brightagency.co.
Claude Code will produce:
Output
✓ INV-1042.pdf — Bright Agency — £3,232.00 (inc. VAT) Line items: UX Design 24h @ £120 = £2,880 | Wireframe Kit = £400 Subtotal £3,280 + 20% VAT £656 ... wait, let me recalculate Subtotal £3,280 | VAT (20%) £656 | Total £3,936 Payment terms: Net 30 | Due: 12 June 2026 ✓ Saved to /invoices/2026/INV-1042-BrightAgency.pdf
Open the PDF. Check the numbers, the formatting, and your logo. If anything looks off, tell Claude Code what to adjust — it updates the invoice in place and re-exports.
Pro tip
Ask Claude Code to "add a late fee clause — 1.5% per month after 30 days" and it will add standard payment terms language to the footer. Works for any jurisdiction-specific boilerplate you normally copy-paste.
Send the Invoice Directly from Claude Code
Once you're happy with the PDF, skip the "attach to email, write a message, hit send" loop. Do it in one prompt:
Prompt
Send INV-1042 to sarah@brightagency.co. Subject line: "Invoice INV-1042 from Acme Studio — £3,936.00 due 12 June". Keep the email professional and brief. BCC me at billing@acmestudio.com and log the send timestamp.
Claude Code composes the email, attaches the PDF, sends via your configured email account (Gmail or Outlook), and logs the delivery. You'll get a confirmation:
Output
✓ Email sent to sarah@brightagency.co at 09:14 UTC ✓ BCC delivered to billing@acmestudio.com ✓ Logged: INV-1042 | Sent | 2026-05-13 09:14 Next follow-up scheduled: 2026-06-12 (due date)
For Gmail, Claude Code uses your existing authentication — no new app credentials needed. For Outlook, you'll connect once via OAuth and it handles the rest.
Set Up Automatic Payment Reminders
This is the step that eliminates most of the invisible invoice-chasing work. Once an invoice is sent, tell Claude Code the reminder schedule:
Prompt
For INV-1042: send a polite reminder on the due date if unpaid. If still unpaid at 60 days, send a firmer reminder referencing the late fee clause. At 90 days, send a final notice asking them to confirm their intended payment date. Use my voice — friendly but professional.
Claude Code schedules three follow-ups against the invoice's due date and won't send them if the invoice is already marked paid. Each reminder is written in your tone — not a generic "PAYMENT OVERDUE" template.
30-day reminder (due date)
"Hi Sarah — just a quick note that INV-1042 for £3,936 is due today. Let me know if you need anything from my end. Bank details are in the invoice footer, or you can pay online at stripe.com/..."
60-day reminder
"Hi Sarah — I wanted to follow up on INV-1042, now 30 days overdue. As noted in the invoice, a 1.5% late fee applies from this point. Happy to sort this out — just let me know if there's a billing issue on your end."
90-day final notice
"Hi Sarah — INV-1042 is now 60 days overdue. Could you confirm the expected payment date? If there's a dispute or a billing question I haven't seen, please let me know and we can sort it out."
Pro tip
Add a note like "if the client replies asking for a payment plan, flag it to me rather than auto-responding" — Claude Code will pause the automation and notify you so you can handle exceptions with judgment.
Automate Payment Detection and Reconciliation
When payment arrives, the invoice should mark itself paid — and your accounting system should know about it — without you opening QuickBooks or updating a spreadsheet.
If you use Stripe as a payment link, Claude Code can listen for the webhook:
Prompt
Watch for Stripe payments matching any open invoice. When a payment clears, mark the invoice paid, log the transaction date and amount, update the accounts receivable tracker, cancel any pending reminders, and add the entry to the QuickBooks queue.
For bank transfer clients, you can run a daily reconciliation instead:
Prompt
Every morning, compare my bank feed from the last 24 hours against open invoices. Match payments by amount and approximate date, mark matched invoices as paid, and flag any payments you couldn't match so I can review them.
Output
Daily reconciliation — 2026-05-13 ✓ INV-1041 — Matched: £1,200 received 2026-05-12 → marked PAID ✓ INV-1039 — Matched: $4,500 received 2026-05-12 → marked PAID ⚠ Unmatched: £850 from "TRADING LTD" — no open invoice found. Review needed. 2 reminders cancelled. QuickBooks queue updated.
The unmatched payment flag is deliberate — partial payments, overpayments, and unexpected deposits get surfaced for your review rather than silently filed wrong.
Organize Inbound Vendor Invoices
The outbound side is automated. Now tackle the inbound pile: vendor invoices, SaaS subscriptions, contractor bills, and expense receipts accumulating in your email and a folder called "receipts_2026_FINAL_v3."
Download the Invoice Organizer & Tracker playbook, drop your inbound invoice folder in the same directory, and run:
Prompt
Organize everything in /invoices/inbound/. Rename each file as YYYY-MM-VendorName-InvoiceNumber.pdf. Categorize by expense type (software, contractors, hosting, travel, other). Build a spreadsheet with vendor / date / amount / category / payment status. Flag anything over $500 that shows as unpaid.
Output
Processed 47 files in /invoices/inbound/ ✓ 47 renamed with consistent YYYY-MM-Vendor-INV format ✓ Spreadsheet: inbound-invoices-2026.xlsx (vendor, date, amount, category, status) Category totals: Software/SaaS $4,210 (14 invoices) Contractors $18,500 (8 invoices) Hosting/Infra $1,890 (9 invoices) Travel $640 (6 invoices) Other $1,100 (10 invoices) ⚠ 3 invoices over $500 flagged as unpaid — see rows 12, 28, 41
Your accountant now gets a clean folder of consistently named PDFs and a spreadsheet instead of a chaotic inbox dump. Tax season stops being stressful.
Putting It All Together: The Full Workflow
Once all seven steps are in place, the end-to-end workflow looks like this:
Project closes
You say the word (or your project tracker triggers it automatically).
Invoice generates
Claude Code creates a branded PDF with correct tax, numbering, and payment details.
Invoice sends
Email goes to the client with a payment link. You get a BCC and a log entry.
Reminders run
Scheduled follow-ups fire at 30/60/90 days if the invoice stays unpaid.
Payment detected
Stripe webhook or daily bank reconciliation marks it paid and syncs to accounting.
Reminders cancel
No awkward email chasing someone who already paid.
AR tracker updates
Your receivables dashboard reflects reality in real time.
From step one to the last payment — zero manual touchpoints for a standard invoice with a client who pays on time. For late payers, the automation handles reminders; you only get involved at the 90-day flag or the "unmatched payment" alert.
Common Mistakes to Avoid
Skipping the CLAUDE.md configuration
If you don't fill in your business details in step 2, Claude Code will ask for them on every invoice. Five minutes of setup at the start saves ten prompts per invoice forever.
Automating reminders before validating the generation output
Run three or four invoices manually through steps 3–4 before enabling the full automation in steps 5–6. You want to catch any branding or calculation quirks before they go out automatically.
Using fuzzy bank matching without a review step
Bank feed matching is not 100% reliable for unusual amounts or partial payments. Keep the "flag unmatched payments" instruction in place (step 6) so edge cases surface to you rather than being silently mis-filed.
Automating the 90-day escalation without human review
At 90 days overdue, the situation has moved beyond automated reminders. Have Claude Code flag 90-day invoices to you rather than sending a final notice automatically — these situations often need a phone call, a dispute process, or a payment plan negotiation.
The Playbooks Used in This Guide
Professional Invoice Generator
Steps 1–3. Branded PDF invoices from a single prompt — multi-currency, correct tax, sequential numbering.
Invoice Processing Automation
Steps 4–6. End-to-end send, remind, reconcile, and sync — the full lifecycle after the PDF exists.
Invoice Organizer & Tracker
Step 7. Clean up inbound vendor invoices — consistent naming, categorization, audit-ready archives.
Start with step 1 today. You'll generate your first AI invoice in under ten minutes — and the second one in under ten seconds.