Billing API
A workspace's plan, usage and limits, and upgrades through Autumn.
All paths are relative to the API origin. Send Authorization: Bearer <token> unless a route says otherwise; see the API overview for tokens and errors.
GET /v1/workspaces/:slug/billing
Workspace member
Response
| Field | Type | Required | Notes |
|---|---|---|---|
plan | "free" | "pro" | "team" | "enterprise" | yes | |
status | string | yes | |
renewsAt | number | null | yes | |
usage | object | yes | |
limits | object | yes | |
provider | "autumn" | "none" | yes | |
billingConfigured | boolean | yes | |
canManage | boolean | yes |
POST /v1/workspaces/:slug/billing/checkout
Owner/admin; Autumn attach (Stripe Checkout URL, or back to Billing); 400 without AUTUMN_SECRET_KEY
Body
| Field | Type | Required | Notes |
|---|---|---|---|
plan | "pro" | "team" | yes |
Response
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes |
POST /v1/workspaces/:slug/billing/portal
Owner/admin; Stripe customer portal via Autumn; 400 without AUTUMN_SECRET_KEY
Response
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes |
POST /v1/billing/webhook
Svix signature; 404 while AUTUMN_WEBHOOK_SECRET is unset
Request: Autumn event
Response: 200