Cloudbrowser Billing API
The Billing API from Cloudbrowser — 6 operation(s) for billing.
The Billing API from Cloudbrowser — 6 operation(s) for billing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cloudbrowser-tv:cloudbrowser-tv-billing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloudbrowser REST Billing API
version: 0.6.0
description: Next.js API with Sandbox0 Chrome, PostgreSQL and Auth0. Billing endpoints require configured Stripe; check billingEnabled. API-key authentication remains supported. Go CLI x-cli entries are design examples only. Fork requires a paused source.
servers:
- url: http://localhost:3000/api/v1
description: Local development server
- url: https://cloudbrowser.tv/api/v1
description: Production origin (private preview)
security:
- ApiKey: []
tags:
- name: Billing
paths:
/billing/status:
get:
operationId: getBillingStatus
summary: Get plan, runtime, estimated overage and billing access
description: Only the workspace billing owner can modify billing.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Billing
/billing/checkout:
post:
operationId: createCheckout
summary: Start hosted Stripe Checkout for a new subscription
description: Only the workspace billing owner can modify billing. Additional usage is charged separately at period close. Monthly amount and extra hourly rate appear in Checkout.
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
url:
type: string
format: uri
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutRequest'
parameters:
- name: Idempotency-Key
in: header
required: true
schema:
type: string
maxLength: 200
tags:
- Billing
/billing/portal:
post:
operationId: createBillingPortal
summary: Open payment methods and invoices
description: Only the workspace billing owner can modify billing.
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
url:
type: string
format: uri
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Billing
/billing/refresh:
post:
operationId: refreshBilling
summary: Reconcile Stripe payment and subscription status
description: Only the workspace billing owner can modify billing.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Billing
/billing/upgrade-preview:
post:
operationId: previewUpgrade
summary: Preview Basic to Pro proration; valid for five minutes
description: Only the workspace billing owner can modify billing.
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
amountDueCents:
type: integer
currency:
type: string
prorationDate:
type: integer
additionalIncludedSeconds:
type: integer
periodEndsAt:
type: string
format: date-time
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Billing
/billing/plan:
post:
operationId: changePlan
summary: Upgrade after payment or schedule downgrade/cancel for next period
description: Only the workspace billing owner can modify billing.
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- updated
- scheduled
- payment_pending
plan:
type: string
effectiveAt:
type: string
format: date-time
paymentUrl:
type:
- string
- 'null'
default:
description: Authentication, ownership, billing state, validation or Stripe configuration error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PlanChangeRequest'
parameters:
- name: Idempotency-Key
in: header
required: true
schema:
type: string
maxLength: 200
tags:
- Billing
components:
schemas:
CheckoutRequest:
type: object
additionalProperties: false
required:
- plan
properties:
plan:
type: string
enum:
- basic
- pro
Usage:
type: object
properties:
plan:
type: string
enum:
- free
- basic
- pro
includedSeconds:
type: integer
usedSeconds:
type: integer
runningBrowsers:
type: integer
description: Running or reserved slots, including pending or uncertain operations.
concurrencyLimit:
type: integer
periodStartsAt:
type: string
format: date-time
periodEndsAt:
type: string
format: date-time
period:
type: string
description: UTC calendar month for Free; subscription billing period for paid plans.
billingEnabled:
type: boolean
remainingSeconds:
type: integer
minimum: 0
estimatedOverageCents:
type: integer
minimum: 0
canManageBilling:
type: boolean
hasBillingAccount:
type: boolean
cancelAtPeriodEnd:
type: boolean
billingIssue:
type: boolean
pendingPlan:
type:
- string
- 'null'
enum:
- free
- basic
- pro
- null
subscriptionStatus:
type: string
billingMode:
type: string
computeBlock:
type:
- object
- 'null'
description: Current billing restriction on starting/resuming compute, independent of historical browser pause reasons. Paid overage alone does not block compute. Concurrency admission is checked separately.
properties:
code:
type: string
enum:
- free_allowance_exhausted
- payment_required
message:
type: string
resetsAt:
type:
- string
- 'null'
format: date-time
PlanChangeRequest:
type: object
additionalProperties: false
required:
- plan
properties:
plan:
type: string
enum:
- free
- basic
- pro
prorationDate:
type: integer
description: Required for Basic to Pro; use value from upgrade-preview.
Error:
type: object
required:
- code
- message
- requestId
properties:
code:
type: string
examples:
- CONCURRENCY_LIMIT
- ALLOWANCE_EXHAUSTED
- BROWSER_NOT_RUNNING
- GRANT_EXPIRED
- GRANT_REVOKED
- RENEWAL_LIMIT
- CONFLICT
message:
type: string
requestId:
type: string
securitySchemes:
ApiKey:
type: http
scheme: bearer
description: Account/workspace API key. Distinct from a per-browser CDP token or viewer ticket.
ViewerAccess:
type: apiKey
in: cookie
name: __Secure-cb_viewer_access
description: Viewer-origin HttpOnly cookie; actual name is session-suffixed (cb_access_{sessionId} or cb_refresh_{sessionId}). Exact Origin is required. Local HTTP only omits Secure.
ViewerRefresh:
type: apiKey
in: cookie
name: __Secure-cb_viewer_refresh
description: Viewer-origin HttpOnly cookie; actual name is session-suffixed (cb_access_{sessionId} or cb_refresh_{sessionId}). Exact Origin is required. Local HTTP only omits Secure.
AccountSession:
type: apiKey
in: cookie
name: __Host-cb_account
description: Signed-in account on cloudbrowser.tv; HttpOnly, Secure, host-only, SameSite=Lax; CSRF protection required. Not sent to viewer origin.
AccountAccess:
type: http
scheme: bearer
description: User-account access token issued by human CLI login. Not a workspace API key, CDP token or viewer refresh token.