API Reference

Complete API documentation for the Lumen billing platform

API Reference

Welcome to the Lumen API reference. This documentation covers all available endpoints for managing your billing, subscriptions, and usage-based pricing.

Authentication

All API requests require authentication using a Bearer token. Include your secret API key in the Authorization header:

curl -X GET "https://api.getlumen.dev/v1/customers" \
  -H "Authorization: Bearer sk_live_..."

Never expose your secret API key in client-side code. Use publishable keys for frontend integrations.

Base URL

All API endpoints are relative to:

https://api.getlumen.dev/v1

Resources

Core Resources

ResourceDescription
CustomersManage customer accounts
PlansDefine subscription plans with features
PricesConfigure pricing for plans
SubscriptionsManage customer subscriptions

Billing

ResourceDescription
InvoicesView and manage invoices
PaymentsTrack payment history
Payment MethodsManage customer payment methods

Usage & Metering

ResourceDescription
EventsIngest usage events for metering
MetricsDefine and query usage metrics
EntitlementsCheck feature access
CreditsManage credit balances

Features & Configuration

ResourceDescription
FeaturesDefine product features
Pricing TablesConfigure embeddable pricing tables
TaxTax configuration
API KeysManage API keys

Seat-Based Billing

ResourceDescription
SeatsManage seat-based subscriptions
EnrollmentAuto-enrollment rules

Merchant & Payment Providers

ResourceDescription
MerchantsMerchant account management
StripeStripe configuration
DodoDodo Payments configuration

Integrations

ResourceDescription
WebhooksAuth provider webhooks
PublicClient-side payment endpoints

Rate Limits

The API enforces rate limits to ensure stability:

  • Standard: 100 requests per minute
  • Events ingestion: 1000 events per minute

Error Handling

The API uses standard HTTP status codes:

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limited
500Internal Server Error

On this page