Skip to content

API reference

Get billing

billing.GetBillingReadAPI key

Read the workspace's plan, credit balance and available billing actions.

POST/v1/operations/billing.GetBilling
On this page

Access & visibility

Allow billing.GetBilling on your API key.

Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.

Set up authentication · Choose permissions

Request

No parameters. Send an empty JSON object ({}).

Balance, charges and underlying usage

Get billing returns the current workspace balance. List credit ledger returns recent balance movements, newest first: a negative amount deducts credit; a positive amount adds it. The default is 50 rows and the maximum is 500, with no cursor for older pages.

For spending over a period, use List usage. Its from and to values are inclusive Unix millisecond timestamps. Use totals.spent_nok for charged credit: it comes from the credit ledger. The items describe individual credit charges and their activities. Use totals for period spending: item detail can be incomplete. Credit figures are in Norwegian kroner, not minor currency units.

Some plans hide credit information. An authorized member can still receive credit_info_hidden on those plans; changing the key's grants does not expose it. Storage usage is a separate byte quota, not a currency balance.

Response

Returns 200 OK with a JSON body.

billingBillingRequired

Current plan, payment availability and credit balance.

Billing
planstringRequired

Current workspace subscription plan.

Allowed: "trial", "free", "start", "team", "enterprise", "legacy", "invoiced".

balance_noknumberRequired

Available credit in Norwegian kroner, not øre.

monthly_credit_noknumberRequired

Credit included each month, in Norwegian kroner.

last_refill_atnull or numberRequired

Time credits were most recently refilled, in Unix milliseconds.

next_refill_atnull or numberRequired

Next scheduled credit refill, in Unix milliseconds.

trial_ends_atnull or numberRequired

Trial expiry time, in Unix milliseconds.

has_payment_methodbooleanRequired

Whether a payment method is configured for the workspace.

Allowed: false, true.

created_atnumberRequired

Creation time in Unix milliseconds.

updated_atnumberRequired

Last update time in Unix milliseconds.

online_payments_availablebooleanRequired

Whether this workspace can use Brigg's online payment flow.

Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.

HTTP status Code What to do
400 invalid_json Send a JSON object with Content-Type: application/json.
400 invalid_input Check the request fields and types.
401 invalid_key The workspace API key is missing, invalid or revoked.
403 forbidden Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member.
404 not_found The requested operation or resource is not available to this credential.
429 rate_limited Wait for Retry-After before retrying.
403 credit_info_hidden This workspace plan does not expose credit and usage details.

Next steps

Download OpenAPI · Versioning & retirement

JSON schemas

Use the complete schemas for validation or client generation.

Full request JSON schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false,
  "examples": [
    {}
  ]
}
Full response JSON schema
{
  "type": "object",
  "properties": {
    "billing": {
      "description": "Current plan, payment availability and credit balance.",
      "title": "Billing",
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "enum": [
            "trial",
            "free",
            "start",
            "team",
            "enterprise",
            "legacy",
            "invoiced"
          ],
          "description": "Current workspace subscription plan."
        },
        "balance_nok": {
          "type": "number",
          "description": "Available credit in Norwegian kroner, not øre."
        },
        "monthly_credit_nok": {
          "type": "number",
          "description": "Credit included each month, in Norwegian kroner."
        },
        "last_refill_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "Time credits were most recently refilled, in Unix milliseconds."
        },
        "next_refill_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "Next scheduled credit refill, in Unix milliseconds."
        },
        "trial_ends_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "Trial expiry time, in Unix milliseconds."
        },
        "has_payment_method": {
          "type": "boolean",
          "enum": [
            false,
            true
          ],
          "description": "Whether a payment method is configured for the workspace."
        },
        "created_at": {
          "type": "number",
          "description": "Creation time in Unix milliseconds."
        },
        "updated_at": {
          "type": "number",
          "description": "Last update time in Unix milliseconds."
        }
      },
      "required": [
        "plan",
        "balance_nok",
        "monthly_credit_nok",
        "last_refill_at",
        "next_refill_at",
        "trial_ends_at",
        "has_payment_method",
        "created_at",
        "updated_at"
      ],
      "additionalProperties": false
    },
    "online_payments_available": {
      "type": "boolean",
      "description": "Whether this workspace can use Brigg's online payment flow."
    }
  },
  "required": [
    "billing",
    "online_payments_available"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "billing": {
        "plan": "team",
        "balance_nok": 487.5,
        "monthly_credit_nok": 500,
        "last_refill_at": null,
        "next_refill_at": null,
        "trial_ends_at": null,
        "has_payment_method": false,
        "created_at": 1794301200000,
        "updated_at": 1794301200000
      },
      "online_payments_available": false
    }
  ]
}

Search by operation name or what you want to build.

Use arrow keys to browse. Enter opens a result.