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

Estimate the recurring invoice

Estimates the recurring invoice for a plan and a number of seats. Requires being a member. With a current subscription, the estimate replaces its plan with the one asked for. A plan billed per environment minute takes no seats, and the estimate leaves out the usage billed at the end of the period. Answers 502 when Stripe fails.

POST/organizations/{organizationId}/billing/preview
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
Responses
200

The estimate.

currencystringrequired
subtotalinteger<int64>required
taxinteger<int64> | nullrequired

Null when Stripe computed no tax; taxes may then be finalized at checkout.

totalinteger<int64>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/preview' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "plan": "string",
  "seats": 1
}'
Response
{
  "currency": "string",
  "subtotal": 0,
  "tax": 0,
  "total": 0
}