Skip to content

Get the effective billing plan

GET
/billing/plan
curl --request GET \
--url https://example.com/api/billing/plan \
--cookie sb-access-token=<sb-access-token>

Lightweight plan lookup sourced only from the local DB summary — no Stripe client construction, no Stripe API calls. Used by the portal’s billing-wall guard on every navigation; the Settings → Billing tab uses the richer, Stripe-backed /billing/insights instead.

Effective billing plan

Media type application/json
object
plan
required
string
planLabel
string

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean