AlphaCount Developers
API referenceInvoices

Cancel an invoice (Stornorechnung)

POST
/invoices/{invoice_id}/cancel

An issued invoice cannot be changed. It is cancelled by a cancellation invoice (Stornorechnung) with negative amounts, which this answers with 201. An invoice cancelled already answers 200 with the cancellation invoice that cancelled it. Scope partner:invoices:write.

Authorization

apiKey partner:invoices:write
headerAuthorizationBearer <ab_…>

An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.

Scope: partner:invoices:write

Path Parameters

invoice_id*Invoice Id

Header Parameters

AlphaCount-Version?string

The API version to use. Default: the current one.

Response Body

OK

application/json
  1. response
amount_paid*Amount Paid
cancelled_by*|null
cancels_invoice*|null
contract_external_ref*|

The contract that billed it, if any.

currency*Currency
customer_external_ref*string|null
due_date*|null
dunning_level*|

Highest dunning level sent (0 = payment reminder).

external_ref*string|null
external_source*string|null
id*Id
issue_date*|null
number*|

Invoice number; null while a draft.

overdue*Overdue
paid_at*|

Paid in full, UTC.

sent_at*|

First mail, UTC.

service_period*
status*Status
Value in"draft""issued""sent""partially_paid""paid""cancelled"
total_gross*Total Gross
total_net*Total Net
total_tax*Total Tax
type*Type

A cancellation invoice (Stornorechnung) is type storno with negative amounts.

Value in"invoice""storno"
Example Request
curl -X POST 'https://app.alphacount.ai/api/partner/v1/invoices/string/cancel' \  -H 'Authorization: Bearer ab_...'
Example Response
{  "amount_paid": "0.00",  "cancelled_by": null,  "cancels_invoice": {    "external_ref": "order-2",    "id": "00000000-0000-4000-8000-000000000002",    "number": "RE-2026-0001"  },  "contract_external_ref": null,  "currency": "EUR",  "customer_external_ref": "org-17",  "due_date": "2026-10-19",  "dunning_level": null,  "external_ref": null,  "external_source": null,  "id": "00000000-0000-4000-8000-000000000001",  "issue_date": "2026-10-19",  "number": "ST-2026-0001",  "overdue": false,  "paid_at": null,  "sent_at": null,  "service_period": {    "end": "2026-10-31",    "start": "2026-10-01"  },  "status": "issued",  "total_gross": "-119.00",  "total_net": "-100.00",  "total_tax": "-19.00",  "type": "storno"}