Skip to main content

API Routes

HostMetrics has 16 API routes organized by feature domain. Most data operations happen client-side via Supabase JS; API routes are used for server-side operations only.

Route Reference

Turo Integration

Toll Management

Stripe Billing

Integrations

Public / Shared

Webhook Events (Stripe)

The /api/stripe/webhook endpoint processes these Stripe events:

Authentication Patterns

Bearer Token — Used by Chrome extension and toll sync. Token is the Supabase access_token:
Session — Used by browser-initiated API calls. Supabase session cookie is automatically included. Stripe Signature — Webhook validates using stripe.webhooks.constructEvent() with the signing secret. Token in URL — Investor portal/report links use a unique token in the URL path for access control.