/api/v2/orders/{id}/actions/cancel 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.code is cancel_related_order_first, call this endpoint with the invoice orderId; the related invoice is cancelled together with the order when cancellation succeeds.
Do not send a business body; the route accepts no fields and rejects unknown keys.
write:orders
Authenticate with an API key in the Authorization: Bearer <token> header.
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.
Authorization Bearer <token> Accept application/json 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 string · nullable
· Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m3 checkoutUrl string · nullable
· 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 string · nullable
· Example: null Nullable: may be null when not applicable.
client.email string · nullable
· Example: user@example.com Nullable: may be null when not applicable.
client.firstName string · nullable
· Example: Anna Nullable: may be null when not applicable.
client.lastName string · nullable
· Example: Svensson Nullable: may be null when not applicable.
client.companyName string · nullable
· Example: null Nullable: may be null when not applicable.
billing object billing.amount number · nullable required
· Example: 199 Recurring fixed-cycle amount in the resource currency. Null when no fixed recurring amount applies, such as PAYG Cloud VPS billing.
billing.currencyCode string required
· Example: SEK billing.billingCycle string · nullable · 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 integer · nullable
· Example: 1 Nullable: may be null when not applicable.
invoice object | null invoice.id string required
· Example: inv_01hxa3b4c5d6e7f8g9h0j1k2m3 invoice.number string · nullable required
· Example: 202600001 Nullable: may be null when not applicable.
invoice.amount number required
· Example: 159 invoice.currencyCode string required
· Example: SEK invoice.dueAt string · nullable required
· Example: 2026-05-11T23:59:59.000Z Nullable: may be null when not applicable.
invoice.status string · enum required
· Example: unpaid paid unpaid partially_paid draft cancelled refunded invoice.paymentUrl string · nullable required
· Example: /billing?invoice=202600001 Nullable: may be null when not applicable.
invoice.totals object required invoice.dates object required paymentStatus object paymentStatus.status string · enum
· Example: unpaid paid unpaid credit_note pending unknown paymentStatus.reason string · nullable
· Example: Invoice is unpaid. Nullable: may be null when not applicable.
actions object actions.canRetry object actions.canRetry.allowed boolean required
· Example: true actions.canRetry.reason string · nullable required
· Example: null Nullable: may be null when not applicable.
actions.canRetry.code string · nullable
· Example: pending_order Machine-readable reason code when an action is blocked.
actions.canCancel object actions.canCancel.allowed boolean required actions.canCancel.reason string · nullable required Nullable: may be null when not applicable.
domains array<object> hosting array<object> addons array<object> upgrades array<object> invoiceLookupPending boolean
· Example: false restoreIntents object Present when a regular VPS order should restore an existing backup after provisioning. dispatchDeferred: true means the durable restore intent was stored and will be retried from the account-created webhook.
restoreIntents.requested integer
· Example: 1 restoreIntents.created integer
· Example: 1 restoreIntents.queued integer
· Example: 1 restoreIntents.skipped integer
· Example: 0 restoreIntents.dispatchDeferred boolean
· Example: false createdAt string · nullable contractAcceptedAt string · nullable
· Example: null notes string · nullable
· Example: null referenceNumber string · nullable
· 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 code for the route-specific blocker and recovery fields. 10 fields 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 Retry-After seconds plus X-RateLimit-* headers. 10 fields 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 code is upstream_failed when invoice details could not be verified or the cancellation request failed; retry later or contact support if the issue persists. 10 fields 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
}