TheDocumentation 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.
Customer interface provides payment and item management functionality that is shared between users and teams. Both CurrentUser and Team types extend this interface, allowing them to create checkout URLs and manage items.
This interface is automatically available on:
CurrentUserobjectsTeamobjectsServerUserobjects (with additional server-side capabilities)ServerTeamobjects (with additional server-side capabilities)
Table of Contents
Properties
Methods
Related Types
These types are returned by the methods above. You’ll encounter them when working with billing, products, and invoices.CustomerBilling
Returned by getBilling() / useBilling().
CustomerProduct
Returned by listProducts() / useProducts(). The return value is an array of CustomerProduct with a nextCursor: string | null property for pagination.
CustomerInvoice
Returned by listInvoices() / useInvoices(). The return value is an array of CustomerInvoice with a nextCursor: string | null property for pagination.
Payment Workflow
Usage Notes
- Purchases: When a user completes a purchase, associated items are automatically added
- Subscriptions: Recurring subscriptions automatically replenish items at the specified intervals
- Manual allocation: Server-side code can manually adjust item quantities using
ServerItemmethods - Race conditions: Use
tryDecreaseQuantity()for atomic, race-condition-free item consumption