Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-apps-support.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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 Stack Auth’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.