User Credits
The User Credits system, powered by the Token Management add-on, allows you to control and monetize the use of AI features on your site. You can set usage limits for different user roles and sell "token packages" through WooCommerce, giving your users a way to pay for their AI consumption.
This system works with the following modules:
How It Works
- Activate the Add-on: Token management is a free add-on that you must activate first from the AIP > Add-ons page.

- Set Usage Limits: For each module (Chat, AI Forms, Image Generator), you can define periodic usage limits (e.g., 10,000 tokens per day) for guests and different user roles. This is your "free tier".
- Sell Token Packages: Using our WooCommerce integration, you can create products that grant a specific number of tokens upon purchase. When a user buys a package, these tokens are added to their personal, non-expiring "token balance".
- Token Deduction: When a user interacts with an AI feature, the plugin first checks if they have a token balance. If they do, tokens are deducted from that balance. If their balance is zero, the plugin then checks their periodic usage limits. If they have exceeded both, they cannot use the feature until their periodic limit resets or they purchase more tokens.
Selling Tokens with WooCommerce
You can sell tokens by creating special products in WooCommerce.
Create a Token Product
- Navigate to Products > Add New in your WordPress dashboard.
- Create a product as you normally would (e.g., a Simple product). Set a price for it.
- In the product data section, find the AI Power: Token Package meta box on the right-hand side.

- Check the box labeled This is a token package product.
- In the Tokens Granted field that appears, enter the number of tokens this product should give the user upon purchase (e.g.,
100000
). - Publish or update the product.
How Tokens are Granted
Once a customer purchases this product and the WooCommerce order is marked as Completed, the tokens are automatically added to their account balance. The plugin keeps a record of all purchases.
Managing User Credits
As a site administrator, you can view and manage all user token data from one central screen.
- Navigate to AIP > Credits from your WordPress dashboard.
- This screen displays a comprehensive overview of your users' token status.

Key Features:
- User List: A searchable and sortable list of all registered users who have used tokens or have a token balance.
- Token Balance: View and manually edit any user's token balance directly from this table. Click the number, change it, and press Enter to save.
- Usage Details: See a breakdown of how many tokens each user has consumed in the current period for each module (Chatbots, AI Forms, Image Generator).
- Purchase History: Click the cart icon in the "Actions" column to view a detailed history of a user's token package purchases.
- Usage Chart: A visual chart at the top shows the total daily token consumption across your entire site, helping you monitor overall API usage.
Frontend Usage Display
You can allow your logged-in users to see their own token balance, purchase history, and periodic usage on any page of your site.
-
Navigate to AIP > Credits.
-
At the top of the page, copy the
[aipkit_token_usage]
shortcode. -
Click the settings icon to configure which modules are displayed in the usage table (Chatbot, AI Forms, Image Generator).

- Paste the shortcode into any page, post, or widget.

When a logged-in user visits that page, they will see a dashboard showing:
- Their current non-expiring token balance.
- A button to view their complete purchase history.

- A breakdown of their usage for the current period for each module.
Setting Usage Limits
While this module manages the token balance from purchases, the free periodic limits (e.g., daily or monthly allowances) are configured within each specific module's settings. This allows you to set different free tiers for your Chatbots versus your AI Forms, for example.
- Chatbot Limits: See the Chat > Token Management documentation.
- AI Forms Limits: See the AI Forms > Token Management documentation.
- Image Generator Limits: See the Image Generator > Token Management documentation.