You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/billing/README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,24 @@ Consumers should NOT retry on `applied: true` — the outbox handles eventual co
105
105
106
106
## Meter hardening configuration
107
107
108
-
Defaults live in `modules/billing/config/billing.development.config.js` and can be overridden by downstream project config:
108
+
### Configuration knobs
109
+
110
+
| Knob | Type | Devkit default | Notes |
111
+
|------|------|----------------|-------|
112
+
|`billing.meter.runBase`| number | 1 | METER_RUN_BASE base unit cost |
113
+
|`billing.meter.fallbackPlanId`| string \| null | null | Fallback plan when active not resolvable |
114
+
|`billing.meter.dollarsToUnitRatio`| number | 1000 | Dollar → unit conversion. DOWNSTREAM-OVERRIDE-REQUIRED. Constant fallback: `getDollarsToUnitRatio()`|
115
+
|`billing.meter.maxUnitsPerOperation`| number | 10000 | Cap per single attribute call (dev config). Constant fallback: `Infinity` via `getMaxUnitsPerOperation()`|
116
+
|`billing.meter.ratioVersion`| string \| null | '2026.05' | DOWNSTREAM-OVERRIDE-REQUIRED — pricing version namespace. Read directly from config, no constant wrapper |
117
+
|`billing.outbox.maxRetryAttempts`| number | 5 | Outbox retry limit before exhausted |
118
+
|`billing.outbox.retryIntervalSec`| number | 300 | Cron retry interval |
|`billing.alerts.thresholdPercents`| number[]|[80, 100]| Schema-supported only — others warn at boot, alert silently skipped. Constant fallback: `getAlertThresholdPercents()`|
122
+
|`billing.events.extrasExhausted`| string | 'billing.extras_debit.exhausted' | Event name for downstream alerting |
123
+
|`billing.defaultPlan`| string | 'free' | Default plan ID for fallback. Constant fallback: `getDefaultPlanId()`|
124
+
125
+
Canonical constant fallbacks live in `modules/billing/lib/billing.constants.js`. Downstream project overrides go in `modules/billing/config/billing.development.config.js`:
0 commit comments