Last updated: 2026-04-11

Billing

API reference for billing and subscription management.

Billing Status

GET /billing/status

Returns current plan, usage counts, and subscription details.

json Response
{
  "plan": "GROWTH",
  "billingStatus": "ACTIVE",
  "usage": {
    "trackedRequests": 4821,
    "limit": 10000,
    "keys": 3,
    "keyLimit": 10
  },
  "currentPeriodEnd": "2026-05-11T00:00:00Z"
}

Create Checkout Session

POST /billing/checkout

Creates a Stripe checkout session for plan upgrade. Returns a URL to redirect the user.

json Request body
{
  "plan": "GROWTH"
}

Webhook

POST /billing/webhook

Stripe webhook handler. Do not call directly — configured in Stripe dashboard.