Purchasable subscription plan catalog (DB-sourced)
const url = 'https://example.com/v1/plans';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/plans \ --header 'Authorization: Bearer <token>'Return the active, purchasable subscription plans from the DB plans
catalog — the single source of truth for tiers + pricing. The SPA renders
its upgrade picker from this, never a hardcoded list. FREE is excluded (it’s
the default; there’s no checkout for it); inactive plans (e.g. ENTERPRISE)
are hidden. Ordered cheapest-first.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Responses
Section titled “ Responses ”Successful Response
GET /v1/plans — the active, purchasable subscription catalog.
object
One purchasable subscription plan from the DB plans catalog.
The catalog (code, credits, price) is the single source of truth for tiers/pricing — surfaced to the SPA so it never hardcodes a plan list.
object
Plan code (e.g. ‘STARTER’) — what checkout is created for.
Display name for the plan picker.
Credits granted each billing period.
ISO currency code for the price.
Example
{ "plans": [ { "currency": "USD" } ]}Validation Error
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}