Skip to main content
Running sandboxes draw from your prepaid Credits balance. Before You Begin: A BoxRouter dashboard account. For client calls, install a client and set an API key with credentials:manage: select Manage Provider Keys (BYOK) when you create it. See key permissions. In a team workspace, a signed-in person needs the billing:manage permission instead; keys use credentials:manage.

Buy Credits

Open Credits in the dashboard and choose an amount within the allowed range. Checkout shows the credits, a 5% processing fee, any sales tax and the total due before you pay. The purchase completes when the payment is confirmed. You get the full amount you chose. The fee is rounded up to the cent and isn’t refunded. Sandboxes use credits at the provider’s cost, with no markup. Purchased credits don’t expire. Promotional credits have no cash value and can’t be refunded. To close an unpaid Checkout session, use the purchase row in the dashboard. From a client, list the purchases with credits.purchases (CLI: boxrouter api credits purchases) and copy the purchase’s id:
Cancelling closes only an unpaid session; a payment that completed stays confirmed.

Check Your Balance

The dashboard shows your balance under Credits. From a client:
A nanodollar is one billionth of a US dollar.

See What a Sandbox Was Charged

A sandbox paid with credits has a Charge section in its dashboard drawer, and a charge field in the API. BYOK sandboxes have none: their provider bills you. A sandbox whose reservation was released without a charge has none either. The charge is the provider’s cost, with no markup. The info icon shows its working: the provider’s reported or calculated cost, as basis says. If the provider’s records change later, a correction moves the charge. It appears in corrections and never reopens the reservation. A raise takes the difference from your balance; a cut returns it. Charges and corrections also appear next to your purchases in Recent Transactions and the full history. Download the history as CSV, or list the rows with boxrouter api credits usage. Each sandbox’s open reservation and each reservation released without a charge are rows too, marked as reserved or released. They lower your available balance until the sandbox is charged or the reservation is released, but they aren’t charges. Each row’s key_id names the API key behind it. A sandbox created without lifetime_seconds renews its reservation hourly while your balance covers it. charge.funding and funded_until tell you how: see run while funded.

Redeem a Promo Code

Enter a promo code in the dashboard under Credits (Redeem code). A valid code adds its credit to your balance at once and appears in the history as Promo Code. A code works once for your workspace; entering it again returns promotion_already_redeemed and grants nothing more. Redeeming needs a signed-in dashboard session, not an API key. Promotional credit has no invoice or receipt and can’t be refunded.

Find Invoices and Receipts

Every confirmed purchase has an invoice and a receipt. Find the purchase under Credits, then choose Invoice or Receipt to open its Stripe page, which also downloads either one. The API’s boxrouter api credits purchases returns the same links on confirmed purchases.

Refund Unused Credit

Any signed-in workspace member can request a refund from the purchase row. A refund is available only when all of these hold: The preview shows the unused credit, the retained fee, the tax Stripe adds to the credit note, and the total returned to the original card. Accepting a refund removes the refunded amount from your available credit at once and turns off auto top-up. Previewing and requesting a refund need a signed-in dashboard session. An API key gets 403. The Refund Policy covers cases outside self-service, such as duplicate charges, metering errors, or unauthorized activity.

Top Up Automatically

To turn it on:
  1. Under Credits, choose Enable on the Auto Top-Up card.
  2. Set a threshold, an amount within the purchase bounds, and your saved cards.
Enabling needs a default saved card. Add one in the dashboard through Stripe’s hosted page, never through the API. Auto top-up compares your available balance with the threshold. A new sandbox’s reservation can put you under it before any usage settles.
  • On save. If the balance is already under the threshold, saving buys the amount immediately. The dialog names the amount first. Each top-up charges the amount plus the processing fee and any sales tax.
  • In the background. When the balance falls under the threshold, it buys once for that dip. It buys again only after the balance has been back at or above the threshold.
  • Cards. Cards are tried in your saved order. If one declines, the next is charged, and last_attempt.fallback_card names the one that worked.
If every card declines, needs authentication, or none is left, auto top-up turns itself off and records disabled_reason. It never retries automatically. Fix the card, then enable it again. Read the current settings and the saved cards. Both calls change nothing:
Turn it on with a threshold and an amount, both in US cents. This example charges your default card at once if your balance is already under 500 cents (5 dollars). Without a default saved card, the update fails with 409 payment_method_required.
To change the order in which cards are tried, send every saved card ID exactly once. This example reads the IDs from payment-methods and puts the last card first:
Re-run auto-top-up and payment-methods to check enabled, threshold_minor, amount_minor and the cards’ priority, when present.

Get Low-Balance Alerts

An alert works without auto top-up. In the dashboard, tick the low-balance email box in the Auto Top-Up settings; it uses the auto top-up threshold. Through the API the alert has its own low_balance_threshold_minor, in US cents, and null turns it off:
You get one alert when the available balance falls under the threshold. You get another only after the balance has recovered to the threshold and fallen again. A separate notice goes out at zero balance. email_delivery is configured when the workspace owner’s verified address can receive notices. log_only means the deployment sends no email and notices are only logged, so check your balance on the Credits page.

Next Steps

Cap Your Spend

Cap what a workspace can spend.

How Sandbox Cost Works

Read what a sandbox cost.

Connect a Provider Key

Pay with your own provider account instead.