Billing6 min read

How to define billable events in a credit-first AI app

Name events after what users did — chat reply, image, summary — not tokens or providers. Here’s a practical way to choose boundaries, keep wallet history readable, and stay flexible when models change.

Chargly Team

Quick summary

Name billable events after user-visible actions — chat reply, image, summary — not tokens or providers. Start with a small set; split only when users would understand different prices.

  • One event should map to one user-facing action. If the user would not describe it that way, it is the wrong billing unit.
  • Keep provider and model names out of event identifiers so you can change stacks without rewriting billing language.
  • Split events when pricing diverges in ways users expect — not when only the backend looks different.
Share
0%

When teams move to credit-first AI billing, one of the first practical decisions is what to charge for. In practice, that choice is one of the most important design decisions in the whole system: it shapes pricing, support questions, and how hard it is to swap providers later.

Billable events are the bridge between what your product does and what users pay for. Get them right, and pricing feels natural, usage history feels trustworthy, and credits make sense. Get them wrong, and billing becomes noisy, hard to explain, and difficult to evolve.

This is for founders, product engineers, and anyone wiring metering: you need a unit that matches the product, not your LLM client.

Why billable events matter

A good billing model should feel aligned with the product experience.

Users do not think in input tokens, output tokens, provider costs, or internal API calls. They think in actions:

  • send a message
  • generate an image
  • summarize a document
  • run an agent task

That is why billable events matter. They define the unit of value your product exposes to users and the unit your billing system tracks internally.

The rule

One event should map to one user-facing action. If the user would not describe it that way, it is probably the wrong billing unit.

What a billable event actually is

A billable event is the thing your system records when a user takes an action that should consume credits.

In a credit-first model, the event becomes the unit that:

  • deducts from the wallet
  • appears in usage history
  • connects to pricing rules
  • helps users understand what they are paying for

That means the event should describe the product action, not the provider internals underneath it. The next section spells out good and bad patterns.

Good vs bad billable events

Here is the simplest way to think about it:

Event typeGood billing event?Why
chat.replyYesMatches a user-facing action
image.generateYesClear product value
doc.summarizeYesEasy to understand in usage history
tokens.inputNoToo implementation-specific
provider_requestNoDescribes infrastructure, not value
openai_completionNoTied too closely to one provider

The user should be able to look at a wallet history or event log and immediately understand what happened.

If your event names read like backend implementation details, your billing model is probably too close to the infrastructure layer.

How granular should you get?

This is where teams often overcomplicate things.

If your event model is too coarse, you lose pricing flexibility. If it is too fine, you create complexity that users do not need and your own team has to maintain.

Most AI products should start with a small, stable set of billable event types — often the same four surfaces as above: chat replies, image generation, document summaries, and agent runs. Name them to match your product (chat.reply, image.generate, doc.summarize, agent.run, or your own convention), not your internal services.

That is usually enough to support:

  • clear pricing
  • understandable wallet history
  • simple pricing rules
  • room to split events later when pricing really diverges

You do not need twenty event types on day one.

Start with the smallest set of event types that reflects real product value. Expand only when users or margins justify it.

When to split an event

Sometimes one action really should become two separate billing events.

For example:

  • a quick summary vs a long document analysis
  • a basic image generation vs a premium high-resolution generation
  • a single-step agent action vs a multi-step agent run

The key question is not whether the backend is different.

The key question is:

Would a user understand why these are priced differently?

If the answer is yes, splitting the event may make sense.

If the answer is no, keep the model simpler.

Naming rules

Billable event names should be:

  • product-native
  • short
  • stable
  • easy to scan in logs and dashboards

Good naming patterns:

  • chat.reply
  • image.generate
  • doc.summarize
  • agent.run

Avoid:

  • provider names
  • model names
  • token-specific naming
  • temporary internal labels

Your billing system will meter these names. Your users may see them. Your team will build pricing rules around them. Names matter more than they seem.

A simple test for event quality

Before finalizing a billable event, ask:

  1. Would a user recognize this as a meaningful action?
  2. Would this make sense in wallet history?
  3. Could I assign a clear credit cost to it?
  4. Would this still make sense if we changed model providers later?

If the event fails those tests, it probably belongs deeper in internal telemetry, not in product-facing billing.

Common mistakes

Teams usually make one of these errors:

  • Using provider or model internals as billing units
  • Creating too many event types too early
  • Naming events for backend implementation instead of product value
  • Making event boundaries so complex that pricing becomes harder to explain

The goal is not perfect billing sophistication on day one.

The goal is a billing model that users can understand and the product can grow with.

How Chargly fits

Chargly is built around this event-based model.

You define stable event names and credit costs; your app meters when a user-visible action completes. Chargly records the deduction, keeps wallet balances in sync, and surfaces usage in product terms — so you are not exposing token math or provider IDs in customer-facing flows.

That is the point of credit-first billing:

  • users see actions and credits
  • developers keep control over pricing logic
  • the infrastructure remains flexible underneath

What this unlocks

  • Cleaner wallet history and event logs
  • More intuitive credit pricing
  • Better pricing rule management
  • Freedom to change providers without changing billing language

Billable events are the vocabulary your users read in history and your team uses in pricing rules. Nail that vocabulary early, and everything downstream — costs, explanations, and iteration — gets easier.

billingeventsmeteringcredits

Next steps

Ready to add credit billing to your app?

Start free. No credit card required. Ship wallets, event metering, and Stripe top-ups in minutes.