Invoices

Invoices represent accounts receivable — money owed to your business by customers.

Invoice Status Flow

Status Description
draft Editable, not yet sent
open Finalized, awaiting payment
partially_paid Some payment received
stripe_paid Fully paid via Stripe
manual_paid Fully paid via linked bank transaction
void Cancelled after finalization
uncollectible Written off as bad debt

Create an Invoice

bash
curl -X POST "https://api.ondayzero.com/api/v1/invoices" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "CUSTOMER_UUID",
    "due_date": "2026-05-01",
    "line_items": [
      {
        "description": "Monthly retainer",
        "quantity": 1,
        "unit_price": 250000
      }
    ]
  }'

unit_price is in cents. 250000 = $2,500.00.

Finalize an Invoice

Draft invoices must be finalized before they can be sent or paid:

bash
curl -X POST "https://api.ondayzero.com/api/v1/invoices/{invoice_id}/finalize" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Finalization auto-generates the invoice number and creates the AR journal entry.

List Invoices

bash
curl "https://api.ondayzero.com/api/v1/invoices?status=open&sort_by=due_date" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Stripe Payment Links

If Stripe is connected, finalized invoices include a stripe_payment_url for customers to pay online. Payments are automatically recorded via webhooks.

Void an Invoice

bash
curl -X POST "https://api.ondayzero.com/api/v1/invoices/{invoice_id}/void" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Voiding reverses the AR journal entry. Only open invoices can be voided.