Skip to main content

Endpoints

MethodPathDescription
GET/v1/invoicesList invoices
POST/v1/invoicesCreate an invoice
GET/v1/invoices/:idGet an invoice
PATCH/v1/invoices/:idUpdate a draft invoice
POST/v1/invoices/:id/sendSend invoice to client
POST/v1/invoices/:id/voidVoid an invoice
GET/v1/invoices/:id/pdfDownload invoice as PDF

List Invoices

GET /v1/invoices
Query Parameters:
ParameterTypeDescription
statusstringdraft, sent, paid, overdue, void
client_idstringFilter by client
project_idstringFilter by project
fromstringISO date — filter by issue date (start)
tostringISO date — filter by issue date (end)
Example Response:
{
  "data": [
    {
      "id": "inv_abc123",
      "number": "INV-0042",
      "status": "sent",
      "client": {
        "id": "client_xyz789",
        "name": "Acme Corp"
      },
      "issue_date": "2026-02-01",
      "due_date": "2026-03-01",
      "subtotal": 12000,
      "tax": 1200,
      "total": 13200,
      "amount_paid": 0,
      "currency": "USD",
      "created_at": "2026-01-30T09:00:00Z"
    }
  ],
  "meta": {
    "total": 156,
    "total_outstanding": 37500,
    "total_collected_ytd": 280000
  }
}

Create an Invoice

POST /v1/invoices
Request Body:
{
  "client_id": "client_xyz789",
  "project_id": "proj_abc123",
  "issue_date": "2026-03-01",
  "due_date": "2026-03-31",
  "currency": "USD",
  "line_items": [
    {
      "description": "Brand Identity Design",
      "quantity": 1,
      "unit_price": 3500
    },
    {
      "description": "Brand Guidelines PDF",
      "quantity": 1,
      "unit_price": 500
    }
  ],
  "tax_rate": 0.1,
  "notes": "Payment due within 30 days. Thank you for your business!"
}
Response: 201 Created with the invoice object.

Send an Invoice

POST /v1/invoices/:id/send
Transitions the invoice from draft to sent and emails the client a payment link. Request Body (optional):
{
  "message": "Hi Jane, please find your invoice for the brand refresh project. Let us know if you have any questions!"
}
Response:
{
  "id": "inv_abc123",
  "status": "sent",
  "sent_at": "2026-03-01T10:00:00Z",
  "sent_to": "jane@globexcorp.com"
}

Invoice Object

interface Invoice {
  id: string; // "inv_abc123"
  number: string; // "INV-0042"
  status: "draft" | "sent" | "paid" | "overdue" | "void";
  client: { id: string; name: string; email: string };
  project: { id: string; name: string } | null;
  issue_date: string;
  due_date: string;
  currency: string; // ISO 4217 (e.g. "USD", "EUR")
  line_items: LineItem[];
  subtotal: number; // In minor currency units (cents)
  tax_rate: number | null;
  tax: number;
  discount: number;
  total: number;
  amount_paid: number;
  notes: string | null;
  stripe_payment_url: string | null;
  paid_at: string | null;
  created_at: string;
  updated_at: string;
}

interface LineItem {
  description: string;
  quantity: number;
  unit_price: number; // In minor currency units
  total: number;
}
All monetary values are returned in minor currency units (e.g. cents for USD). A total of 13200 represents $132.00 USD.