Managing your subscription
Who can do this
Section titled “Who can do this”billing.read and billing.update belong to OWNER and BILLING only.
Current state
Section titled “Current state”Settings → Billing — on an organization and on your personal account alike, since a personal account is backed by its own organization with its own subscription. The page shows the plan and its status, the renewal date, the card and billing email on file, usage against the plan’s limits, the projected invoice for this period and the invoice history. Or over the API:
curl -sS "https://cavsnode.com/api/v1/organizations/acme-ai/billing" \ -H "Authorization: Bearer $CAVS_TOKEN"Returns the current plan, subscription status, the period, usage against the plan’s limits, and an invoice preview including projected overage.
Upgrading
Section titled “Upgrading”-
Go to Settings → Billing → Change plan and choose one.
-
You’re redirected to the payment provider’s hosted checkout. CAVS never sees your card details.
-
On success you come back and the plan applies — normally within seconds, once the provider’s webhook lands.
curl -sS -X POST "https://cavsnode.com/api/v1/organizations/acme-ai/billing/checkout" \ -H "Authorization: Bearer $CAVS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"plan_id": "team"}'{ "url": "https://checkout.stripe.com/c/pay/…" }Redirect the user to url.
If the plan doesn’t change immediately
Section titled “If the plan doesn’t change immediately”Plan changes arrive by provider webhook. If it’s slow, nudge it:
curl -sS -X POST "https://cavsnode.com/api/v1/organizations/acme-ai/billing/confirm" \ -H "Authorization: Bearer $CAVS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"plan_id": "team"}'A 202 Accepted with {"status": "pending_webhook"} means the provider hasn’t
confirmed yet — poll GET …/billing.
The billing portal
Section titled “The billing portal”Cards, billing address, tax details and cancellation live in the provider’s portal. Settings → Billing → Manage billing opens it — the button appears once there’s a customer on file, so an account that has never checked out won’t see it. Over the API:
curl -sS -X POST "https://cavsnode.com/api/v1/organizations/acme-ai/billing/portal" \ -H "Authorization: Bearer $CAVS_TOKEN"{ "url": "https://billing.stripe.com/p/session/…" }The link is short-lived and single-use — generate a fresh one each time.
Downgrading
Section titled “Downgrading”Same flow with a lower plan_id.
The BYOS add-on
Section titled “The BYOS add-on”Developer plans can add Bring Your Own S3 for $29/mo:
curl -sS -X POST "https://cavsnode.com/api/v1/organizations/acme-ai/billing/byos-addon" \ -H "Authorization: Bearer $CAVS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"enabled": true}'Team and Business include BYOS, so the add-on doesn’t apply. Disabling it while repositories use BYOS connections will fail — move or delete those repositories first.
Payment problems
Section titled “Payment problems”| Event | Effect |
|---|---|
billing.payment.failed |
Notification + email to the organization |
| Repeated failure | The subscription lapses per the provider’s dunning policy |
storage.quota.exceeded |
The organization is marked PAST_DUE |
A PAST_DUE organization keeps its data and its read access. Write operations are
refused with 402 until the situation is resolved.
Fix payment details in the billing portal. The change takes effect as soon as the provider confirms.
Cancelling
Section titled “Cancelling”-
Export or download anything you need first.
-
Settings → Billing → Cancel plan. You’re taken to the provider’s portal to confirm; you revert to the Free plan at the end of the paid period, and until then the Billing page shows when the subscription ends.
-
If you’re over Free’s limits, writes will be refused until you’re under them.
-
To leave entirely, delete the organization (
OWNERonly).
Invoices and tax
Section titled “Invoices and tax”Settings → Billing → Invoices lists every invoice the provider has issued — date,
number, status and amount, each linking to its hosted receipt and PDF. CAVS records the
reference when the invoice webhook lands, so the list works without a live provider
round-trip; it also comes back on GET …/billing as invoices.
VAT/GST handling and billing addresses stay in the provider’s portal. CAVS stores only a reference to the subscription, never card details.
For annual billing, purchase orders, custom terms or an SLA, contact sales about the Business plan.
Audit trail
Section titled “Audit trail”Every billing action is recorded in the audit log:
billing.checkout_started, billing.subscription_updated,
billing.byos_addon_updated — with actor and IP.
curl -sS "https://cavsnode.com/api/v1/organizations/acme-ai/audit" -H "$H" \ | jq '.events[] | select(.action | startswith("billing."))'- Plans & quotas — what each plan includes.
- Usage & metering — reducing the bill.
- Tokens, webhooks & billing — the endpoint reference.

