Superflag Billing API
The Billing API from Superflag — 2 operation(s) for billing.
The Billing API from Superflag — 2 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/superflag-sh:superflag-sh-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: Superflag control-plane evaluation and advanced…
version: 1.0.0
description: 'Public Superflag HTTP API. Discovery documents at /openapi.json and /api/v1/contract do not require auth. Delivery and management routes require Authorization: Bearer with a cli_, admin_, sdk_, or pub_ credential. See https://superflag.sh/docs/api-reference/overview.'
servers:
- url: https://superflag.sh
description: Production
tags:
- name: Billing
paths:
/api/v1/billing:
get:
operationId: getBillingStatus
description: Read the authenticated cli_ user's plan after Stripe webhook reconciliation. Checkout redirects do not grant Pro.
security:
- BearerAuth: []
responses:
'200':
description: Canonical billing status
content:
application/json:
schema:
type: object
required:
- apiVersion
- billing
properties:
apiVersion:
const: 1
billing:
type: object
required:
- plan
- offer
- allowance
- status
- currentPeriodEnd
- cancelAtPeriodEnd
properties:
plan:
enum:
- free
- pro
offer:
type:
- string
- 'null'
enum:
- legacy
- pooled_v1
- null
allowance:
type: object
required:
- maxApps
- hostedConfigSyncsPerMonth
- scope
- period
properties:
maxApps:
type:
- integer
- 'null'
minimum: 1
hostedConfigSyncsPerMonth:
type: integer
minimum: 1
scope:
enum:
- account
- environment
period:
const: utc_month
status:
type: string
currentPeriodEnd:
type:
- string
- 'null'
format: date-time
cancelAtPeriodEnd:
type: boolean
paymentGraceEndsAt:
type:
- string
- 'null'
format: date-time
'401':
description: Missing or invalid bearer
'403':
description: A user-scoped cli_ token is required
tags:
- Billing
summary: Get billing status
x-summary-source: derived
/api/v1/billing/checkout:
post:
operationId: createBillingCheckout
description: Start the existing Pro subscription in hosted Stripe Checkout. The buyer must approve payment there; this response is not paid status.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- idempotencyKey
properties:
idempotencyKey:
type: string
minLength: 16
maxLength: 128
pattern: ^[A-Za-z0-9._:-]+$
responses:
'200':
description: Buyer action required at hosted Stripe Checkout
content:
application/json:
schema:
type: object
required:
- apiVersion
- state
- offer
- checkout
properties:
apiVersion:
const: 1
state:
const: requires_buyer_action
offer:
type: object
required:
- plan
- amount
- currency
- interval
- allowance
properties:
plan:
const: pro
amount:
type: integer
minimum: 0
currency:
const: usd
interval:
const: month
allowance:
type: object
required:
- maxApps
- hostedConfigSyncsPerMonth
- scope
- period
properties:
maxApps:
type:
- integer
- 'null'
minimum: 1
hostedConfigSyncsPerMonth:
type: integer
minimum: 1
scope:
enum:
- account
- environment
period:
const: utc_month
checkout:
type: object
required:
- id
- url
- expiresAt
properties:
id:
type: string
url:
type: string
format: uri
expiresAt:
type: string
format: date-time
'400':
description: Invalid idempotency key or body
'401':
description: Missing or invalid bearer
'403':
description: A user-scoped cli_ token is required
'409':
description: Existing subscription or expired checkout
'503':
description: Checkout unavailable or configured Stripe price differs from the offer
tags:
- Billing
summary: Create billing checkout
x-summary-source: derived
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key