Skip to main content

Credits and add-ons

A credit system groups features behind one prepaid balance. Each feature defines the number of credits consumed per unit.

Credit packs are one-time purchases that add credits to a customer's balance after provider payment is confirmed. This is useful when multiple metered features draw from one shared allowance.

When an entitlement uses credits, /v1/usage/check can return insufficient_credits, and /v1/usage/track deducts credits transactionally when access is granted.

Choose the packaging, not a different ledger​

Usagey keeps credit accounting generic. The Add-ons dashboard provides two starting templates:

  • Product credits for API calls, jobs, storage, or another shared product unit.
  • AI credits for model calls, generations, or token-based workloads.

Both templates create the same CreditSystem and CreditPack records. AI naming is customer-facing packaging, not a separate accounting engine. Define the actual credit conversion on each feature attached to the system.

Draft and publish safely​

Installing a template creates one credit system and two inactive pack drafts. Draft prices start at zero and never appear in the customer portal. For each pack:

  1. Confirm the credit quantity and plain-language description.
  2. Set the selling price and currency.
  3. Publish the pack when it is ready for customer purchase.

Usagey rejects activation when the price is zero or the credit quantity is invalid. Deactivating a pack removes it from new customer purchases without deleting historical transactions or balances.

Explain the conversion

Use the credit-system description and feature configuration to tell buyers what one credit represents. For example, a model call may consume 10 credits while an image generation consumes 100 credits.