Skip to main content

Billing API Reference

Endpoints

MethodEndpointDescription
GET/api/billing/subscriptionGet current subscription
POST/api/billing/checkoutCreate Stripe checkout session
POST/api/billing/portalCreate Stripe billing portal
GET/api/billing/usageGet usage metrics
POST/api/billing/token-packsPurchase token pack

Webhooks

Stripe events are processed automatically. Supported events:

  • checkout.session.completed — Subscription created
  • invoice.paid — Payment received
  • customer.subscription.updated — Plan changed
  • customer.subscription.deleted — Subscription cancelled