Skip to Content
Urlizo API Docs

Billing

Planos, assinatura, checkout/portal (status real 200) e — só no Dashboard — uso e faturas (JWT-only, decisão B9). Valores em centavos. Checkout/portal sem providerPriceId (ex. FREE) = 409. Webhook do gateway valida assinatura Stripe (sem JWT/API Key).

Tag no Swagger: Billing · Auth: JWT (Dashboard) + API Key (Public, parcial) + Stripe (gateway) · 4 endpoints

GET/api/v1/billing/plans

Catálogo.

Auth: API Key Bearer (scope billing:read)

Response

{ plans }

Errors: 401 · 403

GET/api/v1/billing/subscription

Assinatura atual (ou null).

Auth: API Key Bearer (scope billing:read)

Response

Subscription | null

Errors: 401 · 403

POST/api/v1/billing/checkout

Checkout. Status real 200.

Auth: API Key Bearer (scope billing:manage)

Request body

CampoTipoObrigatórioRegras
planTypeFREE|STARTER|PRO|BUSINESSsim

Response

{ url, providerCheckoutSessionId }

Errors: 401 · 403 · 400 VALIDATION_ERROR

POST/api/v1/billing/portal

Portal. Status real 200.

Auth: API Key Bearer (scope billing:manage)

Request body

CampoTipoObrigatórioRegras
returnUrlstring (url)não

Response

{ url }

Errors: 401 · 403 · 400 VALIDATION_ERROR