Get invoice credit line
GET /api/v2/billing/credit-line
Returns the account’s invoice credit line. With an available line, domain registrations and transfers are carried out before their invoice is paid. A Swedish organisation earns a line by paying several invoices by bank transfer from its own account. Card and Swish payments do not count. The limit is measured against all unpaid invoices on the account. An invoice more than seven days overdue freezes the line until it is paid. Accounts without a line return status: "none". The line covers orders placed in the client area only. Orders placed with an API key always wait for payment.
Authentication: An API key with the scope read:billing. About keys and scopes
Example
curl "https://cloud.hostup.se/api/v2/billing/credit-line" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The account’s invoice credit line.
{ "available": true, "reason": null, "reasonCode": null, "status": "active", "tier": "established", "limitAmount": 10000, "usedAmount": 2866.25, "availableAmount": 7133.75, "currencyCode": "SEK", "unpaidInvoiceCount": 11, "coveredOrderKinds": [ "domain_registration", "domain_transfer" ], "evaluatedAt": "2026-09-18T10:00:00.000Z"}Response fields
availablebooleantrue when the line can carry out a domain registration or transfer ordered in the client area before its invoice is paid. The order’s own invoice counts toward the limit.reasonstring or nullnull when available is true.reasonCodestring or nullno_credit_line, overdue_invoice (an invoice is more than seven days overdue) or limit_exceeded (unpaid invoices exceed the limit). null when available. One of no_credit_line, overdue_invoice, limit_exceeded.statusstringactive, frozen (an invoice is overdue), exhausted (unpaid invoices exceed the limit) or none (no credit line). One of active, frozen, exhausted, none.tierstring or nullearned and established come from invoices paid by bank transfer. custom is a limit agreed with Hostup. null without a line. One of earned, established, custom.limitAmountnumber or nullcurrencyCode, VAT included. null without a line.usedAmountnumberavailableAmountnumberlimitAmount minus usedAmount, never below 0. 0 while the line is frozen.currencyCodestringSEK. One of SEK.unpaidInvoiceCountintegercoveredOrderKindsarray of stringevaluatedAtstringErrors
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. |
| 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. |
| 503 | The credit line could not be read right now. Try again shortly. |