Usage Gate

Reference

Feature types

Every feature on your rules graph has one type. Pick the type when you define rules; the SDK still uses the same featureKey string either way.

BOOLEAN

On/off gate (PDF export, SSO). Balance is treated as 0|1. consume acts as a check and does not burn.

NUMERIC_LIMIT

Hard cap (seats, projects, exports this month). Consume decrements remaining quota.

METERED

Consumable credits (AI tokens, API units). Atomic consume ensures two parallel requests cannot both succeed on the last credit.

Billing period (resetAt)

Each entitlement can carry a resetAt timestamp. After that moment, effective balance is 0 until the next grant. For paid users, Stripe sets resetAt from the subscription's current_period_end on every invoice / subscription update. UsageGate does not auto-refill on a calendar — read How billing periods work.