Concepts
Billing

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-hour of runtime — RAM allocated × time awake. The meter ticks once every 60 seconds and each tick charges exactly one interval, so a minute is the resolution you are billed at. Because servers are scale-to-zero, sleep is free: a hibernated server bills nothing. The idle wait before it hibernates — the server's idle timeout — is still awake time, and billed. 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.

Sleep = free is the whole point. Metered + scale-to-zero means a test server you start and stop ten minutes later costs ten minutes, and a community SMP pays while its server is awake — including the idle wait before it sleeps — not for the hours it spends asleep. There's no per-month minimum hiding under the meter.

Charges accrue while a server is running and stop once it hibernates or you call stop — the meter's next tick simply finds nothing awake to bill. The unit is RAM × time, quoted per GB-hour and converted 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 metered runtime. 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. A day a flat server stays stopped isn't charged; a day it runs is, whether or not anyone plays.

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 for any whole-dollar amount from $5 to $100. The CLI opens the checkout and waits for the balance to update:

truetick topup --amount 10

Programmatically, 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 clears

Top-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(...).