Get the Plan
const url = 'https://api.qualia.dev/v1/billing';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Successful Response
The organization’s plan this month.
object
Whose allowance applies this month
Usage over the allowance can be billed: a card is on file
The month’s cap on overage dollars; null is none
New paid work was refused this month
Needs_card, credit_used or spend_cap_reached
object
One plan of the catalogue and its monthly allowance.
object
None on Free and Enterprise
The price per interval; none on Free and Enterprise
Monthly allowance per meter: storage in GB, the rest hours
object
Shown to the organization’s owners only
object
The sign-up credit left; null with none, once used and once expired
object
What was granted: $20
What is left now; above 0
Unused credit lapses then
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
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}The key lacks credits:read or is restricted to workspaces
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Billing is off on this deployment
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}