Virtual currencies

Grant your users virtual currency — AI tokens, credits, or coins — when they buy products or renew subscriptions. Define a currency once, link it to the products that should award it, and Adapty credits each user automatically and keeps their balance. Your app reads and spends that balance through the server-side API — for example, to charge tokens per generation.

The Virtual currency tab under Products, empty, with the New virtual currency button

How it works

  1. Create a virtual currency: Open Products and click the Virtual currency tab. Click New virtual currency. Define a currency with a code, a name, and an optional description.
  2. Link the currency to products: Map the currency to one-time or subscription products and set how many credits each purchase grants.
  3. Credits are granted automatically: When a user buys a linked one-time product or renews a linked subscription, Adapty adds the configured credits to their balance.
  4. Read and spend the balance: Your app reads each user’s balance and grants or spends credits through the server-side API.
  5. Track every change: Each balance change is listed on the user’s profile.

For a complete walkthrough — from currency setup to spending credits through the API — follow the Virtual currency quickstart.

Use cases

App typeHow to use virtual currencies
AI apps (image, video, or text generation)Charge credits per generation. Include a monthly credit allowance in the subscription and sell credit packs as one-time products.
Short drama and video appsCharge coins to unlock an episode. Grant subscribers a recurring coin allowance and sell coin packs as one-time products.
Language learning and educationGive free users a limited allowance of hearts or lives through the server-side API. Grant a larger allowance, or skip the balance check entirely, on a paid plan.
Mobile gamesRun a soft and a hard currency side by side: grant gold for gameplay through the server-side API, sell gems for money, and convert between them in a single atomic transaction.
Productivity appsMeter expensive actions, such as OCR or exports, with credits. Give free users a small allowance, grant more with a subscription, and sell credit packs for batch work.

For subscription allowances, turn on credit expiration. When unused credits reset at each renewal, the allowance stays a reason to keep the subscription, and heavy users buy credit packs instead of spending down a stockpile.

Limitations

  • Cross-device access requires identification: A balance belongs to one profile. An anonymous user keeps their balance on the device where they earned it, so identify users to make their balance available on every device. See Balances, profiles, and devices.
  • Server-side only: There is no SDK method to read or spend a balance yet, so your app needs a backend. It reads balances and grants or spends credits through the server-side API.
  • Up to 20 currencies per app: You can create up to 20 virtual currencies in one app.