Get a VPS cost breakdown
GET /api/v2/vps/{id}/billing-breakdown
Get what one VPS costs, split into its parts. A VPS with a fixed billing period returns kind: "fixed": the plan price and each paid add-on, such as extra bandwidth, storage or IP addresses. Every amount is for one billingCycle. A Cloud VPS returns kind: "payg_estimate": an estimate for the current calendar month (UTC) as if the server runs every hour. It has one line each for CPU, RAM, disk and additional IPv4 addresses. One public IPv4 address is included. The ipv4 line counts only the extra ones. The estimate is not what has been charged. GET /api/v2/billing/metered-usage has the charges so far for the whole account. When no price is known yet, the response is available: false with a reason.
Authentication: An API key with the scope read:billing. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/billing-breakdown" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Cost breakdown. kind tells a fixed plan from a Cloud VPS estimate. available: false when no price is known.
{ "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}{ "available": true, "kind": "payg_estimate", "estimate": { "basis": "max_24_7", "currencyCode": "SEK", "estimatedMonthlyAmount": 44.64, "period": { "startAt": "2026-06-01T00:00:00.000Z", "endAt": "2026-07-01T00:00:00.000Z" }, "lineItems": [ { "type": "cpu", "label": "CPU", "ratePerCoreHour": 0.015, "quantity": 2, "estimatedAmount": 21.6 }, { "type": "memory", "label": "RAM", "ratePerGbHour": 0.004, "quantity": 4, "estimatedAmount": 11.52 }, { "type": "storage", "label": "Disk", "ratePerGbHour": 0.0002, "quantity": 80, "estimatedAmount": 11.52 }, { "type": "ipv4", "label": "Additional IPv4", "ratePerHour": 0.03, "quantity": 0, "estimatedAmount": 0 } ] }, "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."}{ "available": false, "reason": "No pricing information is available for this service yet."}Response fields
availablebooleantrue.kindstringfixed for a VPS with a billing period. One of fixed.currencyCodestringbillingCyclestringmonthly or annually.baseobjectproductNamestring or nullamountnumberaddonsarray of objectnamestringcategorystring or nullbandwidth or storage.unitstring or nullTB or GB.includedQuantitynumbercurrentQuantitynumberunitPricenumberamountnumberaddonsAmountnumbertotalAmountnumberErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |