Skip to content
Miru 3.0 is here — expenses, CLI, dark mode, and 6 report types. Read the announcement →
Automation Guide

How to Automate Your Invoicing (And Never Chase a Payment Again)

Manual invoicing costs you hours every month. Here's how to set up automated billing with Miru's CLI and Stripe integration.

Vipul A M · · 3 min read

Here’s how most agencies handle invoicing: someone — usually the founder, office manager, or whoever drew the short straw — spends the first week of every month generating invoices manually. Pull up each client. Look at the time entries. Copy numbers into an invoice. Double-check the math. Send it. Repeat for every client.

If you have 15 clients, that’s a full day. Every month. That’s 12 days a year spent on copy-paste busywork.

Stop doing this.


The automated invoicing workflow

Miru can generate invoices from time entries with one click. But the real power is in automating the entire billing cycle — from time entry to payment received. Here’s how.

Step 1: Track time consistently

Everything downstream depends on this. If time entries are accurate and tagged to the right project, invoicing is automatic. If they’re not, no automation saves you.

Set up your projects with the correct hourly rates. Assign team members. Make sure everyone tracks daily — timer, manual entry, or CLI. The weekly timesheet view catches gaps before they become billing problems.

Step 2: Generate invoices from the CLI

Miru’s CLI isn’t just for logging time. You can generate invoices programmatically:

# Generate an invoice for a client for the previous month
miru invoice generate --client "Acme Corp" --period last-month

# Generate invoices for ALL clients for a date range
miru invoice generate --all --from 2026-03-01 --to 2026-03-31

# Preview before sending
miru invoice list --status draft

This is where it gets powerful. Wrap it in a cron job:

# Run on the 1st of every month at 9am
0 9 1 * * miru invoice generate --all --period last-month

Every month, invoices generate themselves from the time entries your team already logged. No human in the loop.

Step 3: Connect Stripe for automatic payments

Connect your Stripe account once. Every invoice Miru generates includes a payment link. Your client opens the invoice email, clicks “Pay Now,” enters their card, done.

For retainer clients, it’s even better: set up Stripe auto-pay and the payment processes automatically when the invoice is generated. The client gets a receipt. You get paid. Nobody sends a “friendly reminder” email.

Step 4: Set up payment reminders

Not every client pays on time, even with Stripe links. Configure automatic reminders:

  • Day 7: Gentle reminder that the invoice is outstanding
  • Day 14: Firmer reminder with the payment link
  • Day 30: Final notice

These go out automatically. You never write another “just following up on invoice #247” email.


The full automation stack

Put it all together and your monthly billing workflow looks like this:

  1. Daily: Team tracks time (already happening)
  2. 1st of month: Cron job generates invoices from time entries
  3. Same day: Invoices are emailed to clients with Stripe payment links
  4. Retainer clients: Auto-pay processes immediately
  5. Non-retainer clients: Payment reminders fire on schedule
  6. Ongoing: Payments are recorded automatically as they arrive

Your involvement: zero. Unless something unusual happens — a disputed amount, a rate change, a new client — the system runs itself.


The math

Let’s say you spend 6 hours per month on manual invoicing. At an effective rate of $150/hour (your time as a founder or senior person), that’s $900/month in opportunity cost. $10,800/year.

Miru for a 20-person team: $20/month. $240/year.

The automation pays for itself 45x over. And that’s before accounting for the faster payments — most teams see average time-to-payment drop from 25-30 days to under 10 when they add Stripe links and automatic reminders.

Stop chasing invoices. Set up the system once and let it run.

Share:
VA

Vipul A M

Co-founder at Saeloun. Building Miru. Rails contributor. Shipping from Pune, India.

Try Miru today

Free to start. No credit card required.

Start Tracking Free