Funding
A project that spends only its own credit: what happens at zero, how to top it up yourself, and what your players are shown.
An Encore project is top-up only. Its usage draws on its own balance and on nothing else, and that is the whole promise to your players: what they buy keeps these servers running, and nothing else pays for them.
What a top-up-only project spends
| Draws on | Does not draw on |
|---|---|
| The project's own balance: player purchases, and credit bought for the project. | Your plan's monthly credit. |
| Credit you bought for the account. | |
| Free allowances. | |
| Plan discounts — everything in the project is charged at list price. |
The balance is kept in your account's currency, and every charge made inside the project is drawn from it — game server hours, server addresses, storage, whatever the project runs.
What happens at zero
The project's game servers go to sleep. Nothing else on your account notices.
When the balance reaches zero:
- Running game servers are stopped, the way they stop when nobody is playing. Nothing is deleted: worlds, saves and settings are kept.
- Nothing in the project starts or wakes until it has credit again. A player
connecting to a sleeping server does not wake it, and a start is refused with
PROJECT_CREDIT_EXHAUSTED. - Nothing new is created in it, for the same reason.
- Your servers' addresses keep answering, so players can wake the servers the moment the project is funded again. Those addresses and stored data take the balance slightly below zero while the project waits.
And, just as importantly:
- Your other projects are unaffected. The account is not suspended, and nothing outside the Encore project stops.
- Your account running out does not stop the Encore project. If your plan credit runs out, or you hit a spend cap, your own projects stop and the Encore project keeps running on its players' credit. A suspension Plany makes for another reason — the terms of service, say — still stops everything.
When credit arrives again
The moment the balance is above zero, the project is reactivated — and nothing starts by itself. Players wake servers by connecting, and you start them by asking. Starting every server a project has because one player bought a month would spend that month on servers nobody was waiting for.
A negative balance — after a refund of credit already spent — has to be topped up past zero before anything starts.
A new Encore project starts at zero
The project becomes top-up only when its transfer completes, and its balance starts empty. The first thing that can put credit in it is either a player's purchase, once the Encore is verified, or you.
If the servers must not go to sleep across the switch, top the project up yourself the moment the transfer completes.
Topping up yourself
A top-up-only project cannot spend account credit, so buying credit for the project is how you fund it yourself. In the console, open Encore → your Encore → Funding → Top up, choose an amount, and pay by card on Stripe Checkout's page. The credit lands in the project's balance as soon as the payment goes through; any tax is added on top and never counted as credit.
Behind the button is CreateCheckoutSession with project set to the Encore
project — see Billing. project must belong to your account and
be top-up only. Buying credit needs billing.credit.purchase on the account.
Credit you put in the project is yours to give, and it is spent exactly like a player's. It cannot be moved back to the account: a project's balance holds credit that may have been paid for by players, and it only ever pays for that project.
Reading the project's money
Encore → your Encore → FundingThe API answers:
{ "encore": "accounts/my-studio/encores/example-arena", "project": "projects/encore-example-arena", "balance": { "currency_code": "USD", "units": "182", "nanos": 400000000 }, "recent_spend": { "currency_code": "USD", "units": "34", "nanos": 720000000 }, "spend_window": "604800s", "runway": "3182400s", "funded": true, "purchases": "41", "reversals": "1", "purchased": { "currency_code": "USD", "units": "143", "nanos": 90000000 }}| Field | Meaning |
|---|---|
balance | Spendable credit. Negative after a refund of credit already spent. |
recent_spend, spend_window | What the project spent over the last seven days. A week rather than a day, because players arrive at weekends and a Tuesday would predict a runway the following Saturday disproves. |
runway | How long balance lasts at that rate. Unset when nothing was spent in the window, or the balance is not positive — "forever" is not a runway. |
funded | Whether the balance is above zero. |
purchases, reversals, purchased | Player purchases credited and reversed over the window, and what they credited. |
An Encore that has not been transferred has no project, and reads as unfunded.
In Terraform, a check block on data.plany_encore_funding can fail a plan when
the runway is short. runway_days is null when nothing was spent recently, so
treat null as fine rather than as zero.
Reading funding needs encore.funding.get, which the owner, administrator, billing
and viewer roles all hold. Each player purchase also appears in the account's
ledger as a TYPE_PLAYER_TOP_UP entry.
What players see
funding_visibility is set when the Encore is created, and is required with no
default: you might reasonably want players to see "37 days of servers left" and
not want the exact balance of a project on your account published to anybody who owns
the game.
funding_visibility | funded | runway_days | balance |
|---|---|---|---|
FUNDING_VISIBILITY_EXACT_BALANCE | ✓ | ✓ | ✓ |
FUNDING_VISIBILITY_RUNWAY | ✓ | ✓ | |
FUNDING_VISIBILITY_FUNDED_FLAG | ✓ |
Change it at any time:
plany encore update example-arena --visibility funded-flagEvery visibility also carries purchasable and unavailable_reason, so a store knows
whether its buttons work.
runway_days: absent is not zero
runway_days is whole days, rounded down, and it has three readings:
runway_days | Means | Show |
|---|---|---|
| absent | Nothing to project from: the servers have been idle for a week, the balance is not positive, or the visibility hides it. | Nothing, or "funded" / "not funded". |
0 | Less than a day of servers left. | "Less than a day left." |
37 | About 37 days at the last week's rate. | "37 days of servers left." |
A game that shows "0 days left" on a quiet, well-funded server is telling its players something false and alarming, which is why absent and zero are different values.
What players see names no account, no project and no studio. The Encore key is in
every copy of the game, so anything the public calls return is visible to everybody
who owns it — which is exactly the audience funding_visibility is chosen for.