Billing API

Portal billing endpoints for subscription management, invoices, and Stripe integration.

GET /api/billing/subscription

Get the current organization’s subscription details.

Auth: Required (portal session)

Response:

{ "subscription": { "plans": { "website": { "tier": "standard", "displayName": "Website Standard", "amount": 179 }, "ops": { "tier": "core", "displayName": "Ops Core", "amount": 249 }, "analytics": { "tier": "insight", "displayName": "Analytics Insight", "amount": 249 } }, "bundleKey": "professional", "addons": [ { "key": "seo_boost", "displayName": "SEO Boost", "amount": 250 } ], "totalMRR": 927, "status": "active", "billingFrequency": "monthly", "currentPeriodEnd": "2026-03-01T00:00:00Z", "cancelAtPeriodEnd": false } }

GET /api/billing/invoices

List invoices for the current organization.

Auth: Required

Query params:

ParamTypeDescription
limitnumberMax invoices to return (default: 10)
starting_afterstringCursor for pagination

Response: Array of Stripe invoice objects.

POST /api/billing/portal

Create a Stripe Customer Portal session for self-service billing management.

Auth: Required

Response: { url: "https://billing.stripe.com/session/..." }

Redirect the user to this URL to manage their subscription, payment methods, and invoices.

Last updated on