Paywall Tokenization
This feature only available when paywall is in client mode.
Learn how to implement tokenized paywalls that limit user actions based on purchased quotas.
What is tokenization? Tokenization allows you to create subscription plans that include specific token allocations for different actions. Users consume tokens when performing actions, and their token quota is replenished monthly when their subscription renews. This is ideal for API-based services, AI applications, and metered usage business models.
How Tokenization Works
Token Types Matter: Different action types consume different amounts of tokens. Configure your action types to reflect the actual cost of operations - expensive AI calls should consume more tokens than simple data retrieval.
Overview
Tokenized paywalls provide:
- Subscription with token quotas - Users pay for subscription plans that include specific token allocations
- Monthly token renewal - Token quotas are replenished when subscription renews each month
- No custom auth server needed - Tokens are stored and managed on our servers, eliminating the need to build your own authorization infrastructure for third-party API providers
- Trial systems - Offer free trial quotas to new users before subscription
- Multiple action types - Different token costs for different types of operations
- Automatic enforcement - Built-in quota tracking and blocking when tokens are depleted
Tokenization vs Regular Paywalls
Feature | Regular Paywall | Tokenized Paywall |
---|---|---|
Access Model | Unlimited access within subscription | Token-limited access within subscription |
Billing | Subscription for unlimited usage | Subscription with included token quotas |
Token Management | No tokens | Monthly token allocation with subscription renewal |
User Experience | Pay subscription, unlimited access | Pay subscription, use allocated tokens |
Best For | Content, features, unlimited usage | APIs, AI services, metered usage |
Architecture Benefits
Serverless Authorization
One of the key advantages of tokenized paywalls is that you don’t need to build your own authorization server:
- Centralized token management - All user tokens are stored and managed on our platform
- Automatic token passing - When your users make API calls through API providers, tokens are automatically passed to the target endpoints
- No infrastructure overhead - Skip building authentication, billing, and quota management systems
- Ready-to-use integration - Simply configure API providers and start using existing third-party services
Traditional approach (requires custom server):
User → Your Auth Server → Check billing → Forward to API → Return response
Tokenized paywall approach (no server needed):
User → API Provider (with tokens) → Target API → Return response
Perfect for third-party APIs: If you want to monetize access to existing APIs (OpenAI, external services, etc.), you can do so without building any backend infrastructure for authentication or billing.
How to enable tokenization?
Step 1: Enable Tokenization
When creating or editing a paywall, choose the tokenization option:
- Navigate to paywall settings
- Select paywall type: “With tokenization”
Prerequisites: After enabling tokenization, ensure you have API providers configured for the endpoints you want to tokenize.
Step 2: Configure Tokenized Actions
Define what actions users can perform and their limits:
Action Configuration
For each tokenized action, specify:
Field | Description | Example |
---|---|---|
Count | Number of queries allowed per month | 100, 1000, 10000 |
Type | Action category/tier | Standard, Advanced |
Name | Display name for the action | ”Text Generation”, “Image Analysis” |
Description | Optional description of the action | ”Generate AI text responses” |
Trial Queries | Free trial quota for new users | 0, 5, 10, 50 |
Why Use Different Action Types?
Action types allow you to allocate different token quantities based on the cost and complexity of your API endpoints. This enables you to:
- Differentiate API costs - Expensive AI models consume more tokens than simple API calls
- Create balanced plans - Offer more tokens for cheap operations, fewer for expensive ones
Example Token Allocation:
- Pro API calls: 200 tokens (expensive AI processing)
- Standard API calls: 1000 tokens (basic data processing)
- Basic operations: 5000 tokens (simple requests)
Available Action Types
Standard Tiers
Standard Action Types (Lower Cost Operations):
Action Type Mapping: When creating an API provider, you must specify which action type it uses (Standard, Advanced, etc.). This determines which type of tokens will be deducted when users call that specific API provider. For example, if an API provider is configured as “Advanced” type, it will consume tokens from the user’s “Advanced” token allocation.
Step 3: Add Multiple Actions
You can configure up to 5 different tokenized actions:
- Click “Add Query” to create additional action types
- Configure each action with different quotas
- Remove actions using the “Remove Query” button (minimum 1 required)
Limit: You can have a maximum of 5 tokenized actions per paywall. Plan your action types carefully to cover all your use cases.
Implementation Requirements
Token and Subscription Management
The system automatically:
- Tracks token consumption across all tokenized actions
- Enforces limits when token quotas are exhausted
- Replenishes tokens monthly when subscription renews
- Handles token depletion by blocking additional requests until renewal
- Manages subscription billing with included token allocations
- Centralized token storage - All tokens are stored on our servers and passed to API providers during calls, removing the need for custom authorization infrastructure
Troubleshooting
Tokenization option not available
Possible causes:
- Paywall is in server mode (tokenization only works in client mode)
- No API providers configured
Solution:
- Switch to client mode
- Configure at least one API provider
- Ensure API providers are properly connected
Next Steps
After configuring tokenization: