Invoice System

Create professional invoices from time entries, track payments, and manage your billing.

Overview

The invoice system includes:

  • Create invoices manually or from time entries
  • Professional PDF generation
  • Email invoices to clients
  • Track payment status
  • Multiple currencies
  • Tax calculations

Creating Invoices

Manual Invoice

  1. Navigate to Agency OS → Invoices
  2. Click New Invoice
  3. Select Client from dropdown
  4. Enter invoice details:
    • Invoice Number - Auto-generated or custom
    • Issue Date - Today's date
    • Due Date - Payment deadline
    • Currency - USD, EUR, GBP, etc.
  5. Add line items or import from time entries
  6. Click Create Invoice

From Time Entries

The fastest way to bill clients:

  1. Go to Agency OS → Invoices
  2. Click Create from Time Entries
  3. Select client
  4. Choose unbilled time entries:
    • Filter by project or date range
    • Select individual entries or bulk select
    • Preview total before creating
  5. Invoice auto-populates with selected entries
  6. Adjust details and Create Invoice
POST /wp-json/agency-os-ai/v1/invoices { "client_id": 15, "invoice_number": "INV-2026-0042", "issue_date": "2026-03-31", "due_date": "2026-04-15", "currency": "USD", "items": [ { "description": "Website Design - 8 hours", "quantity": 8, "rate": 150, "time_entry_ids": [12, 15, 18] } ] }

Invoice Fields

Field Type Description
invoice_number string Unique invoice identifier
client_id integer Bill to client
project_id integer Related project (optional)
issue_date date Invoice date
due_date date Payment due date
status enum draft, sent, paid, overdue, cancelled
subtotal decimal Before tax
tax_rate decimal Tax percentage
tax_amount decimal Calculated tax
total decimal Final amount due
paid_date date Date payment received

Invoice Statuses

Status Description
draft Not yet sent to client
sent Emailed to client, awaiting payment
paid Payment received in full
overdue Past due date, payment not received
cancelled Invoice cancelled

Line Items

Each invoice contains line items:

Field Type Description
description string Service description
quantity decimal Hours or units
rate decimal Price per unit
amount decimal quantity x rate
time_entry_ids array Linked time entries

Emailing Invoices

Send invoices directly to clients:

  1. Open invoice
  2. Click Send Invoice
  3. Review email preview
  4. Click Send

The email uses the invoice template configured in Agency OS → Email Templates.

Payment Tracking

Record payments received:

  1. Open paid invoice
  2. Click Mark as Paid
  3. Enter payment date and method
  4. Invoice status updates to "paid"

API Endpoints

GET /wp-json/agency-os-ai/v1/invoices

List invoices. Params: client_id, status, from_date, to_date

POST /wp-json/agency-os-ai/v1/invoices

Create new invoice.

POST /wp-json/agency-os-ai/v1/invoices/create-from-time-entries

Create invoice from selected time entries.

POST /wp-json/agency-os-ai/v1/invoices/{id}/send

Email invoice to client.

Related Documentation