billing
7 endpoints
post /billing/checkout
Create a Stripe checkout session
Requires authentication
Creates a Stripe checkout session for the requested plan and returns its URL. Org owner or admin only.
Request body: dto.CreateCheckoutRequest
| Name | Type | Required | Description |
|---|---|---|---|
| currency | string | no | |
| plan | string | yes |
Responses
- 200 OK · object
- 400 Bad Request · apimodel.ErrorEnvelope
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 409 Conflict · apimodel.ErrorEnvelope
get /billing/plans
List pricing tiers
No authentication
Returns the flat pricing tiers with EUR converted from a live USD→EUR rate (Frankfurter/ECB, cached). Public — the marketing pricing page renders these without auth.
Responses
- 200 OK · object
post /billing/portal
Create a Stripe billing portal session
Requires authentication
Creates a Stripe billing portal session for the org and returns its URL. Org owner or admin only.
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 404 Not Found · apimodel.ErrorEnvelope
get /billing/subscription
Get the org's subscription
Requires authentication
Returns the org's real subscription status (plan, status, current period end, cancel-at-period-end, Stripe customer id). Org owner or admin only.
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 500 Internal Server Error · apimodel.ErrorEnvelope
post /billing/trial
Start the org's free trial
Requires authentication
Puts a Free organization on the Starter plan for 14 days with no card, then reverts it to Free automatically unless it has paid by then. Once per organization, and only for an owner or admin. Once per organization and once per verified email address: refused with 403 EMAIL_NOT_VERIFIED if the caller never confirmed their address, and with 409 if the address already used a trial in any organization (TRIAL_CLAIMED), if the org already used its trial (TRIAL_ALREADY_USED), has one running (TRIAL_ACTIVE), or is not on Free (TRIAL_NOT_FREE, ALREADY_SUBSCRIBED). Send an Idempotency-Key header to make a retry replay the first answer.
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 403 Forbidden · apimodel.ErrorEnvelope
- 409 Conflict · apimodel.ErrorEnvelope
get /billing/usage
Get the org's plan usage
Requires authentication
Returns the org's current plan, its live use of each plan limit (seats, projects, storage) next to the limit enforcement applies (-1 = unlimited), and its trial state. trialAvailable says whether POST /billing/trial would start a trial now.
Responses
- 200 OK · object
- 401 Unauthorized · apimodel.ErrorEnvelope
- 500 Internal Server Error · apimodel.ErrorEnvelope
post /webhooks/stripe
Stripe webhook
No authentication
Receives Stripe webhook events. Public — Stripe validates via signature. Returns 200 with an empty body once the event is applied (or deliberately ignored), and 500 when applying it failed, so Stripe retries it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Stripe-Signature | header | string | yes | Stripe event signature |
Responses
- 200 ok · string
- 400 Bad Request · apimodel.ErrorEnvelope
- 500 Internal Server Error · apimodel.ErrorEnvelope