CENVERO/DOCS
// Billing Integration
Billing Integration
Premade endpoints in the agent so your billing system can suspend, resume, or
rate-limit one of your customers — a tenant — when their invoice changes. It's
part of the agent's normal API (REST on :7070, gRPC, and the cenvero-str-ctl
CLI); you don't build anything beyond the HTTP calls.
Get an API key
The operator mints a key on the node; your billing system sends it as a bearer token.
cenvero-str-ctl apikeys mint "billing" # → csk_xxxxxxxxxxxxxxxx (shown once)
cenvero-str-ctl apikeys list
cenvero-str-ctl apikeys revoke <id>
Authorization: Bearer csk_xxxxxxxxxxxxxxxx
Endpoints
A tenant is addressed by its id. All return JSON.
| Method · Path | What happens |
|---|---|
POST /api/v1/billing/tenants/{id}/suspend | Marks the tenant suspended — its traffic is cut. |
POST /api/v1/billing/tenants/{id}/resume | Marks it active again. |
POST /api/v1/billing/tenants/{id}/limit | Caps the tenant's bandwidth. Body: {"rate_mbps": 50}. |
POST /api/v1/billing/tenants/{id}/unlimit | Removes the cap. |
GET /api/v1/billing/tenants/{id} | Current state: {id, name, status, max_bandwidth_bps}. |
curl -X POST https://node:7070/api/v1/billing/tenants/t-abc123/suspend \
-H "Authorization: Bearer csk_xxxxxxxxxxxxxxxx"
Unknown tenant → 404.
From the CLI
cenvero-str-ctl billing suspend <tenant-id>
cenvero-str-ctl billing resume <tenant-id>
cenvero-str-ctl billing limit <tenant-id> --rate-mbps 50
cenvero-str-ctl billing unlimit <tenant-id>
cenvero-str-ctl billing status <tenant-id>
The action records durable per-tenant state (status + bandwidth quota); the dataplane enforces it on that tenant's networks and endpoints.