5.2 KiB
5.2 KiB
BalanceFeature
The full feature object if expanded.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | The unique identifier for this feature, used in /check and /track calls. |
name |
str | ✔️ | Human-readable name displayed in the dashboard and billing UI. |
type |
models.BalanceType | ✔️ | Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools. |
consumable |
bool | ✔️ | For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage). |
event_names |
List[str] | ➖ | Event names that trigger this feature's balance. Allows multiple features to respond to a single event. |
credit_schema |
List[models.BalanceCreditSchema] | ➖ | For credit_system features: maps metered features to their credit costs. |
display |
Optional[models.BalanceDisplay] | ➖ | Display names for the feature in billing UI and customer-facing components. |
archived |
bool | ✔️ | Whether the feature is archived and hidden from the dashboard. |