Skip to content

Get the Plan

GET
/v1/billing
curl --request GET \
--url https://api.qualia.dev/v1/billing \
--header 'X-API-Key: <X-API-Key>'

The organization’s plan this month, as Billing shows it: the plan, its interval and status, whether a card is on file (billable), the spend cap and whether paid work was refused, and the plan catalogue. card is shown to owners only.

Successful Response

Media type application/json
BillingPlan

The organization’s plan this month.

object
account_id
required
string
plan
required
string
Allowed values: free team team5x enterprise
billing_interval
string
nullable
Allowed values: month year
plan_status
string
nullable
Allowed values: pending active past_due canceled
usage_status
string
nullable
Allowed values: pending active past_due canceled
allowance_plan
required

Whose allowance applies this month

string
Allowed values: free team team5x enterprise
billable
required

Usage over the allowance can be billed: a card is on file

boolean
spend_cap_usd
required

The month’s cap on overage dollars; null is none

string | null
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
spend_cap_settable
required
boolean
suspended
required

New paid work was refused this month

boolean
suspended_reason

Needs_card, credit_used or spend_cap_reached

string | null
period_start
required
string format: date
period_end
required
string format: date
cancel_at
string | null format: date-time
scheduled_change
object
plan
required
string
Allowed values: team team5x
interval
required
string
Allowed values: month year
at
required
string format: date-time
plans
Array<object>
PlanOffer

One plan of the catalogue and its monthly allowance.

object
plan
required
string
Allowed values: free team team5x enterprise
interval

None on Free and Enterprise

string
nullable
Allowed values: month year
amount_usd

The price per interval; none on Free and Enterprise

string | null
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
included
required

Monthly allowance per meter: storage in GB, the rest hours

object
key
additional properties
string | null
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
card

Shown to the organization’s owners only

object
brand
required
string
last4
required
string
exp_month
required
integer
exp_year
required
integer
credit

The sign-up credit left; null with none, once used and once expired

object
granted_usd
required

What was granted: $20

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
remaining_usd
required

What is left now; above 0

string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
expires_at
required

Unused credit lapses then

string format: date-time
Example
{
"plan": "free",
"billing_interval": "month",
"plan_status": "pending",
"usage_status": "pending",
"allowance_plan": "free",
"scheduled_change": {
"plan": "team",
"interval": "month"
},
"plans": [
{
"plan": "free",
"interval": "month"
}
]
}

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

The key lacks credits:read or is restricted to workspaces

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Billing is off on this deployment

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}