Who Is This For?
This guide is for developers building AI products, API services, or any usage-based business. Common examples:| Business Type | Examples |
|---|---|
| AI API Services | LLM API proxies, image generation, speech recognition |
| AI SaaS | AI writing assistants, AI code completion, AI translation |
| AI Agent Platforms | Automated workflows, data analysis agents |
| API Services | Payment processing, messaging, data queries |
How Billing Works with Waffo Pancake
Waffo Pancake does not provide built-in usage metering, but you can implement flexible AI product billing through these approaches:Approach 1: Subscription Tiers with Token/Request Quotas
Create subscription products at different tiers, each with a different token or request quota.Prices below are examples only. Set them based on your actual business and costs.
| Plan | Monthly | Token Quota | Best For |
|---|---|---|---|
| Starter | $9/month | 100K tokens | Individual developers |
| Pro | $49/month | 1M tokens | Small teams |
| Scale | $199/month | 10M tokens | Enterprise |
Approach 2: Dynamic Pricing via Checkout Session
Pass dynamic pricing throughpriceSnapshot when creating a checkout session to charge based on actual usage.
Approach 3: External Metering Tools
Use dedicated metering tools to track usage, combined with Waffo Pancake for billing.Recommended Metering Tools
LiteLLM
AI model proxy and usage tracking supporting 100+ LLM providers. Unified interface for OpenAI, Anthropic, Gemini, and more with built-in usage analytics.
OpenMeter
Open-source usage metering platform designed for AI and API products. Real-time tracking of token consumption, API calls, and custom metrics.
Business Scenarios
The following are example scenarios. Adjust them to match your actual business.
Scenario 1: AI API Service (Token-Based Billing)
Setup:- Create tiered subscription products (Starter / Pro / Scale)
- Each tier includes a token quota
- Track token consumption using LiteLLM or your own system
- Prompt users to upgrade when approaching their quota
- Monitor active subscriptions in the Subscriptions page
- Track revenue per tier in Analytics
- View customer details to understand usage patterns
Scenario 2: AI SaaS (Subscription + Token Allowance)
Setup:- Create subscription products with token allowances
- Store allowance info in product metadata
- When users exceed their allowance, create overage charges via
priceSnapshot - Use webhooks to automate renewal and quota resets
- Monitor subscriptions and one-time orders
- Track subscription revenue vs overage revenue in Analytics
Scenario 3: AI Agent Platform (Per-Task/Per-Call Billing)
Setup:- Create a base subscription product with a set number of agent calls
- Log each agent execution upon completion
- For usage beyond the included calls, create one-time orders with dynamic pricing
- Use OpenMeter to track call counts and costs
- View per-customer revenue in Payments
- Track agent call growth trends
Key Webhook Events
| Event | Action |
|---|---|
subscription.activated | Set initial token/request quota |
subscription.updated | Adjust quota to match new plan |
subscription.canceled | Revoke API access or downgrade to free tier |
subscription.past_due | Reduce quota or throttle API calls |
order.completed | Grant additional token allowance (overage purchase) |
Testing
Launch Checklist
- Subscription products created for each tier
- Pricing and quotas clearly documented
- Usage tracking/metering tool integrated
- Quota enforcement working correctly
- Upgrade/downgrade flows tested
- Overage billing flow verified
- Products published to production
Next Steps
Run SaaS Subscriptions
Learn more about subscription management
Set Up Webhooks
Automate quota management with webhooks