Skip to content

Mark a paid invoice as unpaid, or clear an amount recorded as paid

POST
/invoices/{id}/mark-unpaid
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/invoices/example/mark-unpaid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "clearAmountPaid": true }'

Reopens an invoice that was marked paid with no payment recorded, including one recorded as paid in another system: the invoice goes back to OVERDUE, VIEWED or SENT, loses its paid date, and the commissions its payment approved wait for approval again. An invoice paid in full is cleared to nothing paid. One paid only in part keeps its amount by default: it counts as received on the day it was recorded as paid and the rest stays due. The optional body’s clearAmountPaid: true clears that amount too, for one no payment backs, which cannot be corrected anywhere else on an invoice issued here; it also works on an invoice that is already open (SENT, VIEWED or OVERDUE) with an amount recorded as paid and no payment, where it clears the amount and changes nothing else, and it needs the payments.manage permission as well. A request with no body works as before. Only for an invoice with no recorded payment that renews no subscription, started no portal purchase, added no hours to an order and fulfilled no order form purchase; an invoice with a recorded payment is corrected by voiding the payment with POST /payments/{id}/void, which reopens the invoice, and a card payment is refunded in Stripe. Requires the invoices.manage permission.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
clearAmountPaid

Send true to also clear the amount recorded as paid on an invoice that was marked paid with only part of its total. Without it that amount stays on the invoice, counts as received on the day it was recorded as paid, and only the rest stays due. An invoice paid in full is always cleared to nothing paid, with or without this. It also works on an open invoice (SENT, VIEWED or OVERDUE) that has an amount recorded as paid and no payment: the amount is cleared and nothing else changes. Needs the payments.manage permission as well. An invoice with a recorded payment is corrected by voiding the payment instead. Use it when the amount is wrong and no payment backs it: it cannot be corrected anywhere else on an invoice issued here.

boolean

Example generated

{
"clearAmountPaid": true
}

The invoice, reopened or with its recorded amount cleared.

Media typeapplication/json
object
data
required

An invoice. Monetary amounts are numbers; dates are ISO 8601 strings.

object
amountPaid
required
number
clientId
required
string
commissionDurationMonths
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
commissionDurationRule
required

Commission duration rule: ALWAYS, NEVER or FIRST_N_MONTHS.

string
contactId
required

The user of the invoice’s company it is addressed to (a contact id from GET /clients/{id}/contacts); it prints above the company’s name. Null addresses nobody.

string | null
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
currency
required

ISO 4217 currency code.

string
discount
required

Discount percentage (0-100); null when no discount applies.

number | null
discountAmount
required
number
documentUrl
required

Link to the document the originating system produced.

string | null
dueDate
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
estimateId
required

Source estimate when the invoice was converted from one.

string | null
externalNumber
required

The number the originating system gave it. For an EXTERNAL invoice this is also its number; null for SYSTEM.

string | null
externalSource
required

Which system issued an EXTERNAL invoice, e.g. SPP or QuickBooks. Null for SYSTEM.

string | null
id
required
string
importedFrom
required

The import source (e.g. SPP) that wrote this invoice as one of the workspace’s own. Null for an invoice issued in Chelsea. An imported invoice keeps the notes it was sent with: the workspace’s note on every invoice is not printed on it.

string | null
isRecurring
required

True when the invoice bills a cycle of a client subscription (it has a subscriptionId).

boolean
issueDate
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
notes
required
string | null
number
required
string
orderId
required

The order this invoice sells or renews, when it has one.

string | null
orderPendingAt
required

When the invoice was created with its order To be confirmed; null once someone added it to an order, opened one from it or marked it No order, and for every invoice that never waited.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
origin
required

SYSTEM for an invoice this workspace issued, EXTERNAL for one issued elsewhere and recorded here. An EXTERNAL invoice is never emailed, rendered to PDF, charged, published or made recurring.

string
paidAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
paymentRemindersPaused
required

Whether payment reminders are paused for this invoice alone. A paused company pauses all of its invoices regardless of this flag.

boolean
paymentRemindersPausedAt
required

When this invoice’s payment reminders were paused; null while they are not.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
periodEnd
required

End of the service period, inside its last day; an end exactly at a workspace midnight means the period ended the day before. See periodStart.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
periodStart
required

Start of the invoice’s own service period, the one accounting books: the subscription cycle or what a member set for a SYSTEM invoice, the order’s billing period orderId paid for on an EXTERNAL one. Workspace midnight of its first day.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
poNumber
required
string | null
sentAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
status
required

Invoice status: DRAFT, SENT, VIEWED, OVERDUE, PAID or CANCELLED.

string
subject
required
string | null
subtotal
required
number
taxAmount
required
number
taxRate
required

Tax rate as a percentage (0-100); null when the invoice has no tax rate.

number | null
total
required
number
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/

Example generated

{
"data": {
"amountPaid": 1,
"clientId": "example",
"commissionDurationMonths": 1,
"commissionDurationRule": "example",
"contactId": "example",
"createdAt": "2026-04-15T12:00:00Z",
"currency": "example",
"discount": 1,
"discountAmount": 1,
"documentUrl": "example",
"dueDate": "2026-04-15T12:00:00Z",
"estimateId": "example",
"externalNumber": "example",
"externalSource": "example",
"id": "example",
"importedFrom": "example",
"isRecurring": true,
"issueDate": "2026-04-15T12:00:00Z",
"notes": "example",
"number": "example",
"orderId": "example",
"orderPendingAt": "2026-04-15T12:00:00Z",
"origin": "example",
"paidAt": "2026-04-15T12:00:00Z",
"paymentRemindersPaused": true,
"paymentRemindersPausedAt": "2026-04-15T12:00:00Z",
"periodEnd": "2026-04-15T12:00:00Z",
"periodStart": "2026-04-15T12:00:00Z",
"poNumber": "example",
"sentAt": "2026-04-15T12:00:00Z",
"status": "example",
"subject": "example",
"subtotal": 1,
"taxAmount": 1,
"taxRate": 1,
"total": 1,
"updatedAt": "2026-04-15T12:00:00Z"
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

The invoice is not PAID (and the request does not clear the amount of an open invoice that has one), has a recorded payment, renews a subscription, started a portal purchase, added hours to an order, fulfilled an order form purchase or has a commission already paid out.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.