Skip to main content
Usage takes the plan credit first, then the prepaid balance. Use Billing to add money to the balance, to top it up on its own, to set a spending limit, and to see what each sandbox costs.

Set up the balance of my workspace.

Before you start

  • You need the Owner or Admin role to top up, to change automatic top-up, and to change the spending limit. Each member can see the balance and the usage. See roles.
  • Top-ups also work during the trial.

What the Billing page shows

To open the page, choose Settings in the rail, then Billing. These cards show the usage and the money:

Top up the balance

  1. In the rail, choose Settings, then Billing.
  2. In One-time top-up, choose an amount, or type a custom amount from $5 to $100,000. The card shows the bonus.
  3. Choose Top up.
  4. If the workspace has a saved card, a dialog shows the amount and the card, such as Charge $100.00 to Visa •••• 4242? Choose Charge. The default card pays. If the workspace has no default card, the newest card pays.
  5. If the workspace has no saved card, the Stripe page opens. Enter your card and confirm. Stripe saves the card for the next top-ups and sends you back to Billing.
The One-time top-up card with the amounts $25, $100, $500, and $1,000, a custom amount field, and the Top up button.The One-time top-up card with the amounts $25, $100, $500, and $1,000, a custom amount field, and the Top up button.
Balances and Charges show the top-up and its bonus after Stripe reports the payment as paid. Stripe sends a receipt for each top-up. See the bonus of each amount. If your bank asks you to confirm the payment, its page opens. Confirm the payment there. The bank sends you back to Billing, and Balances shows the top-up. If the bank declines the card, the dialog shows the error, and the balance does not change. To use a different card, choose Edit in Payment methods, add the card, and make it the default card. Then top up again.

Turn on automatic top-up

  1. In the rail, choose Settings, then Billing.
  2. In Automatic top-up, type the limit in When the funds go below, and the amount in Top up by. The amount must be $5 or more.
  3. Choose Save.
When the credit and the balance together go below the limit, your cards pay the amount, with its bonus. The default card pays first. If it declines, the next card pays. After 3 declined top-ups in a row, automatic top-up turns off, and the owners and admins get an email. Add a card, then choose Save again. To stop automatic top-up, choose Turn off.

Set a spending limit

  1. In the rail, choose Settings, then Billing.
  2. In Spending limit, type the limit for each month.
  3. Choose Save.
The owners and admins get an email when the usage of the month reaches 50%, 80%, and 100% of the limit. At 100%, the running sandboxes stop with their data kept, and a create or a resume answers 402 billing_required until the next month or until you raise the limit. To remove the limit, choose Remove.

Cap the use of each member

Member caps shows the running sandboxes and the unit-hours of this month for each member.
  1. In Member caps, choose the row of the member.
  2. Type the most sandboxes at the same time, and the most unit-hours each month. Leave a field empty for no cap.
  3. Choose Save.
A start above a cap answers 429 start_limit. The sandboxes of an API key count for the person who created the key. To remove the caps of more than one member, select their rows, choose Actions, then Remove caps.

See the cost of each sandbox

Usage this month shows the cost of each sandbox since the first day of the month (UTC). Cost by label shows the cost of each label. A sandbox with two labels counts in both rows. To download the usage of each hour of the month, choose Export CSV in Usage this month. The file has the columns hour_start, unit_seconds, and cost_usd.

Read the usage with the API

GET /v1/usage returns the usage of each minute, hour, or day in a window, with the credit and the balance. It needs the billing:read scope. Amounts are in micro-dollars: 1,000,000 is $1.
The default window is the last 24 hours, by minute. A window can have 10,080 points or fewer. To count only some sandboxes, add label=key:value. Send it more than one time for more labels. A sandbox must have each label. To get the cost of each value of a label, add groupByLabel=<key>. The answer then has groups, with the highest cost first. For example, label=env:prod&groupByLabel=customer gives the cost of each customer in production. A sandbox without the label is in the group with value: null. To get the cost of one sandbox for any window, call GET /v1/sandboxes/{id}/usage with from and to. The default window is the current month. To get the cost of each sandbox this month in a list, add include=cost to GET /v1/sandboxes. These two endpoints need the sandboxes:read scope.

When the credit and the balance are empty

With a paid plan, the workspace keeps running for 48 hours, and its balance can go below zero to the debt allowance. Balances shows the date when the sandboxes stop. After 48 hours, or at the debt allowance, the sandboxes stop with their data kept, and a create or a resume answers 402 billing_required. Top up the balance to start them again. See grace and debt. In the trial, or without a plan, the sandboxes stop when the credit and the balance are empty.