Billing
Truss includes a built-in billing system with plan tiers, usage metering, and quota enforcement. The billing module is fully managed from the dashboard and API.
Plan Tiers
Truss offers four plan tiers. Each tier defines limits for database size, storage, authentication MAU (monthly active users), API requests, branches, and webhooks.
| Feature | Starter ($9/mo) | Pro ($29/mo) | Team ($89/mo) | Business ($299/mo) |
|---|---|---|---|---|
| Projects | 1 | 5 | 25 | Unlimited |
| Database size | 1 GB | 15 GB | 100 GB | 500 GB |
| Storage | 2 GB | 150 GB | 500 GB | 2 TB |
| Auth MAU | 2,000 | 100,000 | 500,000 | 2,000,000 |
| Bandwidth | 5 GB | 100 GB | 500 GB | 5 TB |
| Database branches | 0 | 5 | 20 | Unlimited |
| API rate limit / min | 100 | 1,000 | 5,000 | 50,000 |
| Seats | 1 | 1 | 5 (+$15/seat) | 10 (+$15/seat) |
| Feature flags | 15 | 75 | 300 | Unlimited |
| Flag segments | 10 | 30 | 150 | Unlimited |
| Flag evaluations / mo | 100K | 2M | 10M | Unlimited |
| Flag log retention | 7 days | 30 days | 90 days | 365 days |
| Gateway rules | 50 | 150 | 500 | Unlimited |
Plans are enforced server-side. When a quota is exceeded, the API returns 403 Forbidden with a reason field explaining which limit was hit.
Checking your current plan
curl http://localhost:8787/api/billing/planReturns the active plan tier, current usage, limits, and billing period dates.
Switching plans
Plan changes are handled through the checkout flow. From the dashboard, navigate to Billing and click the plan you want to switch to.
Usage Metering and Quotas
Truss continuously tracks usage across several dimensions:
Database size
Measured via pg_database_size(). Checked on every write operation and periodically in the background.
Storage size
Measured by summing object sizes across all S3 buckets for the tenant.
Auth MAU
Counted by querying Ory Kratos for unique identities that had at least one session in the current billing period.
API requests
Tracked in-memory per billing period. The counter increments on every /v1/* request.
Quota enforcement
# Check a specific quotacurl http://localhost:8787/api/billing/quota?resource=branchReturns:
{ "allowed": true, "current": 2, "limit": 5, "resource": "branch"}When allowed is false, the response includes a reason string (e.g., "Branch limit reached (5/5). Upgrade to Team for 20 branches.").
Usage snapshots
Truss periodically writes usage snapshots for historical billing reports and trend charts in the dashboard.
curl http://localhost:8787/api/billing/usageReturns current-period usage across all metered dimensions.
Booster Packs
Booster packs let you add capacity to a specific resource without upgrading your entire plan. They are one-time purchases that extend your limits for the current billing period.
Available boosters:
| Booster | Amount | Description |
|---|---|---|
| Extra storage | +10 GB | Extends S3 storage quota |
| Extra MAU | +5,000 | Extends authentication MAU quota |
| Extra API requests | +500,000 | Extends monthly API request quota |
| Extra branches | +5 | Extends database branch quota |
Purchasing a booster
From the dashboard, navigate to Billing > Boosters and click the booster you need.
Viewing active boosters
curl http://localhost:8787/api/billing/boostersReturns all active boosters for the current billing period with their quantities and expiry dates.
How boosters affect limits
Boosters are additive. If your Pro plan includes 25 GB of storage and you purchase an extra 10 GB booster, your effective limit becomes 35 GB.
Billing Dashboard
The billing panel in the dashboard provides a comprehensive view of your account:
Overview
- Current plan — your active tier with a summary of included limits
- Billing period — start and end dates of the current cycle
- Payment method — managed via the customer portal
Usage meters
Visual progress bars for each metered resource:
- Database size (current / limit)
- Storage size (current / limit)
- Auth MAU (current / limit)
- API requests (current / limit)
- Branches (current / limit)
- Webhooks (current / limit)
Each meter is color-coded:
- Green — under 60% usage
- Amber — 60-85% usage
- Red — over 85% usage
Plan comparison
A side-by-side comparison of all plan tiers, highlighting your current plan and showing upgrade paths.
Invoice history
Past invoices and payment history are accessible via the customer portal link in the billing panel.
Settings (Key-Value Store)
Billing and account settings are stored as key-value pairs. The API provides helpers for reading and writing settings:
# Get all settingscurl http://localhost:8787/api/billing/settings
# Update a settingcurl -X PUT http://localhost:8787/api/billing/settings \ -H "Content-Type: application/json" \ -d '{"key": "org_name", "value": "Acme Corp"}'Common settings keys include: plan_id, org_name, billing_email.
Audit Logging
Truss maintains a cross-module audit trail. Every significant action is logged with context.
What gets logged
- Authentication — user creation, deletion, state changes, session revocations
- Authorization — permission checks, tuple modifications, OPL updates
- Database — branch creation/deletion, backup creation/restore, schema changes
- Billing — plan changes, booster purchases, quota enforcement events
- Storage — bucket creation/deletion, policy changes
- API keys — key creation, revocation
- Webhooks — creation, deletion, test fires, enable/disable
Viewing audit logs
curl "http://localhost:8787/api/billing/audit-logs?limit=50&offset=0"Each log entry includes:
action— the action type (e.g.,branch.create,key.revoke,plan.change)actor— who performed the action (user ID orsystem)target— what was affected (resource type and ID)metadata— additional context as JSON (e.g., old plan, new plan)created_at— timestamp
Filtering
# Filter by action typecurl "http://localhost:8787/api/billing/audit-logs?action=branch.create"
# Filter by date rangecurl "http://localhost:8787/api/billing/audit-logs?from=2025-01-01&to=2025-01-31"
# Search by keywordcurl "http://localhost:8787/api/billing/audit-logs?search=backup"Dashboard
The Settings > Audit Log panel provides a filterable, paginated view of all audit entries with:
- Action type filter dropdown
- Free-text search
- Date range picker
- Expandable rows showing full metadata JSON
Retention
Audit logs are retained indefinitely by default. You can configure a retention period by setting the audit_log_retention_days key in billing settings.