Skip to main content

Billing

Manage your subscription and billing through the API.

Get Subscription

curl https://api.caged.dev/v1/billing/subscription \
  -H "Authorization: Bearer caged_sk_..."
Response 200 OK
{
  "plan": "pro",
  "status": "active",
  "current_period_end": "2026-07-08T00:00:00Z",
  "usage": {
    "compute_hours": 12.5,
    "llm_cost_usd": 3.42,
    "total_cost_usd": 5.67,
    "sandboxes_created": 8
  }
}

Plans

PlanPriceSandboxesComputeSupport
Free$0/mo2 concurrent10 hrs/moCommunity
Pro$29/mo10 concurrent100 hrs/moEmail
Team$99/mo50 concurrent500 hrs/moPriority
EnterpriseCustomUnlimitedCustomDedicated

Create Checkout Session

Creates a Stripe checkout session for subscription upgrade.
plan
string
required
Plan to subscribe to: pro, team, or enterprise.
curl -X POST https://api.caged.dev/v1/billing/checkout \
  -H "Authorization: Bearer caged_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"plan": "pro"}'
Response 200 OK
{
  "url": "https://checkout.stripe.com/c/pay/..."
}

Create Billing Portal

Creates a Stripe billing portal link for managing payment methods, invoices, and plan changes.
curl -X POST https://api.caged.dev/v1/billing/portal \
  -H "Authorization: Bearer caged_sk_..."
Response 200 OK
{
  "url": "https://billing.stripe.com/p/session/..."
}

Cancel Subscription

Cancels the subscription at the end of the current billing period.
curl -X POST https://api.caged.dev/v1/billing/cancel \
  -H "Authorization: Bearer caged_sk_..."
Response 200 OK
{
  "status": "canceled",
  "effective_at": "2026-07-08T00:00:00Z"
}