For the complete documentation index, see llms.txt. This page is also available as Markdown.

Consumption Pool and Offline Checkout Events

Events for consumption, limit thresholds, pool resets, and offline checkout activity.

These events report usage as it occurs. They cover consumption by licenses, product features, and consumption pools, plus limits and offline device checkouts.

Use these events to feed usage into billing systems or warn customers before their units run out. This avoids polling the License API. Use the event data objects reference for field definitions.

The consumption_pool.* and offline checkout events require consumption pools to be enabled for your account.

Email notifications for consumption limits keep working next to these events. See Events and email notifications.

Effective limits

The *_max_reached events use the effective limit of the license, feature, or pool.

Owner
Effective limit

License or feature outside a pool

max_consumptions (max_consumption for a feature), plus max_overages when overages are allowed

License or feature in a pool

Its own max_consumptions only. The pool provides overages.

Pool

The pool's max_consumptions, plus max_overages when overages are allowed

An owner is unlimited when allow_unlimited_consumptions is enabled, or when overages are allowed with max_overages set to 0. Unlimited owners never emit a *_max_reached event.

License events

license.consumption_added

Publisher: license-api

Sent when:

  • an Add Consumption call succeeds, including calls with a negative consumptions value, and

  • a device deactivates and reports consumption that changes the license total.

Event data: license, device, license_user when the license has a user, request_info, and consumption_info.

license.consumption_max_reached

Publisher: license-api

Sent when: an Add Consumption call succeeds and leaves the license total at or above its effective limit. It is sent together with license.consumption_added for the same call.

Event data: The same sections as license.consumption_added.

LicenseSpring rejects consumption that would exceed the limit. license.consumption_max_reached is emitted by the call that reaches the limit exactly.

Requests that skip past the limit fail with license_not_enough_consumptions and emit no event. After negative consumption or a reset reduces the total, the event is emitted again when the limit is reached.

Product feature events

license_product_feature.consumption_added

Publisher: license-api

Sent when: an Add Feature Consumption call succeeds, including negative values.

Event data: license_product_feature, license, device, optional license_user, request_info, and consumption_info.

license_product_feature.consumption_max_reached

Publisher: license-api

Sent when: an Add Feature Consumption call succeeds and leaves the feature total at or above its effective limit.

Event data: The same sections as license_product_feature.consumption_added.

Pool events

consumption_pool.consumption_added

Publisher: license-api

Sent when: a license or feature that belongs to a pool records consumption through Add Consumption or Add Feature Consumption. Negative values send it too.

Not emitted when: The device consumes units already reserved in an open offline checkout. The pool was charged when the units were reserved, so only the member event is emitted.

Event data: consumption_pool, license, license_product_feature for feature pools only, device, optional license_user, request_info, and consumption_info.

consumption_pool.consumption_max_reached

Publisher: license-api

Sent when: a pooled consumption succeeds and leaves the pool total at or above the pool's effective limit. Never sent for an unlimited pool.

Event data: The same sections as consumption_pool.consumption_added.

consumption_pool.reset

Publisher: platform

Sent when: someone resets a pool from the vendor platform or with the Management API. The reset sets the pool total and every member's total to zero.

Not emitted when: The pool resets on its schedule through its consumption period.

Event data: consumption_pool, showing the pool after the reset.

Offline checkout events

When a device activates a pooled license offline, it reserves a block of pool units as a checkout. The device later reports its usage and returns unused units to the pool. See Offline Checkouts.

consumption_pool_license_checkout.checked_out

Publisher: license-api

Sent when: an offline activation of a license in a license pool reserves a new checkout. A re-activation that reuses an open checkout sends nothing.

Event data: license, consumption_pool, consumption_pool_checkout, device, optional license_user, and request_info.

consumption_pool_license_checkout.synced

Publisher: license-api

Sent when: the device deactivates and the checkout is settled. The units the device did not use go back to the pool.

Event data: The same sections as checked_out, with final consumed and returned values.

consumption_pool_license_feature_checkout.checked_out and .synced

The same as the two events above, for a product feature in a feature pool. They also carry the license_product_feature section. One offline activation sends one feature checked_out event per pooled feature that gets a new checkout.

These events are not new, and still fire on every successful consumption:

  • license.updated after Add Consumption, with the license's new totals.

  • license_product_feature.updated after Add Feature Consumption, with the feature's new totals.

When consumption events are not emitted

  • The request fails for any reason, including reaching a limit.

  • The request is a replay of an earlier call with the same Idempotency-Key. See Retrying consumption calls safely.

  • A total changes in the vendor platform or the Management API, for example when you reset consumptions on a single license or edit a limit. Of these changes, only a manual pool reset sends a consumption event.

Last updated

Was this helpful?