Introduction
The best pricing model for an AI app is usually the one that matches how the customer receives value and how the product incurs cost. A subscription works well when the product delivers repeatable, ongoing value. Credits work well when individual requests have a meaningful marginal cost or users need flexible bursts. A hybrid often works best when a subscription provides dependable access and credits cover unusually expensive usage.
The pricing page is only half of the decision. An AI generation may call a model, transform media, stream a response, save a result, and fail partway through. If the client can directly reduce its own balance or decide whether a transaction succeeded, users will eventually see missing credits, duplicated charges, or access they should not have. The billing model must be backed by a trusted server, an auditable ledger, and clear recovery behavior.
This guide is for founders and engineers building AI features in Flutter. It assumes store-distributed mobile apps, a backend you control such as FastAPI, and a provider whose usage creates a cost. Figures below are illustrative planning examples, not pricing advice or a guarantee of profitability.
Begin With the Value and Cost Contract
Ask two separate questions for every AI feature:
- What outcome is the customer paying for?
- What does a successful or failed attempt cost the business?
For an AI writing assistant, the customer may value a steady daily companion. For an image enhancer, document-analysis tool, or voice transcription workflow, the value may arrive in distinct, measurable jobs. The right model follows that behavior.
| Model | Best when | Main risk | Good product example |
|---|---|---|---|
| Subscription only | Value is frequent and predictable | Heavy users can exceed the cost assumption | Daily coaching, writing assistance, learning companion |
| Credits only | Usage is irregular or each job is expensive | Users may hesitate before trying the feature | Image generation, long transcription, document extraction |
| Hybrid | There is recurring value plus expensive bursts | The offer becomes confusing if limits are hidden | AI workspace with included monthly usage and optional top-ups |
The 2026 RevenueCat subscription report shows why retention deserves as much attention as the first purchase. Its published data finds AI apps can monetize strongly per payer but retain subscribers less reliably than non-AI categories over twelve months. A pricing model should make repeat value obvious, not only make a first transaction possible.
Use a Subscription When the Product Is the Ongoing Habit
A subscription should sell access to a continuing outcome, not hide an unpredictable metered bill. A good offer can include a named recurring benefit, a fair-use boundary that is understandable, and a clear experience if the user reaches a limit.
For a weekly planning assistant, a plan might include ongoing access to planning templates, saved history, and a reasonable number of AI planning sessions. The product value is not each individual response. It is the habit, context, and workflow that become more useful over time.
Before launching a subscription, define these details in writing:
- What exact capabilities unlock after purchase?
- Does the plan include a recurring allowance, and when is it refreshed?
- What happens when an allowance is used?
- Can a user export their data or use non-AI parts without an active plan?
- How will a cancellation, refund, upgrade, and account restoration appear in the app?
For store-distributed iOS apps, Apple's App Review Guidelines require in-app purchase for unlocking functionality or in-app currencies in most relevant cases. Product and legal teams should review the current platform rules for their exact app category and region before launch.
Use Credits When Each Request Has a Clear Cost
Credits make sense when the customer intuitively understands a unit of work. A photo restoration, a 30-minute transcription, or a detailed document extraction can each have a visible price because they consume a bounded amount of compute and external-service cost.
Avoid inventing a credit conversion that customers cannot understand. A user should be able to see what one credit buys before they purchase it. If one request can cost ten times another request, either define separate feature prices or give the user a quote before consuming the balance.
Here is a simple planning model for an imaginary document assistant. It is not a recommendation for any specific provider price:
| Input | Illustrative value |
|---|---|
| Average model and infrastructure cost for a standard analysis | $0.04 |
| Expected failed or retried work allowance | $0.01 |
| Total variable cost per completed analysis | $0.05 |
| Customer-facing unit | 1 analysis credit |
The team can now reason about a pack size, introductory allowance, and a safe reserve for retries. The calculation must include more than a model request: storage, moderation, observability, support, payment platform fees, and work that fails after the provider has already charged you can all matter.
Purchased mobile credits have platform constraints. Apple's guidelines say in-app-purchase currencies may not expire and require a restore mechanism for restorable purchases. On Android, follow the current Google Play Billing security guidance, including the refund and voided-purchase handling appropriate to your product.
A Hybrid Model Is Often the Honest Middle Ground
A hybrid model can be clearer than a very expensive subscription or a paywall that blocks every useful action. For example:
- A subscription unlocks premium workflow features and includes 30 standard AI analyses per billing period.
- A customer can see their remaining included allowance before triggering an analysis.
- Extra analyses are available as non-expiring store-purchased credit packs, where platform rules permit.
- Expensive premium modes show their credit cost before the user confirms.
The important word is clarity. Do not make the user calculate whether a prompt will deplete their balance. Do not silently switch from included usage to paid credits. Make the next action, its cost, and the recovery path visible in the interface.
The mobile-app revenue model guide helps choose broad business models. This article goes deeper on the AI-specific part: how metered usage is implemented safely once a customer has selected a model.
Never Let the Flutter Client Own the Balance
The Flutter app can display a balance and initiate a request, but it should not be the authority that deducts credits. A modified client, duplicate request, network timeout, or concurrent device can otherwise create inconsistent balances.
Use a backend that owns four responsibilities:
- Verify a store purchase or receive a verified entitlement from your billing system.
- Record every grant, reservation, consumption, reversal, and refund in an append-only ledger.
- Authorize and run AI work only after the account has enough entitlement.
- Return a result that the Flutter app can render safely.
RevenueCat's in-app-currency documentation makes this boundary explicit: its SDK can expose balances, but spending requires your own backend because privileged API credentials must never live in the client.
Model the ledger as events, not as one editable balance field:
CREATE TABLE credit_ledger (
id UUID PRIMARY KEY,
account_id UUID NOT NULL,
operation_key TEXT NOT NULL,
delta INTEGER NOT NULL,
reason TEXT NOT NULL,
store_transaction_id TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE (account_id, operation_key)
);
The current balance is the sum of ledger entries, or a carefully maintained projection of that sum. A unique operation_key ensures the same request does not consume credits twice. A production schema also needs account isolation, indexes, administrative audit information, and a deliberate retention policy.
Reserve, Perform, Then Commit or Release
An AI task can fail after you reserve capacity, after the external provider accepts the job, or after it completes but before the phone receives a response. Treat it as a small state machine rather than one request that either works or fails.
Flutter app sends a request with a client-generated operation key
↓
Backend validates identity, entitlement, input, and current balance
↓
Backend records a reservation for that operation key
↓
Worker performs the AI operation with a provider-side idempotency key
↓
Backend commits the debit with a saved result, or releases the reservation
↓
Flutter app polls or receives the final typed status
The decision must be transactional on the server. The following pseudo-code shows the key ownership, not a complete deployment-ready API:
async def start_generation(account_id: UUID, request: GenerateRequest) -> GenerationStatus:
async with database.transaction():
existing = await ledger.find_by_operation(account_id, request.operation_key)
if existing is not None:
return await jobs.status(existing.job_id)
balance = await ledger.current_balance(account_id)
if balance < request.credit_cost:
raise InsufficientCredits()
job = await jobs.create(account_id, request)
await ledger.reserve(
account_id=account_id,
operation_key=request.operation_key,
credits=request.credit_cost,
job_id=job.id,
)
return job.pending_status()
When the worker finishes, it uses the same job and operation keys to commit a debit once, save the result, and mark the job complete. If the provider rejects the request before doing billable work, release the reservation. If the outcome is uncertain, do not immediately charge again on a client retry. Return the existing job status and reconcile from the provider or billing webhook first.
This is the same idempotency discipline used in a custom Flutter in-app-purchase backend. A mobile network retry is normal behavior, not proof that the first server action failed.
Verify Store Events on Trusted Infrastructure
When a customer buys a subscription or credit pack, do not grant value merely because the Flutter UI reports success. Send the purchase identifier to your backend or use a billing platform's verified server events. Verify it with the relevant store, store the source transaction ID, and make the ledger grant idempotent.
The backend should also respond to later events:
| Event | Backend responsibility |
|---|---|
| New verified purchase | Grant the matching entitlement or credit amount once |
| Renewal | Extend subscription access according to the verified period |
| Cancellation | Keep access only until the verified entitlement end, when applicable |
| Refund or revocation | Revoke or adjust the entitlement under a documented policy |
| Restore on a new device | Rebuild the account's server-authoritative state |
| Webhook replay | Produce the original result, never a duplicate grant |
For a detailed validation boundary, see Flutter in-app purchases with RevenueCat and the self-hosted receipt-validation guide linked above. Whether you use a billing service or your own FastAPI implementation, the business truth should live on the server.
Design for Failed Generations Before You Need Them
Customers forgive an occasional failed generation more easily than a mysterious lost credit. Decide how the app behaves in each case:
| Scenario | Customer-facing behavior | Ledger action |
|---|---|---|
| Validation fails before work starts | Explain what to change | No debit |
| Provider rejects before billable work | Show a retry option | Release reservation |
| Job runs but app closes | Show the completed or pending result after reopen | Commit only once outcome is known |
| Provider times out with unknown outcome | Show "Still checking" rather than charging again | Keep reservation and reconcile |
| Result is unsafe or unusable due to platform policy | Explain the limit and offer safe next step | Follow a documented refund or release rule |
Log enough information to investigate without storing unnecessary prompt data. Use request IDs in Flutter logs, backend logs, billing events, and provider calls. This turns a support email from "my credits disappeared" into an auditable sequence of events.
Test Pricing as a Product Flow
The pricing system needs more than a successful sandbox purchase test. Add tests for the customer and financial boundaries:
- A duplicate mobile request with the same operation key produces one reservation and one final result.
- Two devices spending from one balance cannot both consume the final credit.
- A failed provider call releases the reservation under the documented rule.
- A verified purchase webhook replay does not grant credits twice.
- A refunded store purchase updates the account according to the product policy.
- The Flutter app restores the correct entitlement after sign-in on a new device.
- The UI communicates a limit before beginning an expensive operation.
Run the tests against store sandbox environments and a backend test database. Test the actual retry timing and background behavior on iOS and Android. A product that appears fine on a fast local connection can fail in the real conditions covered by the Flutter offline-first sync guide.
Measure Whether the Model Helps Users Succeed
Pricing experiments should measure more than revenue. Track whether customers receive value and whether the model is sustainable:
- Trial-to-paid conversion and the time to first useful result
- Included-usage consumption and paid-credit repurchase rate
- Generation success, timeout, and refund or reversal rate
- Retention by plan and by feature cohort
- Gross margin after provider, storage, support, and platform costs
- Support tickets involving access, balance, or unclear limits
Never use metrics to justify a confusing offer. If customers regularly reach a limit without understanding why, improve the product communication or the model before adding another pricing tier.
Conclusion
Subscriptions work when the AI product earns a recurring place in a customer's routine. Credits work when each job has a visible, meaningful cost. A hybrid works when both are true and the interface makes the boundary easy to understand.
Whatever model you choose, make the server the source of truth. Verify store events, record immutable ledger entries, use idempotency keys, and give failed or uncertain generations a defined recovery path. That is how AI pricing becomes a trustworthy part of the product instead of a source of avoidable support issues.
Planning an AI feature that needs a fair pricing model and secure billing flow? I help teams combine Flutter interfaces, FastAPI backends, AI integrations, and reliable purchase architecture. Book a meeting to discuss your product.
A related project: LaGrub
A Flutter recipe and cookbook app bringing discovery, saved collections, offline access, and native subscriptions into one mobile product.
Read the case study