Skip to content

The org’s standing: one banner, and the trial

GET
/orgs/{org}/billing/standing
curl --request GET \
--url https://api.sloose.com/orgs/org_9f3c/billing/standing \
--header 'Authorization: Bearer <token>'

What the app bar says about the org, for whoever is asking: the one banner to show — suspended, a payment failed, over the plan, the trial ended, the trial ending in three days, AI credits running low, most serious first — or none; while a trial runs, when it ends; the AI credits available; and the zone its days are named in.

A suspension and being over the plan are said to every member, in the administrators’ words (with the way to settle it, or to see what is over) or everybody else’s. Over the plan is an enforced limit the org is past (over), where a move down or a trial’s end can leave it: connections past connections_max — adding one is refused, a reconnect never — or runs this period past runs_per_month, which refuses the next run. The other four are said to the owner and administrators only. The trial’s end is said for seven days after it. Two are dismissed, each by a person for themselves through POST …/billing/notices/{id}/ack: the three-day warning, for a day, and running low (credits_low, the one-click top-up, #298), for this shortfall.

Asking also checks the org’s credits against its one-click top-up number before answering (#1356): a shortfall reached by a path that tells nobody — a hold that lapsed, credits that expired — is raised then, and this answer carries its banner.

The owed invoice’s page (invoiceUrl) pays it with no sign-in, so it is handed only to the owner or an administrator through their own session — never to an org API token, whatever its role, nor to a staff member’s view, which are told the same banner without it.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

The org’s standing.

Media typeapplication/json
object
banner
required
One of:
object
kind
required
string
Allowed values: suspended
admin
required

The administrators’ version, with the way to settle the account; false for everybody else, who are told an admin settles it and that dry runs still work.

boolean
invoiceUrl
required

The owed invoice’s own page at Stripe, where it is paid: https on invoice.stripe.com. Handed only to a person who may pay it — the owner or an administrator, through their own session; never an org API token, whatever its role, nor a staff member’s view. Null otherwise, or when no invoice is owed: then the way to settle is the Customer Portal.

string | null
payable
required

Whether an invoice is owed that settles this — “Pay the invoice” — whether or not this bearer is handed its page (invoiceUrl). So a staff member’s view of an administrator is told it with no page, and shows the member’s button disabled. Only ever true on the administrators’ banner.

boolean
collectionMethod
required
string
trial
required

While a trial runs: when it ends. For every member.

object
endsAt
required
string
credits
required
object
available
required
number
timeZone
required

The zone the banner’s days and times are named in, as its emails name them: the org’s own (Settings → General), or UTC when it has none.

string
Example
{
"banner": {
"kind": "suspended"
}
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low, or it was issued for a different org.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page