Credit consumption
Failed validations (invalid key, expired, revoked) do not consume credits. Only successful authentications are billed. Heartbeat credits are debited on every 10th successful call.
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
- Heartbeat interval: 15 minutes (default)
Quick reference (SERVER mode, 15-min heartbeat)
These numbers scale linearly with heartbeat frequency. Doubling the interval halves the heartbeat column; switching to LOCAL mode (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 experiencingno_credits failures.
Setup
- Go to the Dashboard → Settings → Billing
- Add a payment method (credit card via Stripe)
- Enable Auto-refill
- 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:- Go to Settings → Billing → Alerts
- Enable Low balance email
- Set your alert threshold
Optimizing credit usage
Use LOCAL heartbeat mode
If you don’t need instant revocation enforcement, switch to LOCAL heartbeat mode. This eliminates heartbeat credit consumption almost entirely; the SDK only makes a network call when the session token expires (24 hours by default, up to 7 days if the SDK set a customttlSeconds).
Increase heartbeat interval
If you want SERVER mode but don’t need 15-minute checks, increase the interval:Avoid redundant logins
If your app can open multiple windows or instances, authenticate once and share the session: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:- SDK validate calls receive a
no_creditserror. The SDK treats this as a login failure. - Heartbeat milestones (every 10th heartbeat) fail with
no_credits. The SDK triggers the failure callback.