Skip to main content
AuthForge uses a credit-based billing model. Understanding how credits are consumed helps you estimate costs and avoid running out.

Credit consumption

Failed validations (invalid key, expired, revoked) do not consume credits. Only successful authentications are billed. Heartbeats happen only if you enable online check-ins; credits are debited on every 10th successful call. The default grace-period behavior makes no heartbeat calls at all. Offline license files are billed once, at mint time, to the operator’s account (through the same debit path as validate, so your app’s burn caps apply). Verifying a file on the air-gapped machine costs nothing, and rejected mints are free. An air-gapped fleet that re-issues 90-day files costs roughly 4 credits per machine per year.

Estimating monthly usage

Formula

Example calculation

Suppose you have:
  • 500 active licenses
  • Users log in once per day on average
  • Users run the app 8 hours per day
  • Online check-ins enabled at the default 15-minute interval
The 100k tier ($30/month) covers this with headroom. Bumping the check-in interval to 30 minutes roughly halves the heartbeat portion.

Quick reference (online check-ins enabled, 15-min interval)

These numbers scale linearly with check-in frequency. Doubling the interval halves the heartbeat column; relying on the grace period alone (the default, see below) drops it to near zero.

Credit tiers

Higher tiers offer better per-credit pricing. Choose the tier that covers your monthly estimate with a comfortable margin.

Auto-refill

Set up auto-refill to automatically purchase credits when your balance drops below a threshold. This prevents your users from experiencing no_credits failures.

Setup

  1. Go to the DashboardSettings → Billing
  2. Add a payment method (credit card via Stripe)
  3. Enable Auto-refill
  4. Configure:
    • Tier: Which credit package to purchase (10k, 30k, 100k, etc.)
    • Threshold: Trigger a purchase when balance falls below this number
    • Cooldown: Minimum time between auto-refill purchases (30 minutes to 24 hours)

Recommendations

Set the threshold high enough to cover your usage during the cooldown period. If you consume 1,000 credits per hour and your cooldown is 6 hours, set the threshold to at least 6,000.

Low balance alerts

Configure email alerts when your balance drops below a threshold:
  1. Go to Settings → Billing → Alerts
  2. Enable Low balance email
  3. Set your alert threshold
You’ll receive an email when your balance falls below the threshold, giving you time to purchase more credits or adjust auto-refill settings.

Optimizing credit usage

Rely on the grace period (the default)

If you don’t need fast revocation enforcement, don’t enable online check-ins. The default behavior eliminates heartbeat credit consumption entirely; the SDK re-verifies the signed session locally and only makes a network call when the session expires (24 hours by default, up to 7 days via the SDK’s ttl option).
Credit savings: For a user running the app 8 hours/day, online check-ins at a 15-minute interval consume ~32 heartbeats ≈ 3.2 credits/day. The grace period needs at most 1 re-activation per session-TTL window (~1 credit every 24h by default). That’s roughly 3x cheaper at a 15-minute interval, and more if you check in more often.

Increase the check-in interval

If you want online check-ins but don’t need 15-minute checks, increase the interval:
Doubling the interval halves your heartbeat credit consumption.

Avoid redundant logins

If your app can open multiple windows or instances, authenticate once and share the session:
See SDK Best Practices: Multi-instance for implementation details.

Monitoring usage

Check your current balance and transaction history in the dashboard:
  • Settings → Billing shows your current balance
  • Transaction history shows credits purchased, consumed, and auto-refilled
  • Usage stats show authentication volume per app

What happens when credits run out

When your account has zero credits:
  1. SDK validate calls receive a no_credits error. The SDK treats this as a login failure.
  2. Heartbeat milestones (every 10th check-in, if online check-ins are enabled) fail with no_credits. The SDK triggers the failure callback.
Users already authenticated continue running until their next heartbeat milestone or session expiry. They aren’t immediately disconnected.
Your users see “Authentication service temporarily unavailable”; they don’t know it’s a billing issue on your end. Set up auto-refill to prevent this.