Billing
✅ Validado (off-chain / infra)
Suite misc-infra — leitura/escrita de billing validadas.
Gerada automaticamente do spec OpenAPI da API (fonte de verdade). 13 endpoint(s).
Manual plan activation
POST /v1/billing/activate
Activate a plan manually (requires admin secret)
Auth: pública / api-key
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|
Respostas: 200, 201, 403
List all pending payments (admin)
GET /v1/billing/admin/payments
List all pending payments across tenants (requires admin secret)
Auth: pública / api-key
Query params:
| Param | Tipo | Obrigatório |
|---|---|---|
limit | string | sim |
Respostas: 200, 403
Create Stripe checkout
POST /v1/billing/checkout
Create a Stripe Checkout session for plan upgrade
Auth: bearer
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|
Respostas: 200, 201, 503
Create crypto checkout
POST /v1/billing/crypto_checkout
Create a crypto payment request (USDT/USDC)
Auth: bearer
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|
Respostas: 201, 503
Get crypto payment status
GET /v1/billing/crypto_checkout/{id}
Check the status of a crypto payment
Auth: bearer
Path params: id
Respostas: 200, 404
List invoices
GET /v1/billing/invoices
List Stripe invoices for tenant
Auth: bearer
Respostas: 200
List payments
GET /v1/billing/payments
List billing payment history
Auth: bearer
Respostas: 200
Confirm payment
POST /v1/billing/payments/{id}/confirm
Confirm a crypto payment and activate the plan (requires admin secret)
Auth: pública / api-key
Path params: id
Request body:
| Campo | Tipo | Obrigatório | Descrição |
|---|
Respostas: 200, 201, 403, 404
List plans
GET /v1/billing/plans
List available billing plans with fiat and crypto pricing
Auth: bearer
Respostas: 200
Create portal session
POST /v1/billing/portal
Create Stripe Customer Portal session
Auth: bearer
Respostas: 200, 201
Get subscription
GET /v1/billing/subscription
Get current tenant subscription
Auth: bearer
Respostas: 200
Get usage
GET /v1/billing/usage
Get current billing usage for tenant
Auth: bearer
Respostas: 200
Stripe webhook
POST /v1/billing/webhook
Handle Stripe webhook events
Auth: pública / api-key
Respostas: 200, 201