Invoices

Create and manage invoices for B2B customers, subscription billing, and any sale that requires a formal payment document with line items, due dates, and payment tracking.

Invoice statuses

NameTypeRequiredDescription
draftstatusNoNot yet sent to the customer.
sentstatusNoSent to customer, awaiting payment.
paidstatusNoPayment received. paid_at is set automatically.
overduestatusNoPast due_date without payment.
cancelledstatusNoVoided before payment.

List invoices

bash
GET /v1/slate/invoices
NameTypeRequiredDescription
filter[status]stringNoFilter by status.
filter[customer_email]stringNoFilter by customer email.
pageintegerNoPage number.
per_pageintegerNoResults per page. Max 100.

Create an invoice

bash
POST /v1/slate/invoices
NameTypeRequiredDescription
customer_namestringYesCustomer or business name on the invoice.
linesarrayYesLine items: description, price, qty. product_id optional.
customer_emailstringNoCustomer email for delivery.
due_datestringNoISO 8601 date (YYYY-MM-DD) for payment due.
statusstringNoInitial status. Defaults to "draft".
tax_ratenumberNoTax percentage (e.g. 10 for 10% GST).
order_idstringNoLink this invoice to an existing POS order.
bash
curl -X POST https://api.hldgroup.org/v1/slate/invoices \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Acme Corp",
    "customer_email": "[email protected]",
    "due_date": "2025-07-01",
    "tax_rate": 10,
    "lines": [
      { "description": "HLD HomeBase Pro — June 2025", "price": 299.00, "qty": 1 },
      { "description": "Additional device licenses (×5)", "price": 15.00, "qty": 5 }
    ]
  }'

Update an invoice

bash
PATCH /v1/slate/invoices/:id

Update status, customer details, or due date. Setting status to paid automatically populates paid_at with the current timestamp.

bash
# Mark an invoice paid
curl -X PATCH https://api.hldgroup.org/v1/slate/invoices/inv_01hxyz \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paid" }'
Tip:To automate invoice payment status, subscribe to the slate.payment.succeeded webhook and call PATCH /v1/slate/invoices/:id with status: "paid" when the event fires.