Skip to content

Get billing insights

GET
/billing/insights
curl --request GET \
--url https://example.com/api/billing/insights \
--header 'Authorization: Bearer <token>'

Returns plan, usage counters, upcoming invoice, recent invoices, and payment method sourced from Stripe. Falls back gracefully when no Stripe customer is linked or the secret key is unset.

Billing insights

Media type application/json
object
key
additional properties
any

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