Slimlytics Billing API
Hosted plans, Stripe Checkout and Customer Portal, and the Stripe webhook. Disabled unless BILLING_ENABLED=true.
Hosted plans, Stripe Checkout and Customer Portal, and the Stripe webhook. Disabled unless BILLING_ENABLED=true.
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/slimlytics-com:slimlytics-com-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: Slimlytics Billing API
version: 1.0.0
description: 'Account, personal API token, site configuration, privacy-preserving collection, reporting, goals, export, and real-time APIs for Slimlytics.
Use a short-lived session JWT for creating personal API tokens. Use a `slyt_…` personal API token for durable CLI and agent access. Both use `Authorization: Bearer `. Collection write keys authorize ingestion only.'
license:
name: MIT
identifier: MIT
servers:
- url: https://slimlytics.com
description: Slimlytics Cloud
security:
- bearerAuth: []
tags:
- name: Billing
description: Hosted plans, Stripe Checkout and Customer Portal, and the Stripe webhook. Disabled unless BILLING_ENABLED=true.
paths:
/api/billing/plans:
get:
tags:
- Billing
summary: List hosted plans
operationId: listBillingPlans
description: Public. Returns enabled=false and no plans when billing is off (self-hosted default).
responses:
'200':
description: Plans
content:
application/json:
schema:
type: object
required:
- enabled
- plans
properties:
enabled:
type: boolean
checkoutAvailable:
type: boolean
plans:
type: array
items:
type: object
required:
- id
- name
properties:
id:
type: string
name:
type: string
sites:
type:
- integer
- 'null'
description: Maximum owned sites; null is unlimited
dailyPageViews:
type:
- integer
- 'null'
description: Soft daily limit across the account's sites; null is unlimited
monthlyPriceCents:
type: integer
annualPriceCents:
type: integer
currency:
type: string
security: []
/api/billing:
get:
tags:
- Billing
summary: Get the account's plan and usage
operationId: getBilling
description: Session login only; API and agent tokens are refused (403).
responses:
'200':
description: Plan, subscription, and usage
content:
application/json:
schema:
type: object
required:
- enabled
properties:
enabled:
type: boolean
plan:
type: object
required:
- id
- name
properties:
id:
type: string
name:
type: string
sites:
type:
- integer
- 'null'
description: Maximum owned sites; null is unlimited
dailyPageViews:
type:
- integer
- 'null'
description: Soft daily limit across the account's sites; null is unlimited
monthlyPriceCents:
type: integer
annualPriceCents:
type: integer
currency:
type: string
planSource:
type: string
enum:
- default
- stripe
- admin
subscriptionStatus:
type:
- string
- 'null'
interval:
type:
- string
- 'null'
enum:
- month
- year
- null
currentPeriodEnd:
type:
- string
- 'null'
format: date-time
usage:
type: object
properties:
sites:
type: integer
pageViewsToday:
type: integer
plans:
type: array
items:
type: object
required:
- id
- name
properties:
id:
type: string
name:
type: string
sites:
type:
- integer
- 'null'
description: Maximum owned sites; null is unlimited
dailyPageViews:
type:
- integer
- 'null'
description: Soft daily limit across the account's sites; null is unlimited
monthlyPriceCents:
type: integer
annualPriceCents:
type: integer
currency:
type: string
checkoutAvailable:
type: boolean
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/api/billing/checkout:
post:
tags:
- Billing
summary: Start a Stripe Checkout subscription
operationId: createBillingCheckout
description: Session login only. Existing subscribers receive a Customer Portal URL instead, so plans change without a second subscription.
responses:
'200':
description: Checkout or portal URL
content:
application/json:
schema:
type: object
required:
- url
properties:
url:
type: string
format: uri
portal:
type: boolean
description: True when an existing subscriber is sent to the Customer Portal instead
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- plan
properties:
plan:
type: string
interval:
type: string
enum:
- month
- year
default: month
/api/billing/portal:
post:
tags:
- Billing
summary: Open the Stripe Customer Portal
operationId: createBillingPortal
description: Session login only. Manage payment methods, change plans, or cancel.
responses:
'200':
description: Portal URL
content:
application/json:
schema:
type: object
required:
- url
properties:
url:
type: string
format: uri
portal:
type: boolean
description: True when an existing subscriber is sent to the Customer Portal instead
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
/api/billing/webhook:
post:
tags:
- Billing
summary: Stripe webhook
operationId: stripeWebhook
description: Called by Stripe. Requires a valid Stripe-Signature header; each event is applied once and re-syncs the customer's subscription.
responses:
'200':
description: Event received
content:
application/json:
schema:
type: object
properties:
received:
type: boolean
duplicate:
type: boolean
'400':
description: Invalid signature or payload
security: []
components:
responses:
BadRequest:
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: Insufficient site role
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
enum:
- unauthorized
- forbidden
- not_found
- bad_request
- rate_limited
- internal_error
message:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT or slyt_ personal API token
description: Session JWT or personal API token. Token creation specifically requires a session JWT.
sessionQuery:
type: apiKey
in: query
name: token
description: Short-lived session JWT for native EventSource clients. Never put personal API tokens in URLs.
serverWriteKey:
type: apiKey
in: header
name: X-Slimlytics-Server-Key
description: Rotatable site secret accepted only by server request ingestion.
externalDocs:
description: Complete Slimlytics CLI installation and command reference
url: https://slimlytics.com/docs/cli