Codag billing API
The billing API from Codag — 4 operation(s) for billing.
The billing API from Codag — 4 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/codag-billing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: infra-logs templater Activate Billing API
description: Token compression for log streams. POST raw logs, get back templates or capsules.
version: 0.1.0
servers:
- url: https://api.codag.ai
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: billing
paths:
/api/billing/state:
get:
tags:
- billing
summary: Get Billing State
description: Snapshot of plan + current-period usage for the dashboard.
operationId: get_billing_state_api_billing_state_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BillingStateResponse'
/api/billing/checkout:
post:
tags:
- billing
summary: Create Checkout
operationId: create_checkout_api_billing_checkout_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/billing/portal:
post:
tags:
- billing
summary: Create Portal
operationId: create_portal_api_billing_portal_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PortalResponse'
/api/billing/webhooks/stripe:
post:
tags:
- billing
summary: Stripe Webhook
operationId: stripe_webhook_api_billing_webhooks_stripe_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Stripe Webhook Api Billing Webhooks Stripe Post
components:
schemas:
PortalResponse:
properties:
portal_url:
type: string
title: Portal Url
type: object
required:
- portal_url
title: PortalResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
BillingStateResponse:
properties:
plan_tier:
type: string
title: Plan Tier
subscription_status:
type: string
title: Subscription Status
pro_enabled:
type: boolean
title: Pro Enabled
can_manage_billing:
type: boolean
title: Can Manage Billing
monthly_price_cents:
type: integer
title: Monthly Price Cents
monthly_mb_included:
type: integer
title: Monthly Mb Included
overage_per_gb_cents:
type: integer
title: Overage Per Gb Cents
used_bytes:
type: integer
title: Used Bytes
period_start:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Period Start
period_end:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Period End
trial_ends_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Trial Ends At
cancel_at_period_end:
type: boolean
title: Cancel At Period End
has_subscription:
type: boolean
title: Has Subscription
default: false
has_customer:
type: boolean
title: Has Customer
default: false
type: object
required:
- plan_tier
- subscription_status
- pro_enabled
- can_manage_billing
- monthly_price_cents
- monthly_mb_included
- overage_per_gb_cents
- used_bytes
- period_start
- period_end
- trial_ends_at
- cancel_at_period_end
title: BillingStateResponse
CheckoutRequest:
properties:
plan:
type: string
pattern: ^(hobby|team|team_annual)$
title: Plan
deal_code:
anyOf:
- type: string
maxLength: 64
- type: 'null'
title: Deal Code
type: object
required:
- plan
title: CheckoutRequest
CheckoutResponse:
properties:
checkout_url:
type: string
title: Checkout Url
type: object
required:
- checkout_url
title: CheckoutResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError