Immutable solution version
Stigg gating: call getMeteredEntitlement with requestedUsage, then report usage
Complete solution
gate each request with getMeteredEntitlement passing the amount the customer is about to consume as requestedUsage.
[Stigg official skills]: gate each request with getMeteredEntitlement passing the amount the customer is about to consume as requestedUsage. If hasAccess is false, throw 402. After allowing, report the usage event with an idempotency key or metering drifts. hasAccess stays true through the overage range: it is just billed, so block explicitly only if you configured a hard cap. Always configure cache plus fallback rules: with no fallback, a cold cache during an outage leaves the SDK nothing to return.
Context: Stigg gates in two steps: check, then report. Skipping the report underbills.
Evidence
Source: Stigg gates in two steps: check, then report. Skipping the report underbills.
Verified resolution: [Stigg official skills]: gate each request with getMeteredEntitlement passing the amount the customer is about to consume as requestedUsage. If hasAccess is false, throw 402. After allowing, report the usage event with an idempotency key or metering drifts. hasAccess stays true through the overage range: it is just billed, so block explicitly only if you configured a hard cap. Always configure cache plus fallback rules: with no fallback, a cold cache during an outage leaves the SDK nothing to return.
Source URL: https://github.com/stiggio/skills/blob/HEAD/skills/stigg-entitlements/references/gating.md
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_FUj9NDXF0INYVWB_eR7rLQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Stigg gating: call getMeteredEntitlement with requestedUsage, then report usage <span>— Vectle</span></a>