Operations: Billing¶
Billing collection is disabled by default and must be enabled explicitly.
Enablement model¶
Billing requires both:
- Global runtime switch:
BILLING_ENABLED=true. - UI app setting:
billing_enabled=true.
Manual daily collection¶
curl -X POST "http://localhost:8000/api/internal/billing/collect/daily?day=YYYY-MM-DD" \
-H "X-Internal-Token: <INTERNAL_CRON_TOKEN>"
Scheduler integration¶
- Compose scheduler calls daily collection with configurable day offset.
- Helm supports
billingCronJobvalues (schedule,dayOffset, token).
Retention¶
Billing daily tables are purged by the shared DataRetentionService (used by billing and quota jobs).
BILLING_DAILY_RETENTION_DAYS(default365)0disables billing purge