Cancel an invoice

POST https://api.tamio.com/v2/invoices/cancel/{uuid}

Cancels an unpaid invoice, preventing further payment attempts. Optionally cancel specific products within the invoice. Canceled invoices cannot be uncanceled but can be recreated as new invoices.

Path Parameters

uuid string*

UUID of the unpaid invoice to cancel

Body Parameters

products array of object

Specific products to cancel (entire invoice if omitted)

Responses

200 Invoice cancelled successfully

Invoice cancelled successfully

status integer
invoice Invoice
400 Bad request. Possible `error_code` values:
401 Missing or invalid API key
/invoices/cancel/{uuid}
1const response = await fetch("https://api.tamio.com/v2/invoices/cancel/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "invoice": {
    "id": "string",
    "object": "invoice",
    "currency": "EUR",
    "paid": false,
    "processing_payment": false,
    "prefix": "INV-",
    "number": 1001,
    "total": 5000,
    "payment": "stripe_creditcard",
    "date": 1700000000,
    "status": "paid",
    "subscription": "string",
    "locale": "en",
    "payment_retried": false,
    "payment_charge_date": 0,
    "3d_secure_failure": false,
    "authorization_expiry": 0,
    "affiliate_program": "string",
    "affiliate": "string",
    "late_failure": false,
    "has_subscriptions": false,
    "is_instalment": false,
    "fortnox_submitted": false,
    "start_date": 0,
    "end_date": 0,
    "has_notes": false,
    "customer_information": {},
    "products": [],
    "shipping": {},
    "totals": {}
  }
}