Skip to content

Billing API

MethodPathPurpose
GET/dashboard/billingCurrent plan, usage, and limits
GET/dashboard/usageDaily usage history
POST/dashboard/billing/checkoutStart upgrade checkout
POST/dashboard/billing/portalOpen billing portal
GET /dashboard/usage?startDate=2026-01-01&endDate=2026-01-31&meterType=ai_tokens
ParameterDescription
startDateStart of range (ISO date)
endDateEnd of range (ISO date)
meterTypeFilter: storage_bytes, ai_tokens, lambda_invocations, bandwidth_bytes
MethodPathPurpose
POST/v1/{app_id}/billing/connect/onboardStart Connect onboarding
GET/v1/{app_id}/billing/connect/statusCheck onboarding status
MethodPathPurpose
POST/v1/{app_id}/billing/plansCreate a plan
GET/v1/{app_id}/billing/plansList plans
PUT/v1/{app_id}/billing/plans/{plan_id}Update a plan

Create:

{
"name": "Pro Plan",
"priceCents": 999,
"interval": "month",
"features": ["Feature 1", "Feature 2"]
}
MethodPathPurpose
POST/v1/{app_id}/billing/productsCreate a product
GET/v1/{app_id}/billing/productsList products
PUT/v1/{app_id}/billing/products/{product_id}Update a product

Create:

{
"name": "Premium Template",
"priceCents": 2999,
"description": "50+ templates",
"metadata": { "category": "templates" }
}
MethodPathPurpose
POST/v1/{app_id}/billing/subscribeStart subscription
GET/v1/{app_id}/billing/subscriptionCurrent subscription
POST/v1/{app_id}/billing/cancelCancel at period end
POST/v1/{app_id}/billing/purchasePurchase a product
GET/v1/{app_id}/billing/ordersList orders
GET/v1/{app_id}/billing/orders/{order_id}Get order details
POST /webhooks/stripe/connect

Set STRIPE_CONNECT_WEBHOOK_SECRET in the control API environment.

Handled events: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted, invoice.payment_succeeded, invoice.payment_failed, payment_intent.payment_failed, charge.refunded