Items represent quantifiable resources in your application, such as credits, API calls, storage quotas, or subscription allowances. They can be associated with users, teams, or custom customers and are managed through Hexclave’s payment system.
On this page:
Item
The Item type represents a quantifiable resource that can be consumed or managed within your application. Items are typically obtained through purchases, subscriptions, or manual allocation.
Items can be retrieved through:
Table of Contents
Properties
ServerItem
The ServerItem type extends Item with additional server-side methods for modifying quantities. This type is only available in server-side contexts and provides race-condition-safe operations for managing item quantities.
Server items can be retrieved through:
Table of Contents
Methods
The tryDecreaseQuantity() method is particularly valuable for prepaid credit
systems where operations require sufficient balance verification before
proceeding.