Billing API
Overview
Section titled “Overview”Access your current subscription details, plan quotas, and usage metrics. Billing endpoints are read-only via the Public API.
Authentication
Section titled “Authentication”All endpoints require either a JWT token or an API key (gf_...) in the Authorization header.
Endpoints
Section titled “Endpoints”| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /api/v1/billing/subscription | read:billing | Current subscription and plan features |
| GET | /api/v1/billing/usage | read:billing | Current period usage metrics |
| GET | /api/v1/billing/invoices | read:billing | Invoice history |
Examples
Section titled “Examples”Get Current Subscription
Section titled “Get Current Subscription”curl https://devcore.getghostflow.io/api/v1/billing/subscription \ -H "Authorization: Bearer gf_your_api_key"const response = await fetch('https://devcore.getghostflow.io/api/v1/billing/subscription', { headers: { 'Authorization': `Bearer ${API_KEY}` },});const subscription = await response.json();import requests
resp = requests.get( "https://devcore.getghostflow.io/api/v1/billing/subscription", headers={"Authorization": f"Bearer {api_key}"},)subscription = resp.json()Response 200 OK:
{ "plan": "professional", "status": "active", "features": { "maxCampaigns": 100, "maxCustomDomains": 20, "maxEvents": 5000000, "aiCloaking": true, "abTesting": true, "apiAccess": true }, "currentPeriodStart": "2025-06-01T00:00:00Z", "currentPeriodEnd": "2025-07-01T00:00:00Z"}Get Usage Metrics
Section titled “Get Usage Metrics”curl https://devcore.getghostflow.io/api/v1/billing/usage \ -H "Authorization: Bearer gf_your_api_key"