API Reference
Billing
BrowseFleet uses metered billing powered by Stripe. You are charged per browser-hour of active session time. Self-hosted instances can run without Stripe configuration.
Pricing Tiers
| Tier | Base Price | Rate | Concurrent Sessions | Daily Requests |
|---|---|---|---|---|
| Hobby | Free | $0.10/hr | 5 | 500 |
| Starter | $29/mo | $0.10/hr | 10 | 1,000 |
| Developer | $99/mo | $0.08/hr | 20 | Unlimited |
| Pro | $499/mo | $0.05/hr | 100 | Unlimited |
How Metered Billing Works
BrowseFleet tracks the duration of each browser session. When a session is released or expires, the total time is recorded as "browser hours" and reported to Stripe as a metered usage event. You are billed at the end of each billing cycle for total browser hours consumed.
Usage Statistics
/v1/usageGet usage statistics for the authenticated API key. Shows total sessions, browser hours, and daily breakdown.
Response
{
"totalSessions": 1250,
"activeSessions": 3,
"totalBrowserHours": 456.7,
"todayBrowserHours": 12.3,
"todayApiCalls": 89,
"daily": [
{
"date": "2026-04-02",
"sessions": 45,
"browserHours": 12.3,
"apiCalls": 89
},
{
"date": "2026-04-01",
"sessions": 52,
"browserHours": 15.1,
"apiCalls": 102
}
],
"currentPeriod": {
"start": "2026-04-01T00:00:00.000Z",
"end": "2026-05-01T00:00:00.000Z"
}
}curl https://api.browsefleet.com/v1/usage \
-H "x-api-key: bf_your_api_key"Stripe Integration Endpoints
/v1/billing/checkoutCreate a Stripe Checkout session for new subscription signup. Returns a URL to redirect the user to Stripe's hosted checkout page.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
successUrl | string | No | — | URL to redirect to after successful checkout. |
cancelUrl | string | No | — | URL to redirect to if checkout is cancelled. |
Response
{
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_...",
"sessionId": "cs_live_..."
}/v1/billing/portalCreate a Stripe Customer Portal session for managing subscription, payment methods, and invoices.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
returnUrl | string | No | — | URL to redirect to after leaving the portal. |
Response
{
"portalUrl": "https://billing.stripe.com/p/session/..."
}/v1/billing/webhookStripe webhook endpoint. Handles checkout.session.completed (creates API key), customer.subscription.deleted (deactivates key), and invoice.payment_failed (deactivates key). Requires stripe-signature header.
Self-Hosted Billing
Stripe integration is optional. If STRIPE_SECRET_KEY is not set, billing endpoints return HTTP 503 and usage is still tracked locally in SQLite but not reported to Stripe. You can use the usage endpoint for your own billing implementation.