Cancel an order and its invoice

Cancel a specific order and its related invoice. This is useful if a customer regrets a purchase before it has been fully processed. The endpoint returns an order_id that you use to call POST /api/account/activate-order.

Billing & Payments Orders

Context

Used in the dashboard

/billing

Workflow links

Produces

Path Parameters

id integer · min: 1 required Example: 34026

Unique id identifier

Headers

Accept Example
Content-Type Example

Responses

200
data object required
data.message string required · Example: Order and related invoice have been cancelled

Human-readable message.

data.order_id string required · Example: 34026
requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

400

No response body

503
code string required · Example: SERVICE_UNAVAILABLE

Machine-readable error code.

error string required · Example: Service Unavailable

HTTP status title (e.g. 'Bad Request').

message string required · Example: Failed to cancel order

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/billing/order/{id}/cancel
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/billing/order/34026/cancel" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "message": "Order and related invoice have been cancelled",
    "order_id": "34026"
  }
}