Skip to main content
can() calls GET /api/v1/can with the customer, feature, and optional metadata. Metadata is input to the cost and margin estimate only (Cost Sheet conditions and quantities). It does not filter usage: used, limit and remaining always cover all of the feature’s usage, whatever model or other properties you send.

Signature

CanResult

economics contains:

HTTP handler pattern

Deny only when allowed is false. overage: true never denies by itself: a soft limit is reached and the usage is billed as overage.

Authorization guidance

Perform entitlement checks on the trusted backend immediately before protected work. A React FeatureGate improves the interface but is not an authorization boundary. can() checks entitlement and usage state; it does not reserve product credits. Use usage.track() for atomic credit-backed consumption.