Skip to main content

Who Is This For?

This guide is for developers building AI products, API services, or any usage-based business. Common examples:
Business TypeExamples
AI API ServicesLLM API proxies, image generation, speech recognition
AI SaaSAI writing assistants, AI code completion, AI translation
AI Agent PlatformsAutomated workflows, data analysis agents
API ServicesPayment processing, messaging, data queries

How Billing Works with Waffo Pancake

Waffo Pancake does not provide built-in usage metering, but you can model AI billing with two primary approaches: subscriptions and on-demand purchases. In many businesses, these two approaches work best together.

Approach 1: Subscriptions

Create subscription products at different tiers, each with a different token quota, request allowance, or task limit.
Prices below are examples only. Set them based on your actual business and costs.
PlanMonthlyToken QuotaBest For
Starter$9/month100K tokensIndividual developers
Pro$49/month1M tokensSmall teams
Scale$199/month10M tokensEnterprise
Best for:
  • recurring monthly or annual access
  • plans with included usage
  • upgrade paths that unlock higher quotas

Approach 2: On-Demand Purchases

Use one-time orders or dynamic pricing to charge based on additional usage, credits, or runtime-calculated amounts. Best for:
  • buying extra tokens or credits
  • charging for overage beyond the included plan
  • per-task, per-call, or quoted usage

Dynamic Pricing via Checkout Session

Pass dynamic pricing through priceSnapshot when creating a checkout session to charge based on actual usage.
const session = await client.checkout.createSession({
  storeId: "store_id",
  productId: "usage-product-id",
  productType: "onetime",
  currency: "USD", // replace with your currency
  priceSnapshot: {
    amount: calculatedAmount, // dynamically calculated based on usage
    taxIncluded: false,
    taxCategory: "saas",
  },
});

External Metering Tools

Use dedicated metering tools to track usage, combined with Waffo Pancake for billing.

New API

API aggregation and management platform with multi-model key distribution, usage tracking, and quota control. Waffo Pancake partner.

Most AI products do not need to choose only one billing model. The most common pattern is to combine subscriptions with on-demand purchases.

Combined Pattern: Base Subscription + On-Demand Usage

This is the most common and easiest billing model for customers to understand. Setup:
  1. Create tiered subscription products such as Starter / Pro / Scale
  2. Include a fixed quota of tokens, requests, or tasks in each plan
  3. Track actual usage with an external metering system
  4. When a user exceeds the included quota, charge extra through a one-time order or priceSnapshot
Fits well for:
  • AI API services
  • AI SaaS
  • AI agent platforms
Dashboard workflow:
  • Monitor active plans in Subscriptions
  • Review extra purchases or overage charges in Payments
  • Track subscription revenue and on-demand revenue together in Analytics

Key Webhook Events

EventAction
subscription.activatedSet initial token/request quota
subscription.updatedAdjust quota to match new plan
subscription.canceledRevoke API access or downgrade to free tier
subscription.past_dueReduce quota or throttle API calls
order.completedGrant additional token allowance (overage purchase)
For API details, see the API Reference.

Testing

1

Create Test Products

Set up both subscription products and on-demand products in test mode.
2

Subscribe with Test Card

Use 4576 7500 0000 0110 to subscribe to each tier.
3

Simulate Usage

Test your usage tracking and quota enforcement logic.
4

Test On-Demand Billing

Verify the dynamic pricing and on-demand billing flow.

Launch Checklist

  • Subscription products created for each tier
  • On-demand or overage product created
  • Pricing and quotas clearly documented
  • Usage tracking/metering tool integrated
  • Quota enforcement working correctly
  • Upgrade/downgrade flows tested
  • On-demand 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