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
| Name | Type | Required | Description |
|---|---|---|---|
| draft | status | No | Not yet sent to the customer. |
| sent | status | No | Sent to customer, awaiting payment. |
| paid | status | No | Payment received. paid_at is set automatically. |
| overdue | status | No | Past due_date without payment. |
| cancelled | status | No | Voided before payment. |
List invoices
bash
GET /v1/slate/invoices| Name | Type | Required | Description |
|---|---|---|---|
| filter[status] | string | No | Filter by status. |
| filter[customer_email] | string | No | Filter by customer email. |
| page | integer | No | Page number. |
| per_page | integer | No | Results per page. Max 100. |
Create an invoice
bash
POST /v1/slate/invoices| Name | Type | Required | Description |
|---|---|---|---|
| customer_name | string | Yes | Customer or business name on the invoice. |
| lines | array | Yes | Line items: description, price, qty. product_id optional. |
| customer_email | string | No | Customer email for delivery. |
| due_date | string | No | ISO 8601 date (YYYY-MM-DD) for payment due. |
| status | string | No | Initial status. Defaults to "draft". |
| tax_rate | number | No | Tax percentage (e.g. 10 for 10% GST). |
| order_id | string | No | Link 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/:idUpdate 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.