Skip to content

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

GET /api/v2/billing/credit-line
curl "https://cloud.hostup.se/api/v2/billing/credit-line" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The account’s invoice credit line.

Response 200
{
"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
availableboolean
true 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 null
Why the line is not available. null when available is true.
reasonCodestring or null
no_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.
statusstring
active, frozen (an invoice is overdue), exhausted (unpaid invoices exceed the limit) or none (no credit line). One of active, frozen, exhausted, none.
tierstring or null
How the limit was set. earned 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 null
Credit limit in major units of currencyCode, VAT included. null without a line.
usedAmountnumber
Sum of the account’s unpaid invoices. 0 without a line.
availableAmountnumber
limitAmount minus usedAmount, never below 0. 0 while the line is frozen.
currencyCodestring
Always SEK. One of SEK.
unpaidInvoiceCountinteger
Number of unpaid invoices on the account. 0 without a line.
coveredOrderKindsarray of string
Order kinds carried out before payment. Empty without a line.
evaluatedAtstring
When the line was evaluated.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
503The credit line could not be read right now. Try again shortly.