Cancel a pending or otherwise cancellable order. Use the write:orders scope for least-privilege API keys; broader billing/service write scopes remain compatible. Get {id} from POST /api/v2/orders id, GET /api/v2/orders/{id} id, GET /api/v2/billing/invoices/{id} orderId, GET /api/v2/domains/{id}…
Cancel a pending or otherwise cancellable order. Use the write:orders scope for least-privilege API keys; broader billing/service write scopes remain compatible. Get {id} from POST /api/v2/orders id, GET /api/v2/orders/{id} id, GET /api/v2/billing/invoices/{id} orderId, GET /api/v2/domains/{id} pendingRenewalOrder.id, or GET /api/v2/domains/{id}/renewal orderId. For a domain renewal invoice whose actions.canCancel.reason says to cancel the related order first, call this endpoint with the invoice orderId; the related invoice is cancelled as part of the order cancellation when the upstream accepts it. Do not send a business body; the route accepts no fields and rejects unknown keys.
write:orders
Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.
id string required
Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m3 Public order ID from order creation, order detail, invoice `orderId`, or domain pending-renewal order fields. Do not invent this value; use the exact ID returned by the referenced API response.
Accept Example Content-Type Example id string
· Example: ord_01hxa3b4c5d6e7f8g9h0j1k2m3 number string
· Example: O-HXA3B4C5 status string · enum
· Example: pending pending active completed cancelled failed type string · enum
· Example: new new renew upgrade transfer invoiceId stringnull
· Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m3 checkoutUrl stringnull
· Example: https://cloud.hostup.se/billing?invoice=202600001 Compatibility alias used by older clients. New integrations should read `invoice.paymentUrl` when `invoice` is present.
client object client.id stringnull
· Example: null client.firstName stringnull
· Example: Anna client.lastName stringnull
· Example: Svensson client.companyName stringnull
· Example: null billing object billing.amount number required
· Example: 199 billing.currencyCode string required
· Example: SEK billing.billingCycle stringnull · enum required
· Example: annually Canonical billing cycle. VPS services with `isPayg: true` still report `monthly` for summary display; use `isPayg` to distinguish PAYG Cloud VPS from fixed-cycle VPS.
monthly quarterly semiannually annually biennially triennially free billing.isPayg boolean required
· Example: false For VPS service/order billing, true means pay-as-you-go Cloud VPS and false means fixed-cycle/prepaid VPS. Non-VPS resources normally return false.
billing.periodYears integernull
· Example: 1 invoice object | null invoice.id string required
· Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m3 invoice.number stringnull required
· Example: 202600001 invoice.amount number required
· Example: 159 invoice.currencyCode string required
· Example: SEK invoice.dueAt stringnull required
· Example: 2026-05-11T23:59:59.000Z invoice.status string · enum required
· Example: unpaid paid unpaid partially_paid draft cancelled refunded invoice.paymentUrl stringnull required
· Example: /billing?invoice=202600001 invoice.totals object required invoice.dates object required paymentStatus object paymentStatus.status string · enum
· Example: unpaid paid unpaid credit_note pending unknown paymentStatus.reason stringnull
· Example: Invoice is unpaid. actions object actions.canRetry object actions.canRetry.allowed boolean required
· Example: true actions.canRetry.reason stringnull required
· Example: null actions.canRetry.code stringnull
· Example: pending_order Machine-readable reason code when an action is blocked.
actions.canCancel object actions.canCancel.allowed boolean required
· Example: true actions.canCancel.reason stringnull required
· Example: null actions.canCancel.code stringnull
· Example: pending_order Machine-readable reason code when an action is blocked.
domains array<object> hosting array<object> addons array<object> upgrades array<object> invoiceLookupPending boolean
· Example: false createdAt stringnull contractAcceptedAt stringnull
· Example: null notes stringnull
· Example: null referenceNumber stringnull
· Example: null type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object https://cloud.hostup.se/api/v2/orders/{id}/actions/cancel curl -X POST "https://cloud.hostup.se/api/v2/orders/ord_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" {
"id": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
"number": "2016143001",
"invoiceId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
"status": "cancelled",
"type": "renew",
"client": {
"id": "client_01hxa3b4c5d6e7f8g9h0j1k2m3",
"email": null,
"firstName": "Anna",
"lastName": "Svensson",
"companyName": "Example AB"
},
"billing": {
"amount": 159,
"currencyCode": "SEK",
"billingCycle": null,
"isPayg": false
},
"invoice": {
"id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
"number": "202600001",
"amount": 159,
"currencyCode": "SEK",
"dueAt": "2026-05-11T23:59:59.000Z",
"status": "cancelled",
"paymentUrl": "/billing?invoice=202600001",
"totals": {
"currencyCode": "SEK",
"total": 159,
"amountPaid": 0,
"outstanding": 159
},
"dates": {
"dueAt": "2026-05-11T23:59:59.000Z"
}
},
"paymentStatus": {
"status": "credit_note",
"reason": "Invoice has been cancelled."
},
"actions": {
"canRetry": {
"allowed": false,
"reason": "Order is cancelled."
},
"canCancel": {
"allowed": false,
"reason": "Order is already cancelled."
}
},
"invoiceLookupPending": false,
"domains": [
{
"name": "example.com",
"tld": "com",
"amount": 159,
"currencyCode": "SEK"
}
],
"hosting": [],
"addons": [],
"upgrades": [],
"createdAt": "2026-04-27T12:00:00.000Z",
"contractAcceptedAt": null,
"notes": "Customer requested cancellation before payment.",
"referenceNumber": null
}