Billing
Stripe billing: plans, self-service portal, subscription status, and usage tracking.
Rensei uses Stripe for subscription management and usage-based billing. This page covers the tenant-facing billing experience: plan selection, the self-service portal, subscription status, and how metered usage is tracked and invoiced.
Plans and subscriptions
Each organization is associated with a Stripe subscription. Plans are defined in plan_definitions and referenced by organizations.planSlug.
Initiating a checkout session
To upgrade a plan, the platform creates a Stripe Checkout session:
# Via the Rensei API (bearer-authenticated)
curl -X POST https://rensei.ai/api/billing/checkout \
-H "Authorization: Bearer rsk_live_..." \
-H "Content-Type: application/json" \
-d '{
"priceId": "price_...",
"successUrl": "https://app.rensei.ai/settings/billing?success=1",
"cancelUrl": "https://app.rensei.ai/settings/billing"
}'
# Returns: { "url": "https://checkout.stripe.com/..." }The org must have a Stripe customer ID linked before a Checkout session can be created. New orgs receive a customer record automatically during provisioning.
Self-service billing portal
Members with the billing permission can open the Stripe Customer Portal to:
- Update payment methods
- Download past invoices
- Upgrade or downgrade the subscription
- Cancel the subscription
curl -X POST https://rensei.ai/api/billing/portal \
-H "Authorization: Bearer rsk_live_..." \
-H "Content-Type: application/json" \
-d '{ "returnUrl": "https://app.rensei.ai/settings/billing" }'
# Returns: { "url": "https://billing.stripe.com/session/..." }In the platform UI, navigate to Settings → Billing → Manage Billing to open the portal directly.
Metered usage billing
Rensei tracks two categories of metered usage per organization:
| Category | Tracked as | Billing event |
|---|---|---|
| Agent sessions | Count of agent_sessions rows per billing period | Per-session charge or included in plan |
| LLM inferences | Token counts in llm_inferences rows | Per-token charge, provider-specific rate |
Usage is aggregated at the end of each billing period and reported to Stripe as usage records on the subscription's metered line items.
Metered LLM mode
When organizations.features.metered_enabled is true, agents can use Rensei's managed LLM key pool instead of supplying their own API keys. Costs are billed to the organization at a platform markup. See LLM Auth Modes for details on enabling metered mode.
Metered mode availability is controlled by Rensei platform operators. Contact Rensei support if you need metered mode enabled for your organization.
Subscription status checks
The current subscription status is available from:
curl https://rensei.ai/api/billing/status \
-H "Authorization: Bearer rsk_live_..."
# Returns:
# {
# "plan": "growth",
# "status": "active",
# "currentPeriodEnd": "2026-07-01T00:00:00Z",
# "meteredEnabled": true,
# "sessionCount": 142,
# "llmTokens": 4280000
# }Related pages
- Org Hierarchy - org feature flags that govern plan entitlements
- LLM Auth Modes - metered vs BYOK vs shared key modes
- Observability - audit events for billing operations