Billing API
Auto-generated from
openapi-snapshot.json. Do not edit by hand — changes are overwritten byscripts/docs/generate_api_reference.py.
6 endpoints in this group.
POST /api/billing/checkout
Create Checkout
Request body: application/json
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/billing/limits
Get Limits
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/billing/plans
Get Plans
Responses
| Code | Description |
|---|---|
200 | Successful Response |
POST /api/billing/portal
Create Portal
Request body: application/json
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/billing/subscription
Get Subscription
Return the tenant’s current subscription envelope the web app expects.
Tolerant of schema drift — tries the richer plans + billing_subscriptions
join first, then falls back to whatever billing_subscriptions actually
has, and finally {subscription: null} so settings pages render instead
of 500’ing.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/billing/webhook
Stripe Webhook
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Stripe-Signature | header | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |