Skip to main content

Invoices

An invoice is a bill a business workspace sends to one client, either for one of the client's projects or, as a client-only invoice, for the client alone. It starts as a draft you can edit freely; issuing it assigns its number, takes snapshots of your business details, the client and the money format, and freezes it. After that the only way out is to void it, and the number stays. Invoices exist only in business workspaces: every operation below returns 409 WORKSPACE_NOT_BUSINESS in a personal workspace. They are part of the Solo Business plan.

All paths are under /v1/workspaces/{workspaceID}. Invoice IDs start with inv_, invoice line IDs with iln_, payment IDs with ipay_, recurring schedule IDs with isch_.

OperationMethod and pathScope
list-invoicesGET /invoicesinvoices:read
get-invoiceGET /invoices/{invoiceID}invoices:read
get-invoice-pdfGET /invoices/{invoiceID}/pdfinvoices:read
create-invoicePOST /invoicesinvoices:write
update-invoicePATCH /invoices/{invoiceID}invoices:write
delete-invoiceDELETE /invoices/{invoiceID}invoices:write
issue-invoicePOST /invoices/{invoiceID}/issueinvoices:write
void-invoicePOST /invoices/{invoiceID}/voidinvoices:write
set-invoice-due-datePUT /invoices/{invoiceID}/due-dateinvoices:write
create-invoice-linePOST /invoices/{invoiceID}/linesinvoices:write
add-invoice-quote-linesPOST /invoices/{invoiceID}/lines/from-quoteinvoices:write
add-invoice-time-linesPOST /invoices/{invoiceID}/lines/from-timeinvoices:write
preview-time-billPOST /time/bill/previewinvoices:write
bill-timePOST /time/billinvoices:write
preview-expense-billPOST /project-expenses/bill/previewinvoices:write
bill-expensesPOST /project-expenses/billinvoices:write
add-invoice-depositPOST /invoices/{invoiceID}/lines/depositinvoices:write
apply-invoice-depositPOST /invoices/{invoiceID}/lines/apply-depositinvoices:write
update-invoice-linePATCH /invoices/{invoiceID}/lines/{lineID}invoices:write
delete-invoice-lineDELETE /invoices/{invoiceID}/lines/{lineID}invoices:write
reorder-invoice-linesPOST /invoices/{invoiceID}/lines/reorderinvoices:write
get-quote-billingGET /quotes/{quoteID}/billinginvoices:read
list-invoice-paymentsGET /invoices/{invoiceID}/paymentsinvoices:read
get-invoice-paymentGET /invoices/{invoiceID}/payments/{paymentID}invoices:read
create-invoice-paymentPOST /invoices/{invoiceID}/paymentsinvoices:write
update-invoice-paymentPATCH /invoices/{invoiceID}/payments/{paymentID}invoices:write
delete-invoice-paymentDELETE /invoices/{invoiceID}/payments/{paymentID}invoices:write
link-invoice-payment-transactionPUT /invoices/{invoiceID}/payments/{paymentID}/transactioninvoices:write
unlink-invoice-payment-transactionDELETE /invoices/{invoiceID}/payments/{paymentID}/transactioninvoices:write
get-invoice-payment-tax-set-asideGET /invoices/{invoiceID}/payments/{paymentID}/tax-set-asideinvoices:read
confirm-invoice-payment-tax-set-asidePOST /invoices/{invoiceID}/payments/{paymentID}/tax-set-asideinvoices:write
list-transaction-invoice-suggestionsGET /transactions/{transactionID}/invoice-suggestionsinvoices:read
list-linkable-depositsGET /invoices/linkable-depositsinvoices:read
allocate-transaction-to-invoicesPOST /transactions/{transactionID}/invoice-allocationsinvoices:write
list-invoice-schedulesGET /invoice-schedulesinvoices:read
get-invoice-scheduleGET /invoice-schedules/{scheduleID}invoices:read
create-invoice-schedulePOST /invoice-schedulesinvoices:write
update-invoice-schedulePATCH /invoice-schedules/{scheduleID}invoices:write
delete-invoice-scheduleDELETE /invoice-schedules/{scheduleID}invoices:write

The invoices:write scope is not offered to connected apps (OAuth or MCP clients), even with read and write access; invoices:read is. See Scopes.

Writes need the role editor, admin or owner. Viewers can read. A non-member gets 404, never 403, so a workspace's existence isn't revealed.

The invoice object​

{
"id": "inv_...",
"projectId": "prj_...",
"clientId": "cli_...",
"status": "issued",
"number": "INV-ACME-001",
"reference": "PO-7731",
"notes": "March work",
"metadata": { "external_id": "ABC-123" },
"footer": "Thank you for your business.",
"paymentText": "Pay by bank transfer to the account below.",
"periodStart": "2026-03-01",
"periodEnd": "2026-03-31",
"issueDate": "2026-04-02",
"subtotal": { "minor": 51150, "display": "$511.50" },
"taxTotal": { "minor": 0, "display": "$0.00" },
"taxes": [],
"total": { "minor": 51150, "display": "$511.50" },
"lineCount": 2,
"lines": [
{
"id": "iln_...",
"invoiceId": "inv_...",
"source": "manual",
"taskId": "ptsk_...",
"position": 0,
"description": "Wireframes",
"details": "- Low-fidelity screens\n- **Two** review rounds",
"unit": "item",
"quantityE4": 30000,
"unitPrice": { "minor": 12550, "display": "$125.50" },
"discountBps": 0,
"total": { "minor": 37650, "display": "$376.50" },
"createdAt": "2026-04-01T10:00:00Z",
"updatedAt": "2026-04-01T10:00:00Z"
}
],
"paidAmount": { "minor": 0, "display": "$0.00" },
"balance": { "minor": 51150, "display": "$511.50" },
"paymentStatus": "unpaid",
"terms": {
"kind": "net_days", "days": 30, "lateFeeText": "1.5% per month",
"label": { "key": "systemText.paymentTerms.netDays", "params": { "days": "30" }, "text": "Net 30" }
},
"dueDate": "2026-05-02",
"overdue": false,
"daysOverdue": 0,
"businessSnapshot": { "legalName": "Studio Ltd", "address": "1 Example Road", "taxId": "TAX-123" },
"clientSnapshot": { "id": "cli_...", "name": "Acme", "code": "ACME", "taxId": "" },
"currencySnapshot": { "code": "USD", "symbol": "$", "symbolPosition": "before", "precision": 2, "decimalSeparator": ".", "groupSeparator": "," },
"issuedAt": "2026-04-02T09:30:00Z",
"createdAt": "2026-04-01T10:00:00Z",
"updatedAt": "2026-04-02T09:30:00Z"
}
  • projectId is null on a client-only invoice, one made for a client with no project. Read it as nullable: any response that carries an invoice, a webhook payload (project_id) or a workspace export can now hold null. clientId is always set: the project's client, or the client the invoice was made for. An invoice can't move to another project or client.
  • To create an invoice send projectId, clientId or both (422 VALIDATION_FAILED if neither):
    • With a projectId the invoice is for that project, which must name a project of the workspace that isn't archived (404 PROJECT_NOT_FOUND, 409 PROJECT_ARCHIVED). The client is the project's. A clientId sent with it must be that client (422 INVOICE_CLIENT_MISMATCH).
    • With only a clientId the invoice is client-only. The client must exist in the workspace (404 CLIENT_NOT_FOUND) and not be archived (409 INVOICE_CLIENT_ARCHIVED). The client is locked while the draft is written to or issued, the way a project is, so an archived client's drafts are read-only too.
  • A client-only invoice takes item, hour and fixed lines with a description, a quantity and a price, and it can bill accepted quotes of its own client: quote lines (add-invoice-quote-lines) and deposits (add-invoice-deposit, apply-invoice-deposit), whether the quote is for one of the client's projects or is a client-only quote that has no project yet. It has no project, so what needs one is still refused with 422 INVOICE_HAS_NO_PROJECT: logged time (add-invoice-time-lines and bill-time onto it) and a taskId on a line. A quote line billed onto a client-only invoice doesn't carry the quote line's task. Billing time without naming an invoice still creates a project invoice.
  • Everything else works as on a project invoice: terms, issue, void, payments, matching deposits, reminders, the PDF, the share link and email, and the reports. A recurring schedule can also be for a client with no project; see Recurring drafts.
  • reference is the client's own reference, such as a purchase order number (up to 100 characters). notes, footer and paymentText are free text up to 4000 characters. A new draft's footer and paymentText start from the business profile's default footer and default payment text unless you send them; the invoice keeps its own copy. Lengths are counted in characters.
  • periodStart and periodEnd are optional calendar dates (YYYY-MM-DD) for the period the invoice covers; the start may not be after the end (422). List period in clear on update-invoice to remove both.
  • status is one of draft, issued and void (see Lifecycle). Only stored statuses appear here.
  • Lines and totals. subtotal is the sum of the line totals (before tax), taxTotal is the tax, and total is the gross total, subtotal + taxTotal: what the client pays. All three are always computed from the lines and never stored on the invoice. taxes lists one row per tax rate; for an invoice with no taxed line it is [], taxTotal is zero and total equals subtotal, the sum of the line totals. Don't add line totals to get the invoice total: tax is rounded once per rate on the whole invoice, not per line. See Totals and tax. lines is returned by get-invoice; list-invoices leaves the lines out and returns lineCount.
  • Derived payment fields. paidAmount, balance and paymentStatus (unpaid, partially_paid or paid, only for an issued invoice) are derived from the payments recorded against the invoice (see Payments), never stored, so they can't drift. disputed is always false for now. paymentCount says how many payments there are. They are measured against the gross total. Without payments paidAmount is zero, balance equals total and paymentStatus is unpaid.
  • Credit notes. An issued credit note reduces the invoice without changing it (the invoice's total and lines stay as issued). credited is the sum of its issued credit notes (void and draft notes don't count) and creditNoteCount how many there are. balance is total less credited less paidAmount, never below zero, so overdue, reminders, receivables, expected income and an online payment all use it. If the client has paid more than total less credited, refundDue is the surplus: a credit note moves no money, and nothing in the API clears refundDue yet. paymentStatus gains credited (the credit notes cover the whole invoice and nothing was paid); a client that switches exhaustively on paymentStatus should handle it. These fields and the new status are additive: an invoice without credit notes reads as before, with credited and refundDue zero and creditNoteCount 0.
  • Snapshots. businessSnapshot, clientSnapshot and currencySnapshot are present from the moment the invoice is issued and never change afterwards, whatever happens to the business profile, the client or the workspace's money format. Documents are rendered from them. businessSnapshot.logo (attachmentId, sha256) names the logo the invoice was issued with and is absent when the business had none then. businessSnapshot.phone and businessSnapshot.contactEmail are the business's contact details at that time and are omitted when empty (and on documents issued before they existed).

list-invoices takes projectId, clientId (every invoice of that client: its projects' and its client-only ones), status (a stored status), number (an exact match), overdue (true keeps only overdue invoices), overdueMinDays and overdueMaxDays (whole days overdue, each from 1 to 36500 and inclusive, a minimum above the maximum is refused with 422; either one implies overdue=true, and they use the same daysOverdue and workspace time zone as the receivables aging report, so the buckets are 1-30, 31-60, 61-90 and min 91 with no max), sort (createdAt, the default, newest first, or dueDate: earliest due date first, invoices without one last), page and pageSize (default 100, max 1000) and returns { invoices, total, page, pageSize }.

Formatting​

details on quote, invoice and recurring-schedule lines, and the quote intro and terms, the invoice notes and the schedule notes, take restricted Markdown ("BT rich text v1"). The server validates the text and stores it normalized. The PDF, the shared page and the app show it formatted. Nothing is ever turned into HTML.

You writeResult
- item, * item or • itemBullet. Indent a bullet by two or more spaces to nest it one level (deeper levels count as that level).
1. item or 1) itemNumbered item. The first number starts the list; later items are numbered in order whatever you type.
**bold**Bold.
*italic* or _italic_Italic. One level of nesting (bold inside italic or the reverse). _ inside a word, as in snake_case, stays literal.
A new lineA line break. A blank line separates paragraphs and ends a list.
\*, \_, \\, a leading \- or \1.The literal character.

Everything else, such as # headings, > quotes, [links](https://example.com), ![images](...), HTML tags, backticks, tables and ---, is not formatting: it is stored as you sent it and shown as literal text. Unmatched * or _ also stay literal.

Normalization on write: CRLF and CR become LF, tabs become two spaces, trailing whitespace is removed from every line, and leading and trailing blank lines are dropped. details is limited to 4,000 characters (after normalization); the existing 4,000-character limits of intro, terms and notes are unchanged. The description of a line is the item: one line of plain text, never formatted, and a line break in it is 422.

Where plain text is needed, such as CSV columns and email text parts, the formatting is flattened: bullets become • item (nested ◦ item), numbered items N. item, and the emphasis markers disappear.

Payment terms, due date and overdue​

Payment terms are optional at every level. The terms an invoice uses come from the first of these that is set: the invoice's own terms, its project's termsOverride, its client's defaultTerms, then the workspace's defaultTerms on the business profile. A client-only invoice has no project, so it uses its own terms, then its client's defaultTerms, then the workspace's. With none, the invoice has no due date unless you set one, and it is never overdue. The shape of the terms (kind, days, depositPercent, milestoneLabel, lateFeeText, note) is described under client payment terms. The late-fee text is informational: no fee is calculated or added.

  • Draft. create-invoice and update-invoice accept terms (replaced as a whole) and dueDate (a date you fix instead of issue date plus days). Name terms or dueDate in clear to go back to inheriting. A draft always shows the effective terms it would be issued with now in terms, with termsSource (invoice, project, client, workspace or none), and proposedDueDate: your fixed dueDate, else today plus the terms' days in the workspace's time zone. Invalid terms return the 422 errors of the client's terms (invalidPaymentTermsKind, invalidPaymentTermsDays, invalidPaymentTermsDeposit, invalidPaymentTermsText); a dueDate that is not a calendar date, or is before today in the workspace's time zone, returns 422 invalidInvoiceDueDate. If a fixed date has fallen behind by the time you issue the draft, issuing returns the same error and the invoice takes no number.
  • Issue freezes the effective terms in terms and stores dueDate in the same transaction that assigns the number: the date you fixed on the draft, else issueDate plus days (a calendar date in the workspace's time zone; 0 days for due on receipt). Changing the client's or project's terms afterwards, or clearing them, never changes an issued invoice.
  • Changing the due date after issue (set-invoice-due-date, body { "dueDate": "2026-06-01" }) is allowed for an issued invoice only (409 INVOICE_INVALID_TRANSITION for a draft or void one). It detaches the due date from the terms but keeps the frozen terms. The change is audited: dueDateOverriddenAt is set and an invoice.due_date_changed event keeps the dates before and after. The date cannot be earlier than issueDate (422 invalidInvoiceDueDate), and setting the date it already has changes nothing: no dueDateOverriddenAt, no event.
  • Overdue is derived, never stored: an invoice is overdue when it is issued (not void), still has a balance above zero and its dueDate is before today in the workspace's time zone. daysOverdue is the number of whole days past the due date while overdue, otherwise 0. An invoice due today is not overdue yet, and one paid in full is not overdue however late the payment was. Both fields are always present; for drafts and void invoices they are false and 0.

Lines​

An invoice line is one of five kinds, named by its source:

  • manual: you set the description, quantity, price and discount (create-invoice-line).
  • quote_line: bills a line of an accepted quote of the same project (add-invoice-quote-lines). A client-only invoice bills a quote of the same client instead: a project invoice can't see a quote that has no project yet, so link it first (see Quotes). Each quote line is billed in full: the new line copies the quote line's description, details, task, quantity, price and discount, and carries quoteLineId. Change the quantity or price afterwards to bill only part of it. Billing more than a quote line holds is allowed. A line of a quote that isn't accepted returns 409 QUOTE_NOT_BILLABLE; a quote line of another project (or, on a client-only invoice, another client) or workspace is 404 QUOTE_LINE_NOT_FOUND.
  • time: bills logged time (add-invoice-time-lines). See Billing time.
  • deposit: bills part of an accepted quote up front (add-invoice-deposit).
  • deposit_applied: a negative line on a later invoice that credits a deposit already billed (apply-invoice-deposit). See Deposit and progress billing.
  • expense: bills the cost of project expenses (bill-expenses). One item at the cost plus markup. See Bill project expenses.

Common rules:

  • description is required, up to 500 characters, on one line. It is the line's item and is always plain text.
  • details is optional longer text shown under the item, up to 4,000 characters, in restricted Markdown (bullets, numbered lists, bold and italic; see Formatting). Responses always carry it ("" when empty). Send "" to update-invoice-line to clear it. Lines billed from a quote carry the quote line's details; time and deposit lines have none.
  • unit is what the line is billed in: item (the default when it is left out), hour or fixed. It decides how the line reads on the PDF; the total is always quantity × unit price. A fixed line is a single fee: its quantity is always one unit (quantityE4: 10000), so leave quantityE4 out or send 10000, and put the fee in unitPriceMinor; any other quantity is 422 VALIDATION_FAILED. update-invoice-line can change the unit of a manual or quote line (a change to fixed resets the quantity to one); the unit of a time line (always hour) or of a deposit line can't change. A line billed from a quote keeps the quote line's unit, a line billed from logged time is hour, and lines that existed before units are item, except time lines, which are hour.
  • quantityE4 is the quantity in ten-thousandths of a unit, so 15000 is 1.5 (1.5 hours for an hour line). It must be above zero and at most 1,000,000 units (10000000000), and is required unless the unit is fixed.
  • unitPriceMinor is the price of one unit (the hourly rate of an hour line, the fee of a fixed line) in the workspace's minor unit (cents at currency precision 2, like every other amount in the API); responses return unitPrice as { minor, display }. It can't be negative (only a deposit_applied line is) and is range-checked (amountOutOfRange).
  • discountBps is the line discount in basis points: 1000 is 10%, from 0 to 10000. Discounts are per line.
  • taskId is optional and ties the line to a task of the invoice's project (404 PROJECT_TASK_NOT_FOUND for any other task). A task an invoice line is for can't be deleted.
  • taxRateId is optional and sets the line's tax rate; see Tax on lines.
  • The line total is quantity × unit price, less the discount, rounded half-up to the currency's precision once per line, with checked arithmetic. The server computes it on every write and returns it as total; a total that can't be stored is refused (amountOutOfRange) instead of wrapping. The line total is always before tax.
  • An invoice holds up to 200 lines (tooManyInvoiceLines). Lines are ordered by position; a new line goes to the end. reorder-invoice-lines takes lineIds, which must name every line of the invoice exactly once, and returns the lines in the new order. update-invoice-line can also set position directly.
  • On update-invoice-line, fields left out are unchanged; list task in clear to remove the task link.
  • Lines can only be added, changed, reordered or removed while the invoice is a draft (409 INVOICE_NOT_DRAFT).

Tax on lines​

A line can carry one tax rate of the business: sales tax, VAT or GST. Prices and line totals stay before tax; the tax is added on the invoice. Budget Thing adds the tax you choose. It doesn't check which rates or invoice rules apply to you. This isn't tax advice.

create-invoice-line, update-invoice-line and the lines of a recurring schedule take an optional taxRateId:

Field left out"" (empty string)A rate ID
CreateThe workspace's default rate; no tax when there is no default.No tax.That rate. 404 TAX_RATE_NOT_FOUND if it isn't a rate of the workspace, 422 TAX_RATE_ARCHIVED if it is archived.
UpdateThe line keeps its rate. An update never falls back to the default.Removes the tax.Sets that rate; the same errors. A line may keep a rate that was archived since.

Because of the create rule, setting or clearing the default rate changes what new lines get when taxRateId is omitted. Send "" to be sure a line has no tax.

A line response has taxRateId and tax ({ "name": "VAT", "percentE4": 200000 }), both omitted when the line is untaxed. On a draft tax is the live rate, so editing the rate changes it; once the invoice is issued it is the name and percent frozen at issue (see Freeze at issue under Lifecycle).

{
"id": "iln_...",
"description": "Brand workshop",
"quantityE4": 10000,
"unitPrice": { "minor": 120000, "display": "$1,200.00" },
"total": { "minor": 120000, "display": "$1,200.00" },
"taxRateId": "txr_...",
"tax": { "name": "VAT", "percentE4": 200000 }
}

Lines made from other sources take their rate like this:

  • Logged time (bill-time, add-invoice-time-lines) takes the workspace default rate. Change it afterwards with update-invoice-line, which accepts taxRateId on a time line like on any other.
  • Quote lines (add-invoice-quote-lines) take the quote line's current rate, the live one, even if the quote was sent at another percent.
  • Recurring schedules keep the rate on each template line, and every draft they make copies it. When a schedule is created, a line with no taxRateId takes the default rate. When a schedule is updated, a line with no taxRateId keeps the rate of the line at the same position, matched by position and never by the default; a line added beyond the existing ones gets no tax. A schedule may keep a rate that was archived since, but a draft on an archived rate can't be issued. If a schedule's rate has been deleted, the draft line is untaxed.
  • Deposit lines follow the deposit rule. An applied-deposit line (deposit_applied) can't change its rate: it keeps its deposit line's.

Totals and tax​

The invoice's tax is worked out from its lines, per rate:

  • Lines are grouped by rate name and percent (the live values on a draft, the frozen ones once issued). Two rates with the same name and percent make one row.
  • For each group, tax is the group's taxable amount (the sum of its net line totals, so after line discounts) times the percent, rounded half away from zero to the currency precision. Tax is rounded once per document and per rate, never per line.
  • subtotal is the sum of all line totals, taxTotal the sum of the tax rows and total is subtotal + taxTotal.
{
"subtotal": { "minor": 123456, "display": "$1,234.56" },
"taxTotal": { "minor": 24691, "display": "$246.91" },
"taxes": [
{
"name": "VAT", "percentE4": 200000,
"taxable": { "minor": 123456, "display": "$1,234.56" },
"tax": { "minor": 24691, "display": "$246.91" }
}
],
"total": { "minor": 148147, "display": "$1,481.47" }
}

taxes is always an array, sorted by percent, largest first, then by name. A group's taxable is negative only when an applied deposit at an older rate outweighs its lines; its tax row is then negative too.

Everything that is money owed uses the gross total: balance, the overpayment check, the amount of an online payment, expected income in planning, receivables, the overdue filter of list-invoices, and the public share page. An invoice's total, with tax, must still be above zero to issue it.

Billing time​

add-invoice-time-lines takes timeEntryIds (up to 1000). The entries are grouped by task and hourly rate; each group becomes one time line whose description is the task title, whose quantityE4 is the total hours and whose unitPrice is the hourly rate saved on the entries. The line total is computed from the minutes (minutes × rate ÷ 60, less the discount, rounded half-up once to the currency's precision), not from the rounded hours the line shows, so 20 minutes at 90.00 an hour is exactly 30.00.

An entry can be billed only if it belongs to the invoice's project, is billable and has an hourly rate (an entry on a fixed-price task has none): otherwise 422 TIME_ENTRY_NOT_BILLABLE, with details.reason set to other_project, not_billable or no_rate. An entry that is already billed returns 409 TIME_ENTRY_BILLED, and one whose time was written off returns 409 TIME_ENTRY_WRITTEN_OFF (restore it first with restore-time-entries); both carry details.invoiceId when an invoice is involved. The entries are billed in full: each one's billedMinutes is set to its durationMinutes.

Billed time is locked: the entry's invoiceLineId names the line, the entry can't be edited or deleted (409 TIME_ENTRY_BILLED), and list-time-entries can filter with billed=true or billed=false. The time is released again when the line is deleted, when the draft is deleted, or when the invoice is voided; releasing also clears the entry's billedMinutes and any write-off made with it, and a draft that is deleted or an invoice that is voided restores the time it wrote off. See Billed and written-off time. On a time line only the description, discount and position can change: the quantity and price follow the time entries (422, invoiceTimeLineLocked), and the total is recomputed from the minutes the entries bill (billedMinutes) when the discount changes.

Bill time with a preview​

preview-time-bill and bill-time (POST /time/bill/preview and POST /time/bill) are the full-featured way to bill logged time: part of each entry, several line layouts, a quote link, and a draft created in the same call. add-invoice-time-lines above stays as it is. Both take the same body and need the invoices:write scope and the write role:

{
"invoiceId": "inv_...",
"quoteId": "qte_...",
"entries": [
{ "id": "tent_...", "billedMinutes": 60 },
{ "id": "tent_...", "billedMinutes": 0 }
],
"lineMode": "grouped",
"groupBy": "task",
"descriptionOverrides": { "no_charge": "Goodwill" },
"noChargeLine": true
}

Billing time works per project. Every entry in a call must belong to one project (422 TIME_ENTRIES_MULTIPLE_PROJECTS, with the project IDs in details.projectIds), and invoiceId, a draft invoice, must be in that project (422 TIME_ENTRY_NOT_BILLABLE, details.reason other_project; a non-draft is 409 INVOICE_NOT_DRAFT). Give invoiceId or "newInvoice": true, not both: a new draft is created in the entries' project, so it gets that project's number pattern when issued and its terms. To bill several projects, make one call per project.

  • entries (1 to 1000, each at most once): billedMinutes is how many of the entry's minutes the invoice bills, from 0 to its durationMinutes. A billable entry's remaining minutes are written off (writtenOffMinutes, with writtenOffInvoiceId); at 0 it is written off whole and has no line. A non-billable entry billed at 0 is left untouched and unlinked, never written off. More than 0 needs an hourly rate (422 TIME_ENTRY_NOT_BILLABLE, reason no_rate). Already billed time is 409 TIME_ENTRY_BILLED and written-off time 409 TIME_ENTRY_WRITTEN_OFF; both carry details.invoiceId.
  • lineMode: summary is one line per hourly rate and needs summaryDescription; grouped is one line per group and rate, with groupBy task (the default), quote or project; detailed is one line per entry.
  • Line totals are computed from the minutes: minutes × rate ÷ 60, rounded half-up once per line to the currency's precision, so detailed mode rounds each entry and summary mode rounds the sum. quantityE4 is the hours. The invoice total is the sum of its lines, checked against the largest storable amount (422 VALIDATION_FAILED, amountOutOfRange).
  • Descriptions are data only; the server never writes translated text. The default is the task title (task groups), the quote title (quote groups; the project name for time with no quote), the project name (project groups), or YYYY-MM-DD · note (detailed; the task title when the note is empty). Send summaryDescription for summary lines. descriptionOverrides replaces any line's text by its key; keys that match no line are ignored.
  • Line keys are stable for the same request: rate:<storage rate> (summary), task:<id>:rate:<rate>, quote:<id|none>:rate:<rate> or project:<id>:rate:<rate> (grouped), entry:<id> (detailed) and no_charge.
  • noChargeLine adds one extra time line at price 0 whose quantity is the written-off hours; it links no entries, so deleting it changes nothing. It needs a descriptionOverrides.no_charge text, and is left out when nothing is written off.
  • quoteId links every time line (quoteId on the invoice line) to an accepted quote of the project: 404 QUOTE_NOT_FOUND for another project's quote, 409 QUOTE_NOT_BILLABLE (with details.quoteId and status) otherwise. A superseded version resolves to the newest version of its chain, and it is that version that must be accepted. Grouped by quote without quoteId, each line links to its entries' own quote, resolved the same way; time with no quote stays unlinked. Linked lines count in billed against quoted under time.

preview-time-bill changes and locks nothing. It returns the lines (each with key, kind (time or no_charge), description, taskId, quoteId, timeEntryIds, minutes, quantityE4, unitPrice and total), billedMinutes, writtenOffMinutes, linesTotal (what the new lines add) and invoiceTotal (the invoice's own lines plus the new ones; no invoiceId when a new draft would be created). It refuses what bill-time would refuse for the project, such as 409 PROJECT_ARCHIVED, so a preview that succeeds is not refused for the project later.

bill-time does the same atomically and answers 201 with invoice (all lines), lines (the ones just added), created, billedMinutes and writtenOffMinutes. It locks the draft invoice, then the quotes the lines link to, then the entries in one id-sorted pass, so concurrent bills of the same time can't deadlock and the loser gets 409 TIME_ENTRY_BILLED. Nothing is created when any check fails. The change is recorded in the security log as invoice.time_billed (amounts and minutes, no text), and invoice.created / invoice.updated webhooks fire as for any draft change. Deleting a line or the draft, or voiding the invoice, frees the time and restores what the bill wrote off, as described in Billed and written-off time.

Bill project expenses​

preview-expense-bill and bill-expenses (POST /project-expenses/bill/preview and POST /project-expenses/bill) bill the cost of project expenses the way bill-time bills time: expenses of one project, a draft invoiceId or newInvoice, three line layouts (summary, grouped by project and detailed), description overrides by line key, and a side-effect-free preview with the same body. The lines have source expense, unit item, quantity 1 and a unit price equal to the line total, which is the expenses' cost plus markup summed exactly and rounded half-up once to the currency precision. They take the workspace's default tax rate like any new line. A billed expense can't be billed again (409 PROJECT_EXPENSE_BILLED), and an expense with writeOff is written off whole instead of billed. Deleting the line or the draft, or voiding the invoice, releases the expenses and restores the write-offs, and the price of an expense line can't be edited (422 invoiceExpenseLineLocked). The full request, refusals and lock order are in Billing expenses onto an invoice.

Deposit and progress billing​

A quote can be billed in several invoices: a deposit first, then progress or final invoices for its lines, then the balance. Every amount is derived from the invoice lines when you read it; nothing about billing is stored on the quote.

Deposit. add-invoice-deposit takes quoteId (an accepted quote of the invoice's project, or of its client when the invoice has no project), an optional amountMinor and an optional description (default: the quote's title) and adds a deposit line at the end of a draft. The line is for one unit (quantityE4 10000), has no discount, carries quoteId and has no quoteLineId: a deposit belongs to the quote as a whole, never to one of its lines. Without amountMinor it bills what is left of the quote's own deposit, the percentage or amount set on the quote (see Quotes), less deposits already on its invoices; a quote that sets none (or has none left) needs an amount (422, depositAmountRequired). The deposit lines on a quote's draft and issued invoices can't add up to more than its subtotal (the quote total before tax): 422 DEPOSIT_EXCEEDS_QUOTE, with details.available saying how much is left. On a deposit line only the amount (unitPriceMinor, checked against the same cap), the description and the position can change; the quantity, discount and task are fixed (422, invoiceDepositLineLocked). Its taxRateId can change.

Tax on a deposit. A deposit amount is before tax, and a quote's deposit percentage applies to the quote subtotal. The deposit line carries tax like any line, and the invoice that bills it adds it. add-invoice-deposit takes an optional taxRateId to choose the line's rate:

  • A quote with no taxed lines gives an untaxed deposit line.
  • When every line of the quote has the same rate, the deposit line takes it.
  • When the quote mixes rates, or mixes taxed and untaxed lines, you must send taxRateId (a rate ID, or "" for no tax), or the request fails with 422 DEPOSIT_TAX_RATE_REQUIRED. A rate you send that is archived is 422 TAX_RATE_ARCHIVED.

Applying a deposit. apply-invoice-deposit takes the same body and adds a deposit_applied line to a draft: quantityE4 10000, a negative unitPrice and total, quoteId set. Without amountMinor it applies all the credit left. The credit is the deposit on the quote's issued invoices, less what other invoices (drafts included) already apply: 422 NO_DEPOSIT_TO_APPLY when none is left, 422 DEPOSIT_EXCEEDS_AVAILABLE (with details.available) when amountMinor is more than is left. Two drafts can't apply the same credit: the decision is made under a lock on the quote. An applied line's amount is fixed (422, invoiceDepositLineLocked); delete the line and add it again to change it. The deposit being paid or not doesn't matter to applying it.

apply-invoice-deposit ignores taxRateId. The applied (negative) line takes the rate of the deposit line it credits, and at issue it freezes that deposit line's frozen name and percent, even if the rate has been changed or archived since. The final invoice therefore reverses exactly the tax the deposit invoice charged. If the rate changed in between, the applied line forms its own group with a negative tax row, and the full lines are taxed at the current rate. Tax is rounded on the deposit invoice and again on the final one, so the tax across both can differ from the quote's tax by up to one smallest currency unit. If a quote's deposits were billed at different rates, an application credits at the earliest deposit's rate.

Negative amounts are allowed for deposit_applied lines only, by the service and by database checks. A draft can sit below zero while it is being built; issuing still needs a total above zero (422 INVOICE_TOTAL_NOT_POSITIVE), so a deposit that covers the whole invoice has to be applied in part.

Before the quote has a project. A deposit for a client-only quote is billed on a client-only invoice. Credit is found by quote, not by invoice, so once the quote is linked to a project, the project's final invoice bills the quote's lines and applies that deposit with apply-invoice-deposit. A client-only deposit invoice drafted before the link stays valid after it. get-quote-billing works on a client-only quote too: it has no project time to report, so unbilledTime is empty.

Voiding. Voiding a deposit invoice is refused while other invoices apply the deposit it bills (409 INVOICE_DEPOSIT_APPLIED, details.quoteId and details.applied); void or edit those first. Voiding the invoice that applies the deposit returns the credit.

The billed amount. Billing is counted before tax. A quote's billedAmount (and billed below) is the sum of the line totals of its issued invoices that bill it: its quote lines, its deposits, and its applied deposits, which take the same amount off again. A deposit of 127.88 billed, then the full quote lines of 511.50 with 127.88 applied, nets to the quote subtotal 511.50 and the quote is fully billed, whatever tax the invoices added. Void invoices count for nothing.

get-quote-billing reports billed against quoted for one quote:

{
"quoteId": "qte_...",
"status": "accepted",
"quoted": { "minor": 51150, "display": "$511.50" },
"billed": { "minor": 12788, "display": "$127.88" },
"pending": { "minor": 0, "display": "$0.00" },
"remaining": { "minor": 38362, "display": "$383.62" },
"overBilled": false,
"fullyBilled": false,
"lines": [
{
"quoteLineId": "qln_...",
"taskId": "ptsk_...",
"description": "Wireframes",
"quoted": { "minor": 37650, "display": "$376.50" },
"billed": { "minor": 0, "display": "$0.00" },
"pending": { "minor": 0, "display": "$0.00" },
"remaining": { "minor": 37650, "display": "$376.50" },
"overBilled": false,
"unbilledMinutes": 90
}
],
"deposit": {
"quoted": { "minor": 12788, "display": "$127.88" },
"billed": { "minor": 12788, "display": "$127.88" },
"pending": { "minor": 0, "display": "$0.00" },
"applied": { "minor": 0, "display": "$0.00" },
"reserved": { "minor": 0, "display": "$0.00" },
"available": { "minor": 12788, "display": "$127.88" }
},
"unbilledTime": {
"minutes": 90, "entryCount": 1, "amount": { "minor": 15000, "display": "$150.00" },
"unratedMinutes": 0
},
"time": {
"billed": { "minor": 0, "display": "$0.00" },
"pending": { "minor": 10000, "display": "$100.00" }
}
}
  • quoted is the quote's subtotal, before tax, and every amount here is before tax: the tax rates of the invoices may differ from the quote's.
  • billed counts issued invoices and pending draft ones; remaining is quoted less billed, and goes negative when more is billed than quoted. Over-billing is reported (overBilled), never refused. The same figures are given per quote line (only quote_line lines count towards a line; deposits belong to the quote).
  • deposit.quoted is the deposit the quote sets, as an amount (absent if none). deposit.billed, pending, applied (issued invoices) and reserved (drafts) are positive amounts, and available is what a new invoice can still apply. deposit.suggested is the amount to prefill when billing a deposit, with deposit.suggestedSource saying where it comes from: quote (the quote's own deposit, which is also what a deposit line gets without amountMinor) or terms. When the quote sets no deposit, the suggestion is the deposit percentage of the project's effective payment terms (the project's override, else the client's default) applied to the quote subtotal, rounded half-up to the currency precision. Either way the already billed and drafted deposits are taken off, and it is absent when none is set or nothing is left. A terms-based suggestion is only a prefill: adding a deposit without amountMinor is still refused when the quote sets no deposit, any amount you send wins, and no invoice is created.
  • unbilledTime is the billable time of the quote's project that no invoice bills: the minutes and amount of entries with an hourly rate (the amount is worked out the way billing them would, once per task and rate) and, as unratedMinutes, the billable minutes with no rate, which can't be invoiced as time. Written-off time isn't counted. A line with a task shows that task's unbilled minutes as unbilledMinutes.
  • time is what time lines that link to the quote bill (quoteId set, see Bill time with a preview): billed on issued invoices and pending on drafts. These amounts are already part of the quote's billed and pending, so time billed against a quote shows up in billed against quoted without a quote line; time lines without a quote never count.

Reading is allowed in business workspaces after a downgrade; the two write operations need the feature like every other invoice write.

Credit notes​

An issued invoice never changes. To reduce what it asks for after issue (a refunded line, a goodwill discount, a billing mistake) you create a credit note against it. A credit note has its own lifecycle (draft, issued, void), its own number series and its own lines, and every amount on it is positive: it reads as "reduces the invoice by". Credit notes are Business-plan features like invoices, and use the invoices:read and invoices:write scopes; a token that can write invoices can issue a credit note.

Method and pathWhat it does
POST /v1/workspaces/{workspaceID}/invoices/{invoiceID}/credit-notesCreates a draft against an issued invoice. Send creditInFull: true to copy every creditable line with what is left on it. reason can follow later but is needed to issue.
GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/credit-notesThe invoice's notes, newest first, without lines. Filter with status.
GET /v1/workspaces/{workspaceID}/credit-notesAll notes of the workspace. Filter with invoiceId and status.
GET, PATCH, DELETE /v1/workspaces/{workspaceID}/credit-notes/{creditNoteID}Read a note with its lines and totals. A draft's reason, reference, notes and footer can be changed, and a draft can be deleted.
POST /v1/workspaces/{workspaceID}/credit-notes/{creditNoteID}/lines, PATCH and DELETE …/lines/{lineID}Edit the lines of a draft.
GET /v1/workspaces/{workspaceID}/credit-notes/{creditNoteID}/pdfThe credit note as a PDF (application/pdf, ?download=true for an attachment), naming the invoice it credits. A draft is rendered on request with a DRAFT mark; an issued note is stored when it is issued and returned unchanged afterwards, also when voided. Needs the invoices:read token scope.
POST /v1/workspaces/{workspaceID}/credit-notes/{creditNoteID}/issueNumbers the draft, copies the invoice's business, client and currency snapshots onto it and freezes it.
POST /v1/workspaces/{workspaceID}/credit-notes/{creditNoteID}/voidVoids an issued note (reason optional). It keeps its number and no longer reduces the invoice.

A line either credits an invoice line (invoiceLineId; quantity, price, discount and tax default from it) or is free-form (description, quantityE4, unitPriceMinor, and a taxRateId of a rate the invoice charged, or the invoice's only tax group when omitted). Quantities are in ten-thousandths and prices in the workspace's minor unit, as on invoice lines.

Caps. A line can't credit more than is left on its invoice line (CREDIT_EXCEEDS_LINE), a note can't take more tax from a rate than the invoice charged (CREDIT_EXCEEDS_TAX_GROUP), and all issued notes together can't exceed the invoice's total (CREDIT_EXCEEDS_INVOICE). Credit above what is unpaid is allowed: the surplus is refundDue on the invoice, and issuing a note moves no money.

Totals. A draft's totals are computed from its lines. When it is issued they are stored (subtotal, taxTotal, taxes, total), with the tax of each rate carried from the invoice and the last credit on a rate taking the rounding remainder, so credits add up to the invoice's tax to the cent.

Numbering. Credit notes use the business profile's credit note pattern (default CN-{CLIENT}-{NNN}, the same placeholders and counters as invoices). The pattern must differ from the invoice pattern (CREDIT_NOTE_PATTERN_SAME_AS_INVOICE). A void note keeps its number.

Effect on the invoice. balance is total - credited - paidAmount, never below zero, everywhere the balance is used (overdue, receivables, expected income, reminders, online payment amount). An invoice with an issued credit note can't be voided (INVOICE_HAS_CREDIT_NOTES): void the note first. See the invoice fields credited, refundDue and creditNoteCount above.

Data export. The workspace data export (data.json) has creditNotes and creditNoteLines arrays and the archive has credit-notes.csv and credit-note-lines.csv, with amounts in the workspace's minor unit. A note's subtotalMinor, taxTotalMinor and totalMinor are the stored totals and are absent on a draft. These are additive members of format version 1.

The note object has id (cn_…), invoiceId, status, number, reason, reference, notes, footer, issueDate, invoiceNumber and invoiceIssueDate (frozen at issue), subtotal, taxTotal, taxes, total, lineCount, lines (single reads only), the snapshots, issuedAt, voidedAt, voidReason, createdAt and updatedAt. Money fields are {minor, display} objects.

Lifecycle​

  • Draft. Created by create-invoice. Only a draft can be edited (reference, notes, footer, payment text, period, payment terms and due date), have lines added, changed, reordered or removed, or be deleted. Any of those on another status returns 409 INVOICE_NOT_DRAFT with details.status. Deleting a draft releases the time its lines billed.
  • Issue (issue-invoice) numbers the invoice, sets issueDate to today in the workspace's time zone, takes the snapshots and the payment terms, sets the due date and moves it to issued. The invoice needs at least one line (422 INVOICE_EMPTY) and a total, tax included, above zero (422 INVOICE_TOTAL_NOT_POSITIVE). A taxed line on an archived rate is refused with 422 TAX_RATE_ARCHIVED (see Freeze at issue below). It happens in one transaction: if anything fails the invoice stays a draft and the numbering sequence doesn't move. Issuing an invoice that isn't a draft returns 409 INVOICE_INVALID_TRANSITION and never takes a second number.
  • Freeze at issue. In the same transaction, each taxed line copies its rate's name and percent onto itself. Totals are never stored: they are recomputed from the frozen line data, so editing, archiving or deleting the rate afterwards changes nothing on an issued invoice. Issuing an invoice that has a taxed line on an archived rate is refused with 422 TAX_RATE_ARCHIVED: move the line to an active rate or to no tax and issue again, so a rate change is a deliberate choice for each document. The one exception is an applied-deposit line, which freezes its deposit line's rate.
  • Immutable once issued. An issued invoice and its lines can't be changed. The service refuses it, and the database refuses it again (a trigger rejects any write that would change an issued or void invoice's lines, amounts, number or snapshots), so no other code path can alter a document a client has received. The due date is the one field that stays editable after issue (set-invoice-due-date, audited; see Payment terms, due date and overdue).
  • Void (void-invoice, optional reason up to 500 characters) moves an issued invoice to void. The invoice keeps its number, lines and snapshots for the record; the time its lines billed is released, and the quote lines it billed against no longer count as billed. An invoice with payments recorded against it can't be voided: 409 INVOICE_HAS_PAYMENTS (delete the payments first). An invoice whose deposit other invoices apply can't either: 409 INVOICE_DEPOSIT_APPLIED. A payment and a void racing each other can't both win: the payment is recorded and the void refused, or the other way round. Any other status returns 409 INVOICE_INVALID_TRANSITION.
  • Delete (delete-invoice) removes a draft and its lines. An issued invoice is never deleted; void it.

An archived project is read-only for invoices: creating, editing and issuing an invoice returns 409 PROJECT_ARCHIVED. Reading and voiding stay possible.

Number on issue​

An invoice has no number while it is a draft. issue-invoice takes the next number from the invoice numbering pattern: the project's invoiceNumberPattern if it has one, else the business profile's. A client-only invoice always uses the business profile's pattern and series, so it shares the sequence of the client's project invoices. The pattern grammar, the scope of the sequences and the rules for rendered numbers are described in Business Profile and Document Numbering.

  • The number is built from the pattern's placeholders: the date the invoice is issued (in the workspace's time zone), the client's and project's short codes and the sequence. With the default pattern, INV-{CLIENT}-{NNN}, every client has its own sequence and there is no global counter.
  • Numbers are unique in the workspace. Within one sequence they are gapless: a failed issue takes none, and a voided invoice keeps its number (the next invoice takes the next one). Concurrent issues in one sequence are serialized, so two invoices never share a number.
  • A pattern that uses {PROJECT} needs the project to have a code: otherwise 422 INVOICE_NUMBERING_CODE_MISSING and the invoice stays a draft. A client-only invoice has no project code, so a profile pattern with {PROJECT} can't number it: the same 422, with details.placeholder {PROJECT}. Change the pattern (the default, INV-{CLIENT}-{NNN}, has no project) or bill a project.
  • Once assigned, a number never changes, even if the pattern is changed later. A project or client code can't change once a numbered invoice was built from it (409 PROJECT_CODE_IN_USE, CLIENT_CODE_IN_USE); drafts have no number and don't block it. A client with any invoice, a draft or a client-only one included, can't be deleted (409 CLIENT_IN_USE).
  • If the next number is already used by another document, the issue fails with 409 DOCUMENT_NUMBER_CONFLICT and nothing changes; set the next number for the series and issue again.

Payments​

A payment is money a client paid against an issued invoice. Recording one changes what is derived on the invoice, nothing is stored on it: paidAmount is the sum of its payments, balance is total less that, and paymentStatus is unpaid, partially_paid or paid (the balance is zero). Deleting a payment simply changes the derived values back.

{
"id": "ipay_...",
"invoiceId": "inv_...",
"amount": { "minor": 4000, "display": "$40.00" },
"paymentDate": "2026-04-09",
"method": "bank_transfer",
"reference": "BANK-7731",
"note": "First half",
"source": "manual",
"kind": "payment",
"disputed": false,
"transactionId": "txn_...",
"transactionLinkState": "linked",
"createdAt": "2026-04-09T10:15:00Z",
"updatedAt": "2026-04-09T10:15:00Z"
}
  • Recording (create-invoice-payment) needs amountMinor (above zero, in the workspace's minor unit like every amount) and date, a calendar date that is not in the future in the workspace time zone. method is bank_transfer, card, cash, check or other (the default; stripe is reserved, see below); reference is up to 100 characters and note up to 500. A draft or void invoice takes no payments: 409 INVOICE_NOT_PAYABLE with details.status.
  • Retrying safely. Send an optional Idempotency-Key header (up to 255 characters) with create-invoice-payment. Retrying with the same key and the same body returns the original payment, with the same 201 status and its linked transaction, and records nothing new: no second payment and, with transaction.create, no second income transaction. The body that must match is the invoice, amountMinor, date, method, reference, note and the transaction you sent. The same key with a different body is a 409 IDEMPOTENCY_KEY_CONFLICT whose details.field is Idempotency-Key. Keys are scoped to the workspace, and concurrent requests with one key create exactly one payment. A retry of a payment that already paid the invoice off still returns the original instead of PAYMENT_EXCEEDS_BALANCE. Without the header a request is never deduplicated, so two identical requests record two payments. See Idempotency.
  • No overpayment. The payments of an invoice can't add up to more than its total: 422 PAYMENT_EXCEEDS_BALANCE, with what is still owed in details.balance. Overpayments aren't supported yet. Several payments, each within the balance, are fine and are how a partial payment is recorded.
  • Updating (update-invoice-payment) changes the amount, date, method, reference or note, with the same checks. The linked transaction is not changed.
  • Deleting (delete-invoice-payment) removes the payment. A transaction it was linked to stays: the money still arrived.
  • Concurrent requests are serialized on the invoice, so the sum never goes past the total, and a payment can't slip in while the invoice is being voided.
  • Source: manual for payments recorded through these operations; bank_match for payments created by confirming a deposit's suggestions (below).
  • stripe is reserved. method stripe can't be chosen when recording or updating: 422 INVOICE_PAYMENT_METHOD_RESERVED.
  • kind and disputed. Every payment has kind payment and disputed false today. Read kind rather than assuming amount is above zero.

Linking a payment to an income transaction​

A payment can rest on one income transaction, the record of the money in the workspace's budget. Without a link the payment is recorded on its own and the budget isn't touched. Pass transaction when recording, or link later with link-invoice-payment-transaction, giving either:

  • transactionId: an existing transaction of the workspace. It must be income (422 PAYMENT_TRANSACTION_NOT_INCOME) and still have room: the payments linked to one transaction can't add up to more than its amount (422 PAYMENT_TRANSACTION_OVER_ALLOCATED, details.available says how much is left). One deposit can therefore pay two invoices. An unknown transaction is a 404.
  • create: { "accountId": "acc_...", "categoryId": "cat_...", "memo": "..." }. A new income transaction is created through the normal transactions service in the same request: the payment's amount and date, the payee of the invoice's client, the memo you give (the invoice number by default, so a bank deposit can be matched by it) and not cleared, so the bank feed can still match it. Without categoryId the money goes to Ready to Assign. If the payment is refused nothing is created.

The link is also changed or removed on its own: link-invoice-payment-transaction replaces an earlier link, and unlink-invoice-payment-transaction clears it and leaves both records. transactionLinkState says where it stands:

StateMeaning
linkedtransactionId is the income transaction.
noneNo transaction: recorded on its own, or unlinked on purpose.
unlinkedThe linked transaction was deleted. The payment stays, transactionId is empty and transactionUnlinkedAt says when, so a client can flag that the budget no longer shows this money. The invoice status does not change. Linking again clears the flag.

Matching a deposit to invoices​

list-transaction-invoice-suggestions ranks the open invoices an income transaction may pay (a transaction that isn't income is 422 PAYMENT_TRANSACTION_NOT_INCOME). It writes nothing, and nothing is ever applied automatically: the user confirms a split with allocate-transaction-to-invoices.

An issued invoice that still owes something, and was issued on or before the transaction's date, is a candidate when the transaction says something about it. Each match is a reasons entry:

ReasonMeaning
number_in_memoThe transaction's memo contains the invoice number as a whole token (INV-1 isn't found in INV-10).
payeeThe transaction's payee is the invoice's client's payee.
aliasNo payee match, but the memo contains a bank description learned for the client's payee.
exact_balanceThe transaction's unallocated amount equals the invoice's balance.

Suggestions come best first (score, then the older invoice), at most 20, each with a confidence (high, medium, low) and a suggestedAmount, the smaller of the invoice's balance and the transaction's unallocated amount. The response also gives the transaction's amount, allocated (what linked payments already claim) and unallocated; a fully allocated transaction has no suggestions. proposedAllocations splits the unallocated amount over the suggestions: a combination of invoices whose balances add up exactly (fewest invoices first, proposedExact: true), otherwise the best matches filled in order. Each share's amount.minor goes into amountMinor of the allocations operation. Allocating refuses a transaction dated after today in the workspace time zone (invalidInvoicePayment, 422), even though suggestions are still returned for it.

allocate-transaction-to-invoices takes allocations, one to 20 entries of { "invoiceId", "amountMinor" }, no invoice twice, and creates one payment per invoice, all linked to the transaction, in one database transaction: if any share is refused nothing is written. The payments have source bank_match, method bank_transfer and the transaction's date, and the usual rules hold: an invoice must be issued (409 INVOICE_NOT_PAYABLE), a share can't exceed its invoice's balance (422 PAYMENT_EXCEEDS_BALANCE), and the shares plus what the transaction already carries can't exceed its amount (422 PAYMENT_TRANSACTION_OVER_ALLOCATED). The response is { "payments": [...] } in request order. Both operations are for business workspaces only; the allocation needs the business tools feature (402 after a downgrade), suggestions stay readable.

Reading what payments claim of many deposits​

list-linkable-deposits answers "how much of each of these deposits is still free?" for a whole page at once, so a picker that lets a user link a payment to an existing deposit needs no request per deposit. Pass the candidate transactions as repeated transactionId query parameters (at most 100, for example the ids from a list-transactions call). It runs one grouped query over the invoice payments.

GET /v1/workspaces/{workspaceID}/invoices/linkable-deposits?transactionId=txn_a&transactionId=txn_b

The response is { "deposits": [...] }, one entry per income transaction of the workspace, in the order of the request, each with transactionId, amount, allocated (what linked invoice payments already claim) and unallocated (amount less allocated, never negative). A fully claimed deposit is still returned with unallocated of zero, so the caller decides whether to show it. Ids that are not income, don't exist, or belong to another workspace are left out rather than refused. It writes nothing, is for business workspaces only (409 WORKSPACE_NOT_BUSINESS otherwise), and needs only the invoices:read scope. unallocated equals the unallocated of list-transaction-invoice-suggestions for the same transaction.

What this means for transactions​

The transactions operations enforce the link, so no other path can break it:

  • Lowering an income transaction's amount below the sum of its linked payments, or converting it to a transfer, is refused with 409 TRANSACTION_HAS_INVOICE_PAYMENTS (details.allocated and details.paymentCount). Raising the amount, or lowering it to exactly what is allocated, is fine.
  • Deleting the transaction is allowed and leaves its payments flagged unlinked.
  • Bank sync: a payment's transaction is an ordinary uncleared transaction, so a deposit imported from the bank is suggested against it (exact amount within a few days) and merging them keeps the same transaction. The payment still points at it and no second income transaction appears. If the downloaded amount is lower than what the payments claim, using it to resize the transaction is refused with the same 409.
  • Cash basis: invoices and payments don't post to the ledger. Only the linked income transaction does.

Tax set-aside​

A business workspace can set a share of each client payment aside for taxes. It is a suggestion the user confirms: nothing moves until POST. The percentage is the one the user entered, not tax advice.

  • Set the share in the business profile (taxSetAsideBasisPoints and the taxSetAsideCategoryId it is funded into). A client can carry its own share, which replaces the profile's for that client's payments (clients).
  • GET /invoices/{invoiceID}/payments/{paymentID}/tax-set-aside (get-invoice-payment-tax-set-aside) returns status, rateBasisPoints, rateSource (profile or client), paymentAmount, suggestedAmount, salesTax, incomeTaxShare, the category and, once confirmed, the run. suggestedAmount is salesTax + incomeTaxShare. salesTax is the payment's share of its invoice's tax (derived from the invoice's tax rows and its payments, the same figure as collectedTax in the revenue report) and is suggested in full. incomeTaxShare is the share applied to the rest of the payment (payment minus salesTax), rounded half up to the workspace currency's smallest unit. A payment on an untaxed invoice has salesTax 0, so the suggestion is the payment times the share, as before. The status is suggested, confirmed, reversed, not_configured (no usable category, or no share, or a share of 0, and no salesTax) or not_in_budget (the payment has no income transaction, so its money isn't in the budget).
  • POST to the same path (confirm-invoice-payment-tax-set-aside) funds the category from Ready to Assign and returns 201. The optional body { "amountMinor": ... } replaces the suggestion; it must be above zero and at most the payment. The money moves as an ordinary funding run (idempotency key tax-set-aside:<paymentID>), so it needs enough Ready to Assign (409 INSUFFICIENT_ASSIGNABLE_FUNDS), appears in the funding history and can be reversed there.
  • A payment is set aside once. Repeating the request with the same amount (or none) returns the first result; another amount, or a request after the run was reversed, is refused with 409 TAX_SET_ASIDE_ALREADY_CONFIRMED. A reversed set-aside can't be redone through this endpoint: to move that money again, assign it to the category with an ordinary funding run. Concurrent confirmations of one payment are serialized.
  • Scopes: invoices:read for the GET, invoices:write for the POST. The POST needs a plan with tax planning; after a downgrade the GET still works.
  • The set-aside run is a normal funding run, so backups, exports and clones carry it with the rest of the budget. The payment keeps its link to the run, so a restored or cloned workspace still reports the payment as confirmed (or reversed) and doesn't fund it again. The profile and client shares and the category are restored and cloned with the profile and clients.

PDF​

get-invoice-pdf returns the invoice as a PDF (application/pdf). Add download=true to get Content-Disposition: attachment instead of inline; the file is named after the number, for example Invoice-INV-ACME-001.pdf. The response is Cache-Control: private, no-store.

  • A draft is rendered from its current content, with a "Draft" mark and no number, every time you ask. Nothing is kept, and the business details and money format printed are the ones in force now.
  • An issued invoice is rendered from its lines and its snapshots, so it shows the business details, the client and the money format it was issued with, whatever has changed since. The rendered PDF is stored when the invoice is issued, and asking again returns the same bytes until the due date is changed (set-invoice-due-date). A changed due date replaces the stored PDF with a new one that shows the new date and keeps everything else as issued: the same snapshots, lines and logo. A void invoice returns the PDF it was issued with. The PDF shows the invoice as issued; it doesn't show payments or the void. The logo is frozen with the other details: if the PDF has to be rendered again (its stored copy was lost, or the workspace was restored from a backup or cloned, which leave stored PDFs out), it uses the logo attachment recorded at issue, as long as that attachment is still available and unchanged. If it isn't (logo attachments are not part of backups or clones either), the PDF has no logo; it never picks up the logo the profile has now.
  • Layout. The PDF has the business logo (when the profile has one), the business and client blocks, the number, issue date, reference and period, the lines with quantity, rate, discount and amount (headed Quantity and Rate, or Hours and Hourly rate when every line is hour; an hour line prints 2.5 hrs at $120.00/hr, a fixed line leaves quantity and rate blank), the totals, and the notes, payment details and footer. An invoice with no taxed line prints only the total. When at least one line is taxed, the totals block prints Subtotal, one row per tax rate (for example "VAT 20%" or "Sales tax NY 8.875%") and Total, and a Tax column with each line's percent appears only when the lines differ in tax (more than one rate, or taxed and untaxed lines together). The business tax ID and the client tax ID are printed as before (see the toggles in the document style); the API doesn't check them. When the invoice was issued with payment terms, the issue-date block also has the terms label (for example "Net 30") and the due date, and a "Payment terms" section under the notes lists the deposit percentage, the milestone, the late-fee wording and the note, each only when it is set. They come from the terms frozen at issue, never from the client's or project's terms as they are now; an invoice issued without terms has no terms label, no due date and no section. Late-fee wording is printed as written: no fee is calculated. It is a single document of as many A4 pages as the lines need. Dates are printed as YYYY-MM-DD. Labels such as "Invoice" and "Due date" are in English for now. Text is printed in a font that covers the Latin, Greek and Cyrillic scripts; characters from other scripts and emoji are not supported yet and print as a replacement mark or are left out.
  • Not a user attachment. The stored PDF doesn't appear in the workspace's attachment list and doesn't count towards its storage.
  • It is a read: it needs invoices:read, stays available after a downgrade, and is rate limited per workspace (see Limits). It returns 404 INVOICE_NOT_FOUND for an invoice of another workspace and 409 WORKSPACE_NOT_BUSINESS in a personal workspace. If the PDF can't be created it returns 500 DOCUMENT_RENDER_FAILED and the invoice is unchanged.

Recurring drafts​

A project, or a client with no project, can bill on a rhythm. A recurring schedule holds a frequency, a first due date, an optional end date and the lines every invoice starts with; on each due date the server creates a draft invoice from it, and a person reviews, edits and issues the draft like any other. The server never issues, numbers, sends or shares anything by itself, and a draft it creates is an ordinary draft in every way (status draft, no number, editable lines). A project has at most one schedule; a client can have any number of client-only schedules, which draft client-only invoices (no project, clientId set).

create-invoice-schedule takes a projectId or a clientId (one of them is required, else 422 VALIDATION_FAILED; with a project the client is the project's, and a clientId that differs from it is refused with 422 INVOICE_CLIENT_MISMATCH; a missing client is 404 CLIENT_NOT_FOUND and an archived one 409 INVOICE_CLIENT_ARCHIVED), frequency, startDate, optional endDate, active, reference and notes, and lines (1 to 50, each with a description, optional details (restricted Markdown, Formatting), an optional unit (item, hour or fixed; item when left out), quantityE4 (left out for fixed), unitPriceMinor in the workspace's minor unit an optional discountBps and an optional taxRateId, priced exactly like invoice lines; see Tax on lines). Each draft's lines keep the template line's unit and details. The response adds each line's total and taxRateId, the schedule's total (what every draft totals, before tax), nextDueDate, active and lastRunAt. A schedule response always has clientId; projectId is absent on a client-only schedule, so it may be null where it used to always be set. list-invoice-schedules filters by projectId, by clientId (the client's project and client-only schedules together) and by active.

FieldRules
frequencyweekly, every_2_weeks, twice_per_month, every_4_weeks, monthly, every_2_months, every_3_months, every_4_months, every_6_months, yearly or every_2_years. Due dates are counted from startDate, never from the previous one: a monthly schedule starting on the 31st is due on Feb 28, then back on Mar 31. There is no daily frequency.
startDateThe first due date, today or later in the workspace time zone. It can't change afterwards; delete the schedule and create another to start somewhere else.
endDateThe last date a draft may be due, on or after startDate. Once the schedule runs past it nextDueDate is absent and no more drafts are made. Moving the end date out starts it again from today. clearEndDate: true removes it.
reference, notesCopied onto every draft. notes takes the formatting of lines and is stored normalized. The footer and payment text come from the business profile's defaults on the day the draft is made, like any new draft.

When a draft is made. A background job runs hourly and drafts every date that has come, judged in each workspace's own time zone: a date is due once it is today or earlier in the workspace's time zone. Each due date is drafted at most once, also with several servers running, and a draft you delete is not made again. The draft's scheduleId and scheduleDate say which schedule and which due date it is for. If the server was down, each date missed in the last 7 days gets its own draft, oldest first, at most 12 per schedule per pass. A date older than 7 days passes without a draft and the schedule moves on. The draft is priced with the workspace's currency precision at the time it is made.

Pausing. PATCH with active: false pauses a schedule; nothing is drafted while it is paused. Resuming it, or changing its frequency, moves nextDueDate to the first due date from today on, so the time it was off is never billed in a burst. A date already drafted is never drafted again.

When nothing is drafted. The server makes no draft, and the schedule keeps moving on, while the workspace owner's plan doesn't include business tools or their account is read-only after a downgrade. When that clears, only dates from the last 7 days are drafted; older ones pass without drafts, so a long downgrade or a restored old backup never brings a burst of backdated drafts. While the project (or, for a client-only schedule, the client) is archived the dates pass without drafts too, so unarchiving doesn't either. A workspace that is archived, deleted or no longer a business workspace is skipped.

Changing the template with lines, reference or notes affects drafts made from then on; drafts already made are not touched. Deleting a schedule keeps every draft and invoice it made (an invoice only loses its scheduleId, and keeps scheduleDate). A client with a client-only schedule can't be deleted (409 CLIENT_IN_USE, details.resource invoice_schedule) until the schedule is deleted. A draft from a client-only schedule resolves payment terms like any client-only draft: its own terms, else the client's, else the workspace default from the business profile.

Payment reminders​

A business workspace can have the server email a client a reminder when an issued invoice is about to fall due, falls due, or is overdue and still has a balance. Reminders are off until the owner turns them on.

The policy is one object per workspace: GET and PUT /v1/workspaces/{workspaceID}/invoice-reminder-settings (get-invoice-reminder-settings, update-invoice-reminder-settings).

FieldRules
enabledtrue turns reminders on for every issued invoice that has a due date.
offsetDays1 to 6 different whole numbers from -30 to 90, as days from the due date: -3 is three days before, 0 the due date, 7 a week after. Returned in ascending order. A workspace that never saved a policy reads as off with [-3, 0, 7].
noteDeprecated. An alias of the business email setting reminderMessage, the message shown in every reminder. GET returns reminderMessage. A PUT with note writes reminderMessage; a PUT without it leaves the message as it is (it used to clear it), and an empty string clears it. Reminders carry that message, with its placeholders filled in, and the business's sign-off after it. Use the email settings instead.

PUT replaces the whole policy. Replies to a reminder go to the verified email address of whoever last saved it, as long as they are still an active member who can edit data. If they have been removed or can no longer edit, replies go to the workspace owner instead. If that person has no verified address, there is no Reply-To.

When a reminder is sent. A background job runs hourly. A reminder is owed for an invoice that is issued, has a dueDate, still has a balance above zero and is not paused, on each day dueDate + offsetDays that has come, judged in the workspace's time zone.

  • It is sent on its day or up to 3 days later (covering an outage), never earlier and never for an older day. Turning reminders on never mails a client about an old due date, and a day before the invoice was issued is never owed.
  • Of the reminders owed at once, only the latest is sent; the earlier ones are recorded as skipped.
  • Each combination of invoice, day and due date is claimed before the mail is sent, so a reminder goes out at most once, also with several servers running. A failed one is not retried. If the owner changes the due date, the new due date owes its own reminders.
  • A paid or void invoice gets none; a partly paid one gets reminders that show the balance still to pay.
  • At most 20 reminders per workspace are sent in one pass; the rest wait for the next one (while they are still within their 3 days).
  • The server sends none while the workspace owner's plan doesn't include business tools or their account is read-only after a downgrade, in a workspace that is archived, deleted or not a business workspace, or when the deployment has no mail server.
  • The server sends none while the workspace's email sending is paused after too many bounces or complaints. Each reminder that comes due then is recorded as skipped and never retried, so it isn't sent once sending resumes. No audit entry is written, because no person triggered the send.

The message is an ordinary document email: sent from Budget Thing's own address with the business's name followed by "via Budget Thing" as the sender name, the invoice PDF attached, to the first contact of the invoice's client whose address can be mailed (an address that bounced for good or was reported as unwanted is skipped). It says where the day stands against the due date ("due in 3 days", "due today", "7 days overdue") and the balance still to pay. Each reminder is also on the invoice's email list, without a signed-in sender.

Per invoice. GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/reminders (list-invoice-reminders) returns paused and the newest 100 reminders the server owed, newest first, each with offsetDays, dueDate, remindOn, an outcome and the emailId of its delivery:

outcomeMeaning
sentHanded to the mail server.
failedThe mail server refused it. Not retried.
no_recipientNo contact of the client has an address that can be mailed. Not retried.
skippedA later reminder was owed at the same time, or the workspace's email sending was paused.
sendingIn progress, or interrupted; never retried.

POST .../reminders/pause and POST .../reminders/resume (pause-invoice-reminders, resume-invoice-reminders) stop and restart reminders for one invoice; both are idempotent and return the same object. A reminder whose day passed while an invoice was paused is not sent late beyond the 3-day window.

Changing the policy and pausing need a plan that includes business tools (402 otherwise) and an editor role (403); reading stays open after a downgrade. Personal workspaces answer 409 WORKSPACE_NOT_BUSINESS, and an invoice of another workspace is a 404 INVOICE_NOT_FOUND. Invalid days or note are a 422 VALIDATION_FAILED with the key invalidInvoiceReminderRules.

Emailing​

An issued invoice can be emailed to a contact of its client with the PDF attached: send-invoice-email and list-invoice-emails on /v1/workspaces/{workspaceID}/invoices/{invoiceID}/emails. The message shows the due date and payment terms frozen when the invoice was issued, and neither when the invoice has no terms. See Emailing documents.

An issued invoice can be given to the client as a secret link that opens a page on the web app showing the invoice and its PDF, without signing in: create-invoice-share-link, list-invoice-share-links and revoke-invoice-share-link on /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-links. A link stops working when the invoice is voided. See Shared documents for how links are created, expire and are revoked, the public routes, and what the client can see.

Expected income in planning​

Issued invoices that still have a balance show up as expected income in the planning endpoints (get-plan and get-plan-range), in the same income list as paychecks from income schedules. Each invoice gives one entry:

  • source is invoice (schedule for a paycheck), invoiceId is the invoice and occurrenceKey is invoice:<invoiceId>. scheduleId is empty.
  • amount is the invoice's remaining balance (gross total, tax included, less payments), not its total, so a part payment lowers it.
  • expectedDate is the invoice's dueDate; originalDate is always the due date. An overdue invoice is expected on today in the workspace's time zone instead, never on a date in the past, and carries overdue: true so a client can show it as lower confidence. An overdue invoice therefore appears only in the period that contains today.
  • It appears in the period that contains expectedDate. recurrenceType is one_time, projected is true, and skipped and overridden are false: an invoice expectation can't be overridden or skipped (change the invoice's due date or record a payment instead).
  • Drafts, void invoices, fully paid invoices and invoices without a due date give nothing. Personal workspaces have no invoices, so their plans are unchanged.

Like income schedules, this is a forecast. The amounts count toward the plan's plannedIncome and expectedIncome summaries, and never toward budget.availableToAssign or the funding endpoints: money becomes assignable only when the payment is recorded as an income transaction. Reading the plan needs the same scope as before; there is no separate endpoint or scope. Every income entry now also carries source and overdue (schedule and false for paychecks).

Metadata​

An invoice carries your own key/value pairs in a metadata object, always present and {} when empty, for an external ID or any other reference from your own systems. It is internal: it is never printed on a document, snapshot, share link or email. The rules are the same for every record and are described once under Metadata.

  • Limits: at most 50 keys. A key is 1 to 40 characters from A-Z a-z 0-9 _ . -, a value 1 to 500 characters. A request that breaks a limit returns 422 and names the key.
  • Write: metadata is optional on create and on update. On update the pairs are merged per key: a value sets or overwrites the key, null or "" removes it, {} changes nothing, and "metadata": null removes every key. On create, null and "" values are ignored.
  • Issued and void invoices stay metadata-writable: a request that changes only metadata is accepted where INVOICE_NOT_DRAFT would refuse any other change, so you can attach an external ID after issuing. Mixed with another field, it is refused as usual. The issued document does not change.
  • Not copied: invoice lines added from a quote (lines/from-quote), invoices made by billing time and invoices drafted from a recurring schedule start with {}. Set the invoice's own metadata.
  • Filter: list-invoices takes an exact-match filter written metadata[key]=value. Several keys are AND-ed (at most 10), and it combines with the other filters:
GET /v1/workspaces/{workspaceID}/invoices?metadata[external_id]=ABC-123
  • Access: the same scopes, role rules and plan feature as the rest of the record. No new scope.

Plan and downgrades​

Invoices need a plan that includes business tools (Solo Business). Every write, including issuing and voiding, changing a recurring schedule and changing the payment reminder policy, returns 402 PLAN_FEATURE_REQUIRED otherwise. The one exception is revoking a share link, which always works. The server also stops drafting from schedules (see Recurring drafts). Reading stays possible after a downgrade, so existing invoices are never hidden. Invoices have no count limit of their own. While an account is over another plan limit (for example clients) it is read-only (423 plan_limits_exceeded) and invoice changes are refused too.

Backup, export and clone​

  • Invoices, their lines, their payments and recurring schedules are part of workspace backups. A backup that holds invoices can only be restored into a business workspace; restored invoices and lines get new IDs and keep their numbers, statuses, snapshots, amounts, quote line, quote (deposit lines) and task links, and the time entries they bill. The numbering sequences are restored with them, so the next invoice does not reuse a number. A restored schedule keeps its rhythm, template and nextDueDate, and its drafts keep their link to it. Each invoice's metadata is restored and cloned with it, and is a member of the invoice in data.json (always present, {} when empty; an additive field of format version 1).
  • The data export (data.json) has invoices, invoiceLines and invoicePayments arrays, with amounts in the workspace's minor unit and quantities in ten-thousandths, each invoice's computed subtotalMinor, taxTotalMinor and totalMinor, each line's taxRateId, taxName and taxPercentE4 (lineTotalMinor is before tax), the business's taxRates, the snapshots as they were at issue, dueDate, termsSnapshot and dueDateOverriddenAt, and each time entry's invoiceLineId; recurring schedules are in the invoiceSchedules array (template amounts in the workspace's minor unit), and an invoice a schedule drafted has scheduleId and scheduleDate; the archive has invoices.csv (with a dueDate column, and subtotalMinor, taxTotalMinor and totalMinor at the end) and invoice-lines.csv (with taxRateId, taxName and taxPercentE4 at the end) (lines carry their unit and details: raw in data.json, and a unit column and a plain-text details column in the CSV; template lines in invoiceSchedules have a unit and details too). A backup made before line units existed restores its lines as item, except logged-time lines (source time), which restore as hour. A backup made before line details existed restores them as empty.
  • Tax rates and each line's rate travel with backups and clones, including the name and percent an issued line froze. A backup made before tax existed restores with no tax rates and untaxed lines.
  • The stored PDFs are not part of backups, exports or clones. They are derived from the invoice's lines and snapshots, which are, so a restored or cloned invoice renders its PDF again the first time it is asked for. It is the same document.
  • Cloning a business workspace copies its invoices, lines and payments, linked to the clone's own projects, quotes, quote lines, tasks, time and transactions, and keeps each numbering sequence where it stands. Recurring schedules are not cloned, so a clone never starts drafting invoices for the source's clients on its own; the copied invoices keep scheduleDate and have no scheduleId.
  • Payment reminders are not part of backups or clones: the policy, the log of reminders sent and the per-invoice pauses stay with the workspace that made them, so a restored or cloned workspace never emails clients on its own. After a restore or clone, turn reminders on again. The policy is in the data export, as the invoiceReminderSettings array (enabled, offsetDays, note).

Events​

Each change publishes an event in the same transaction: invoice.created, invoice.updated (the invoice or one of its lines changed), invoice.deleted, invoice.issued, invoice.voided and invoice.due_date_changed (the due date of an issued invoice was changed; it holds the dates before and after), and for payments invoice_payment.recorded, invoice_payment.updated, invoice_payment.deleted, invoice_payment.transaction_linked and invoice_payment.transaction_unlinked (also published when a deleted transaction unlinks its payments), and for schedules invoice_schedule.created, invoice_schedule.updated (also for pausing and resuming), invoice_schedule.deleted and invoice_schedule.draft_created (published together with invoice.created when the server makes a draft; it holds the schedule, the invoice and the due date), and for payment reminders invoice_reminder.sent, invoice_reminder.failed (also when there is no recipient), invoice_reminder_settings.updated, invoice_reminders.paused and invoice_reminders.resumed, and invoice_payment.tax_set_aside_confirmed. They hold identifiers and outcomes, never the recipient's address. They carry identifiers, status, number and the transaction link, and, for invoices, metadata, and no text or amounts. The credit note events are credit_note.created, credit_note.updated (the note or one of its lines changed), credit_note.deleted, credit_note.issued and credit_note.voided; they hold the note's id, invoice_id, status and number, no amounts or text (read the invoice for its new balance), and crediting an invoice does not publish invoice.updated. They are public webhook events: subscribe to them (or to invoice.*, invoice_payment.*, invoice_schedule.*, invoice_reminder.*, invoice_reminder_settings.*, invoice_reminders.* and credit_note.*) on a webhook endpoint (see Webhook events), and read them from event history and the event stream. Reading them needs the invoices:read scope in addition to events:read (event history and stream) or webhooks:read (the event catalog). The payment and reminder events are read with invoices:read too.

Errors​

StatusCodeMeaning
402PLAN_FEATURE_REQUIREDThe plan does not include business tools.
404INVOICE_NOT_FOUNDNo such invoice in this workspace.
404INVOICE_LINE_NOT_FOUNDNo such line in this invoice.
404INVOICE_PAYMENT_NOT_FOUNDNo such payment on this invoice.
404INVOICE_SCHEDULE_NOT_FOUNDNo such recurring schedule in this workspace.
404PROJECT_NOT_FOUNDThe projectId isn't a project of this workspace.
404CLIENT_NOT_FOUNDThe clientId isn't a client of this workspace.
404PROJECT_TASK_NOT_FOUNDThe taskId isn't a task of the invoice's project.
404QUOTE_NOT_FOUNDA deposit's quote isn't in this workspace, or belongs to another project (or another client, for a client-only invoice), or has no project yet and the invoice is for a project.
404QUOTE_LINE_NOT_FOUNDA quote line to bill isn't in this workspace, or belongs to another project (or another client, for a client-only invoice), or has no project yet and the invoice is for a project.
404TIME_ENTRY_NOT_FOUNDA time entry to bill isn't in this workspace.
409WORKSPACE_NOT_BUSINESSThe workspace is personal.
409INVOICE_NOT_DRAFTThe invoice has been issued and can't be changed. details.status repeats its status.
409INVOICE_INVALID_TRANSITIONThe invoice's status doesn't allow that action. details.status and details.action repeat them.
409INVOICE_HAS_PAYMENTSThe invoice has payments, so it can't be voided. details.paymentCount says how many.
409INVOICE_HAS_CREDIT_NOTESThe invoice has issued credit notes, so it can't be voided. Void them first.
404CREDIT_NOTE_NOT_FOUNDNo such credit note in this workspace.
404CREDIT_NOTE_LINE_NOT_FOUNDNo such line on this credit note.
409CREDIT_NOTE_NOT_DRAFTThe credit note is issued or void and can't be changed.
409CREDIT_NOTE_INVOICE_NOT_ISSUEDOnly an issued invoice can be credited. details.status repeats the invoice's status.
409CREDIT_NOTE_TRANSITION_INVALIDThe note's status doesn't allow that action. details.status and details.action repeat them.
422CREDIT_NOTE_REASON_REQUIREDA reason is needed to issue the note.
422CREDIT_NOTE_EMPTYThe note has no lines, or its total is not above zero.
422CREDIT_NOTE_PATTERN_SAME_AS_INVOICEThe credit note pattern equals the invoice pattern, so numbers could collide. Change one in the business profile.
422CREDIT_EXCEEDS_LINEA line credits more than is left on its invoice line.
422CREDIT_EXCEEDS_INVOICEThe issued notes would credit more than the invoice's total.
422CREDIT_EXCEEDS_TAX_GROUPThe note would credit more tax of a rate than the invoice charged.
422CREDIT_TAX_RATE_INVALIDA free-form line's taxRateId is not a rate the invoice charged, or no single rate can be assumed.
409INVOICE_DEPOSIT_APPLIEDOther invoices apply the deposit this invoice bills, so it can't be voided. details.quoteId and details.applied say which and how much.
409INVOICE_SCHEDULE_EXISTSThe project already has a recurring schedule (a client can have several client-only ones). details.scheduleId names it.
409INVOICE_NOT_PAYABLEOnly an issued invoice takes payments. details.status repeats its status.
409TAX_SET_ASIDE_PAYMENT_NOT_IN_BUDGETThe payment has no income transaction, so there is no money in the budget to set aside.
409TAX_SET_ASIDE_ALREADY_CONFIRMEDMoney was already set aside for the payment (or the set-aside was reversed).
409INSUFFICIENT_ASSIGNABLE_FUNDSReady to Assign can't cover the set-aside.
422TAX_SET_ASIDE_NOT_CONFIGUREDThe business profile (or the client) has no percentage, or the profile has no usable category.
422TAX_SET_ASIDE_AMOUNT_INVALIDamountMinor is zero, negative or more than the payment.
409TRANSACTION_HAS_INVOICE_PAYMENTSA transaction change (a lower amount, converting to a transfer) would leave its linked payments without enough behind them. details.allocated and details.paymentCount say what rests on it.
409QUOTE_NOT_BILLABLEThe quote isn't accepted. details.quoteId and details.status name it.
409TIME_ENTRY_BILLEDThe time is billed on an invoice. details.timeEntryId names the entry and details.invoiceId the invoice.
409TIME_ENTRY_WRITTEN_OFFThe time was written off. Restore it before billing it. details.timeEntryId and details.invoiceId name them.
409PROJECT_ARCHIVEDThe project is archived, so its invoices are read-only.
409INVOICE_CLIENT_ARCHIVEDThe client of a client-only invoice is archived, so its drafts can't be created or changed.
409DOCUMENT_NUMBER_CONFLICTThe next number is already used.
422invalidPaymentTermsKind, invalidPaymentTermsDays, invalidPaymentTermsDeposit, invalidPaymentTermsTextThe invoice's terms break the rules in Payment terms.
422invalidInvoiceScheduleThe frequency isn't one of those listed, a date isn't a calendar date, startDate is in the past, endDate is before startDate, or the lines are missing, more than 50 or blank.
422invalidInvoiceLineA schedule line has a quantity of zero or above 1,000,000 units, a negative or too large price, or a discount outside 0% to 100%.
422invalidInvoiceDueDateA dueDate is not a calendar date (YYYY-MM-DD), or is earlier than the issue date (today, for a draft).
422PAYMENT_EXCEEDS_BALANCEThe payment is more than the invoice still owes. details.balance says how much.
422PAYMENT_TRANSACTION_NOT_INCOMEOnly an income transaction can carry a payment. details.transactionId and details.kind name it.
422PAYMENT_TRANSACTION_OVER_ALLOCATEDThe payments on the transaction would add up to more than it. details.available says how much is free.
404TAX_RATE_NOT_FOUNDA taxRateId isn't a tax rate of this workspace.
422TAX_RATE_ARCHIVEDA line's taxRateId names an archived rate, or the invoice is being issued with a taxed line on one.
422DEPOSIT_TAX_RATE_REQUIREDThe quote's lines have different rates (or mix taxed and untaxed lines), so add-invoice-deposit needs a taxRateId, or "" for no tax.
422DEPOSIT_EXCEEDS_QUOTEThe deposits on the quote's invoices would add up to more than its subtotal (before tax). details.quoteId and details.available say how much is left.
422NO_DEPOSIT_TO_APPLYThe quote has no billed deposit left to apply. details.quoteId names it.
422DEPOSIT_EXCEEDS_AVAILABLEThe amount is more than the deposit left to apply. details.quoteId and details.available say how much.
500DOCUMENT_RENDER_FAILEDThe PDF could not be created. The invoice is unchanged; ask again.
422INVOICE_EMPTYAn invoice needs at least one line before it is issued.
422INVOICE_TOTAL_NOT_POSITIVEThe invoice total, tax included, must be above zero to issue it.
422INVOICE_NUMBERING_CODE_MISSINGThe pattern uses {PROJECT} and the project has no code, or the invoice is client-only and has no project.
422INVOICE_HAS_NO_PROJECTThe invoice is client-only, so it can't bill logged time or link a line to a project task. It can bill quote lines and deposits of its own client's accepted quotes.
422INVOICE_CLIENT_MISMATCHThe clientId isn't the client of the projectId. Leave the client out, or use the project's client.
422TIME_ENTRY_NOT_BILLABLEThe time isn't billable, has no hourly rate, or belongs to another project. details.timeEntryId and details.reason say which and why.
422DOCUMENT_NUMBER_PATTERN_INVALIDThe pattern in force no longer passes the numbering grammar.
422DOCUMENT_ISSUE_DATE_OUT_OF_ORDERThe sequence has already issued an invoice dated later than today in the workspace time zone.