Balance and usage #

View this page as Markdown

On this page

Prompt:

What is left in my account this month, and why has it paused?

Your Turn Zero account's balance covers its applications and paid options. Use this page to read its cost, remaining balance, warnings and pause.

For an application's size, sleep setting, usage quantities and limits, read Size and usage.

Before your AI starts #

For your AI assistant. Use your signed-in Turn Zero connection. Call read_account to confirm whose balance you will report.

Steps #

1. Read the balance #

For cost, balance or a pause, call read_balance. The balance shows how much you used and how much remains. Check state.paused for the current status. If paused, state.paused_until gives the next UTC month boundary. A credit grant can end the pause sooner. The read returns state as null for an unbilled account, when the month’s Free Allowance is unset, or when it cannot read the billing rates.

Its lines identify charges by rate key, application and environment. Its applications show each application's size, sleep settings and refused log entries.

Read balance.left for the Free Allowance you have left this month. Read balance.credit_left, when present, for usable credit kept separately from that allowance. The amounts in lines show rated use, including amounts for days still open. To see what the month actually used from each balance, read balance.drawn for allowance and balance.credit_drawn, when present, for credit. On each line, open_usd_micros shows how much of its total came from days still open.

A purchase gives you a credit grant. Turn Zero staff (the operator) can grant credit too. A grant is live after it starts, while some credit remains, and before it expires. This guide calls the credit you can use from those grants live credit.

2. Read purchases or request credit #

For now, only buyers with a billing address in the United States can buy prepaid credit.

Before offering checkout, call read_purchases to check sales and read the listed amounts and currency. If sales is on, the purchase request still checks this account's eligibility and limits. At your request, your AI assistant calls buy_credits with an amount its schema admits. If prepaid credit is not sold on the site, it returns credit_sales_off and charges nothing. Over MCP, the call checks account eligibility, the daily purchase limit and the hourly limit on purchase starts. A refusal opens no checkout.

An admitted MCP call returns add_credits_url, a link to the Add credits view of Balance & usage with that amount chosen. Open it and sign in. Check that the site shows the same Turn Zero account your AI assistant confirmed and the amount you chose. Then select Continue to checkout. The site runs the purchase checks again, including checks that need the payment provider, before opening the provider's page for you to pay. The AI assistant's call opens no checkout, takes no payment and grants no prepaid credit.

The site's own Add credits action still opens a checkout. A buy_credits call over the HTTP API, for example from a script using a token, returns checkout_url for an admitted purchase. Open that address and pay on the payment provider's page; the call itself takes no payment and grants no prepaid credit.

Call read_purchases for your account's purchases, newest first, whether or not prepaid credit is sold on the site. This read changes nothing. To read one purchase, set purchase to its ID. An ID outside your account returns an empty list.

If you lose a checkout response or are unsure what happened to a purchase, check the existing purchase before starting another checkout. Ask your AI assistant to check its ID with read_purchases, or check recent purchases if you have no ID. On the signed-in site, open Purchase history and choose Check payment status if the purchase is waiting for confirmation. Starting a new checkout can close an earlier one.

If more is true, older purchases were left out. There is no next page.

A purchase’s state may be refunding while a refund is pending or refunded once it is recorded. The read gives no refund amount or payment provider identifiers.

For help with a refund, sign in and open Balance & usage. Open Purchase history or Billing help and choose Help with a refund. If you email support, include the purchase date and amount. Use read_balance to check the credit you can use now.

3. Check warnings and pauses #

When the account pauses #

A billed account pauses when its Free Allowance for the month is set and used up and it holds no live credit. Read read_balance for balance.left. If state is present, read state.paused and state.paused_until. This pause is separate from an application's quantity limit.

  • Application requests and scheduled runs are refused account_paused, including requests for the web client's shell and sign-in routes.
  • Storage reads, lists, puts, deletes and grant mints are refused 429 account_paused. Egress is refused before reaching the upstream.
  • A new WebSocket upgrade is refused. An open socket closes with code 1008 and reason account paused.
  • Platform AI calls are refused 429 account_paused, with Retry-After (Use the AI package).
  • Deploy, promote, roll back, restart and resume are refused 409 account_paused before a row is written.

While the account is paused, you can still check a deploy, read management information, use settings and secrets, stop an environment, export or delete data, and sign in as the owner. Data is kept. The pause leaves Turn Zero's unlimited applications and operated applications unaffected.

The pause ends at the first instant of the next UTC month, or earlier when a grant becomes live. A background pass puts paused compute to sleep and restores it when the pause ends. It leaves each environment's own sleep setting as it was.

Read the account's warnings #

The balance read's state.reached gives the latest threshold reached this UTC month. With no live credit, it measures the month's Free Allowance. With live credit, it measures Free Allowance and credit together. These account warnings are separate from tzcloud_read_usage's per-measure warning_fraction.

Use the exact amounts in millionths of a dollar. Add the fields in the table to find the amount used and the total the warning compares it with.

Credit at the read Used Base
No live credit drawn_micros allowance_micros
credit_left_micros above zero drawn_micros + credit_drawn_micros allowance_micros + credit_drawn_micros + credit_left_micros

No response member gives either sum. The threshold record and balance members are separate store reads; a debit between them can leave a temporary difference until the next read.

state.recorded lists the warnings pass's recordings. A purchase starts the thresholds again: the next pass removes recordings made before its grant's instant, and a threshold reached again can be recorded again. An operator's grant removes none. Until the next warnings check completes, the read may show old warning records next to the account’s current amounts.

state.pause_recorded_at is when the warnings pass recorded the 100% threshold. That timestamp can still appear after an operator’s grant ends the pause. state.paused gives the current pause status. state.paused_until is null unless the account is paused. state.basis is enforced, and state.would_pause is always false.

If a live grant remains, balance.credit_next_expiry_at gives its earliest expiry instant. It is absent, never null, otherwise. Only the remainders of grants expiring then expire at that instant; later grants can remain. The read gives no amount for that expiry.

The account's warnings come by email.

4. Read the dashboard #

Open Settings, then Balance & usage. On the tabbed screen, Overview shows the balance and this month's totals. Select Usage to find Monthly summary, Account charges, and By application. The page reads read_account for account details and read_balance for the balance, warnings and pause with its end. Each application's card shows a server size where recorded, its environment sleep settings, and any log entries refused at the size limit during the last day.

Applications no longer in this account groups moved or deleted applications whose usage remains in the month. Each card and that group end with Usage subtotal.

Open Monthly options in Balance & usage. Choose a space for tzTrack AI reviews. The picker lists spaces owned by your account or its applications. Choose an application to see 30-day logs, Custom domain and Database.

Confirm before changing either switch. Turning on tzTrack AI reviews also enables reviews for the space. If the option is already on and reviews are paused, select Enable reviews.

Returning to 7-day logs permanently deletes logs older than 7 days. New logs are kept for 7 days. On an unlimited application, 30-day logs shows Not applicable.

Custom domain shows Configured with the host name, Not configured or No app yet. Use the prompt on that row to ask your AI for help. Database shows Shared, Dedicated · 2 GB, Dedicated · 4 GB, Dedicated · 8 GB, No database or No app yet. If the dashboard cannot determine the database's size, it shows Database size unavailable.

If your session has expired, select Sign in again to return to Monthly options.

Expected result #

read_balance answers the UTC month's cost and balance. Read balance.left for the remaining allowance and balance.credit_left for remaining credit. The credit field appears only if your account has held a credit grant. If state is present, use state.paused and state.paused_until for a pause. A null state gives no pause record. lines identify charged items by rate key, application and environment.

  • Your account explains the account and its signed-in controls.
  • Size and usage covers application quantities, limits and size changes.
  • Pricing gives the current rates.