Astrocal Subscription API
The Subscription API from Astrocal — 4 operation(s) for subscription.
The Subscription API from Astrocal — 4 operation(s) for subscription.
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/astrocal-dev:astrocal-dev-subscription-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. 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: Astrocal Subscription API
version: 1.0.0
description: Scheduling API for AI agents and developers
servers:
- url: https://api.astrocal.dev
description: Production
- url: https://api.astrocal.dev
description: Local development
security:
- BearerAuth: []
tags:
- name: Subscription
paths:
/v1/subscription/webhook:
post:
tags:
- Subscription
summary: Stripe Billing webhook endpoint
description: Receives Stripe Billing webhook events for subscription management. Verifies the signature using a separate billing webhook signing secret.
security: []
responses:
'200':
description: Webhook received
content:
application/json:
schema:
type: object
properties:
received:
type: boolean
required:
- received
'400':
description: Invalid signature
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'500':
description: Handler failed (Stripe will retry)
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: postV1SubscriptionWebhook
x-operation-id-source: derived
/v1/subscription:
get:
tags:
- Subscription
summary: Get current subscription
description: Returns the organization's current plan, usage, limits, and subscription status.
responses:
'200':
description: Subscription status
content:
application/json:
schema:
type: object
properties:
plan:
type: string
enum:
- free
- starter
- pro
- business
- partner
status:
type: string
enum:
- active
- past_due
- cancelled
interval:
type: string
enum:
- monthly
- annual
period_end:
type: string
nullable: true
usage:
type: object
properties:
bookings_this_month:
type: number
bookings_limit:
type: number
connected_calendars:
type: number
calendars_limit:
type: number
required:
- bookings_this_month
- bookings_limit
- connected_calendars
- calendars_limit
features:
type: object
properties:
paid_bookings:
type: boolean
max_api_rate:
type: number
api_calls_per_day:
type: number
required:
- paid_bookings
- max_api_rate
- api_calls_per_day
required:
- plan
- status
- interval
- period_end
- usage
- features
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: getV1Subscription
x-operation-id-source: derived
/v1/subscription/checkout:
post:
tags:
- Subscription
summary: Create checkout session
description: Creates a Stripe Checkout Session for upgrading to a paid plan. Returns a URL to redirect the user to Stripe's hosted checkout page.
requestBody:
content:
application/json:
schema:
type: object
properties:
plan:
type: string
enum:
- starter
- pro
- business
interval:
type: string
enum:
- monthly
- annual
default: monthly
required:
- plan
responses:
'200':
description: Checkout session created
content:
application/json:
schema:
type: object
properties:
checkout_url:
type: string
required:
- checkout_url
'400':
description: Invalid plan or price not configured
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'409':
description: Already subscribed to this plan
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: postV1SubscriptionCheckout
x-operation-id-source: derived
/v1/subscription/portal:
post:
tags:
- Subscription
summary: Create customer portal session
description: Creates a Stripe Customer Portal Session for managing the existing subscription. The portal handles payment method updates, plan changes, cancellations, and invoice history.
responses:
'200':
description: Portal session created
content:
application/json:
schema:
type: object
properties:
portal_url:
type: string
required:
- portal_url
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
'404':
description: No Stripe Customer exists
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
additionalProperties:
nullable: true
required:
- code
- message
required:
- error
operationId: postV1SubscriptionPortal
x-operation-id-source: derived
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: API key authentication. Use your API key as the bearer token.