Skip to content

Managing your subscription

billing.read and billing.update belong to OWNER and BILLING only.

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:

Terminal window
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.

  1. Go to Settings → Billing → Change plan and choose one.

  2. You’re redirected to the payment provider’s hosted checkout. CAVS never sees your card details.

  3. On success you come back and the plan applies — normally within seconds, once the provider’s webhook lands.

Over the API
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.

Plan changes arrive by provider webhook. If it’s slow, nudge it:

Terminal window
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.

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:

Terminal window
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.

Same flow with a lower plan_id.

Developer plans can add Bring Your Own S3 for $29/mo:

Terminal window
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.

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.

  1. Export or download anything you need first.

  2. 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.

  3. If you’re over Free’s limits, writes will be refused until you’re under them.

  4. To leave entirely, delete the organization (OWNER only).

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.

Every billing action is recorded in the audit log: billing.checkout_started, billing.subscription_updated, billing.byos_addon_updated — with actor and IP.

Terminal window
curl -sS "https://cavsnode.com/api/v1/organizations/acme-ai/audit" -H "$H" \
| jq '.events[] | select(.action | startswith("billing."))'