Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Get plan, status, and usage

GET/billing
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in production; a simulator in test). The client obtains it and sends it as a Bearer token on every authenticated call. Sarvex's services verify it — issuer, audience, signature (IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue or revoke these tokens. merchant_id/store_id are read from the verified claims (and the merchant→store mapping), never from the URL. The operator scope is required for /operator/*. Operators acting on a specific merchant pass the X-Operate-As header, which is recorded in the audit log.

Responses
200

Billing state (provider-authoritative projection).

planplan
Allowed:self_serveconciergescale
statusstring
Allowed:activeactive_via_invoicepast_duesuspendedcanceled
sku_bandstring
usageobject
Show properties
sku_countinteger
sku_capinteger
member_capinteger

Maximum team members this account may invite via POST /account/members. Configurable per subscription; defaults to 5.

Try it
Server
Authorization
Request
curl -X GET "https://api.sarvex.example.com/v1/billing" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "plan": "self_serve",
  "status": "active",
  "sku_band": "up_to_5000",
  "usage": {
    "sku_count": 0,
    "sku_cap": 0,
    "member_cap": 0
  }
}