Get VPS billing breakdown

GET /api/v2/vps/{id}/billing-breakdown

Return a billing breakdown for one VPS.

Get {id} from GET /api/v2/vps data[].id.

Pay-as-you-go Cloud VPS (billing.isPayg: true) return kind: "payg_estimate" — a max-24/7 monthly estimate with CPU, RAM, disk, and IPv4 line items (no account-level actuals; use GET /api/v2/billing/metered-usage for current-period PAYG charges).

Fixed-cycle VPS return kind: "fixed" — the base plan price plus each paid add-on (extra bandwidth, storage, IPs).

Every fixed amount is for the top-level billingCycle; monthly and annual duplicates are not emitted.

Cloud VPS Cloud VPS

Authentication

Required API scope: read:billing

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Path Parameters

id string required Example: vps_01hxa3b4c5d6e7f8g9h0j1k2m3

Public VPS ID. Get it from GET /api/v2/vps data[].id. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Authorization Bearer <token>
Accept application/json

Responses

200 Billing breakdown (kind discriminates PAYG estimate vs. fixed base+addons), or an unavailable response when no pricing information exists.
Variant 1
available boolean · enum required · Example: true
true
kind string · enum required · Example: payg_estimate
payg_estimate
estimate object required
estimate.basis string · enum required · Example: max_24_7
max_24_7
estimate.currencyCode string required · Example: SEK
estimate.estimatedMonthlyAmount number required · Example: 223.2
estimate.period object required
estimate.period.startAt string required · Example: 2026-06-01T00:00:00.000Z
estimate.period.endAt string required · Example: 2026-07-01T00:00:00.000Z
estimate.lineItems array<object> required
estimate.lineItems[].type string · enum required · Example: cpu
cpu
memory
storage
ipv4
estimate.lineItems[].label string required · Example: CPU
estimate.lineItems[].quantity number required · Example: 2
estimate.lineItems[].ratePerCoreHour number · Example: 0.015
estimate.lineItems[].ratePerGbHour number · Example: 0.004
estimate.lineItems[].ratePerHour number · Example: 0.015
estimate.lineItems[].estimatedAmount number required · Example: 21.6
actualsAvailable boolean · enum required · Example: false
actualsNote string required · Example: Pay-as-you-go usage is billed at the account level. See /api/v2/billing/metered-usage f...
Variant 2
available boolean · enum required · Example: true
true
kind string · enum required · Example: fixed
fixed
currencyCode string required · Example: SEK
billingCycle string required · Example: monthly
base object required
base.productName string · nullable required · Example: VPS XS

Nullable: may be null when not applicable.

base.amount number required · Example: 39
addons array<object> required
addons[].name string required · Example: Extra bandwidth
addons[].category string · nullable required · Example: bandwidth

Nullable: may be null when not applicable.

addons[].unit string · nullable required · Example: TB

Nullable: may be null when not applicable.

addons[].includedQuantity number required · Example: 2
addons[].currentQuantity number required · Example: 20
addons[].unitPrice number required · Example: 5
addons[].amount number required · Example: 90
addonsAmount number required · Example: 90
totalAmount number required · Example: 129
Variant 3
available boolean · enum required · Example: false
reason string required · Example: No pricing information is available for this service yet.
400 Invalid request. The response body is an RFC 7807 Problem Details document.
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
401 Unauthorized. Authentication is required.
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
403 Forbidden. The caller lacks a required scope or does not own the resource.
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
404 Not found. The resource does not exist or is not owned by the caller.
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
429 Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
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
500 Internal error. Retry later or contact support if the issue persists.
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
GET https://cloud.hostup.se/api/v2/vps/{id}/billing-breakdown
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/billing-breakdown" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
// Variant 1
{
  "available": true,
  "kind": "payg_estimate",
  "estimate": {
    "basis": "max_24_7",
    "currencyCode": "SEK",
    "estimatedMonthlyAmount": 223.2,
    "period": {
      "startAt": "2026-06-01T00:00:00.000Z",
      "endAt": "2026-07-01T00:00:00.000Z"
    },
    "lineItems": [
      {
        "type": "cpu",
        "label": "CPU",
        "quantity": 2,
        "ratePerCoreHour": 0.015,
        "ratePerGbHour": 0.004,
        "ratePerHour": 0.015,
        "estimatedAmount": 21.6
      }
    ]
  },
  "actualsAvailable": false,
  "actualsNote": "Pay-as-you-go usage is billed at the account level. See /api/v2/billing/metered-usage for current-period charges across all PAYG services."
}

// Variant 2
{
  "available": true,
  "kind": "fixed",
  "currencyCode": "SEK",
  "billingCycle": "monthly",
  "base": {
    "productName": "VPS XS",
    "amount": 39
  },
  "addons": [
    {
      "name": "Extra bandwidth",
      "category": "bandwidth",
      "unit": "TB",
      "includedQuantity": 2,
      "currentQuantity": 20,
      "unitPrice": 5,
      "amount": 90
    }
  ],
  "addonsAmount": 90,
  "totalAmount": 129
}

// Variant 3
{
  "available": false,
  "reason": "No pricing information is available for this service yet."
}