Billing
TrueTick bills for what a server actually uses, in a way you can audit. Two plans, one honest model.
Metered (default)
The metered plan charges per GB-second of runtime — i.e. RAM allocated × time awake. Because servers are scale-to-zero, idle time is free: a hibernated server bills nothing. A 4 GB server that's awake for one hour is charged for 4 GB-hours; the same server stopped for the next 23 hours adds nothing.
Idle = free is the whole point. Metered + scale-to-zero means a test server you spin up for ten minutes costs ten minutes, and a community SMP only pays while people are actually playing. There's no per-month minimum hiding under the meter.
Charges accrue continuously while a server is running and stop the instant it hibernates or you call
stop. The meter measures GB-seconds and converts to your wallet currency (USD).
Flat plan
For servers that run continuously, a flat monthly rate per GB can be cheaper than the meter. Switch a server to the flat plan and it's billed a fixed daily charge for each day it runs, instead of by the second. Flat is opt-in per server (set when creating, or switched while the server is stopped) and is a better fit for an always-on server than a bursty one. Idle days on a flat server are skipped — you're billed for days the server actually ran.
Rough rule of thumb: if a server is awake more than roughly a quarter of the time, compare the flat rate against your metered GB-hours. The dashboard shows both so you can pick.
The wallet
Billing draws down a prepaid wallet balance, denominated in microdollars (µ$ — millionths of a dollar) for sub-cent precision.
const wallet = await client.wallet.get();
console.log(`Balance: $${(wallet.balanceMicros / 1_000_000).toFixed(2)}`);curl -H "x-api-key: $TRUETICK_API_KEY" \
"https://api.truetick.gg/v1/accounts/$ACCOUNT_ID/wallet"Both require the billing:read scope. When the balance hits zero, running servers are stopped and you
can't start new ones until you top up — an honest hard stop, not a surprise invoice.
Topping up
Funds are added via a Paddle checkout. The CLI opens the checkout and waits for the balance to update:
truetick topup --amount 10Programmatically, create a checkout link and send the user to it:
const { checkoutUrl } = await client.billing.createCheckout(10);
// open checkoutUrl in a browser; the wallet credits when payment clearsTop-ups themselves (the actual charge) happen through the dashboard/Paddle, not via a ttk_ key — see
Authentication.
The ledger
Every credit and debit is recorded in an append-only ledger you can read back:
curl -H "x-api-key: $TRUETICK_API_KEY" \
"https://api.truetick.gg/v1/accounts/$ACCOUNT_ID/ledger?limit=50"Entries include metered charges, flat charges, top-ups, signup credit, and any admin adjustments — so
the bill is never a black box. Requires billing:read.
Large integers (balanceMicros, ramMb) are JSON-encoded as strings. The SDK coerces them to
numbers; in raw HTTP, wrap with Number(...).