Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview

Subscribe, or change the plan or seats

Requires organization:update. Without a current subscription, returns a Stripe Checkout URL. With one, returns a Stripe Customer Portal URL to confirm the change. Asking for the plan and seats already active answers 409. A plan billed per environment minute takes no seats, and the minutes used are billed at the end of each period. The subscription changes once Stripe confirms it, not when the browser returns.

POST/organizations/{organizationId}/billing/checkout
Authorization
AuthorizationBearer token (JWT) · headerrequired

An access token issued by this service (RFC 9068), in the Authorization header as Bearer <token>.

Path parameters
organizationIdstring<uuid>required
Request body
requiredapplication/json
planstring

A plan name; the default plan when omitted.

seatsinteger

Licensed environments, required by a plan priced per seat. A plan billed per environment minute ignores it.

min 1 · max 1000
return_urlstring<uri>required

A console URL Stripe returns to, whether the change completes or not.

Responses
200

The Stripe page to open.

urlstring<uri>required
default

The request failed.

errorstringrequired

Stable machine-readable code.

Allowed:invalid_requestunauthorizedforbiddennot_foundconflictgoneunavailableinternal
messagestringrequired

Human-readable explanation.

Request
curl -X POST 'https://auth.kapten.io/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/checkout' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "plan": "string",
  "seats": 1,
  "return_url": "http://example.com"
}'
Response
{
  "url": "http://example.com"
}

Was this page helpful?