Skip to main content
A Ledger workspace has two environments, Sandbox and Live. Each one has its own API keys, catalog, customers, balances, usage history and Stripe account. Nothing is shared between them, so a test in Sandbox can never touch a real customer.

The API key chooses the environment

There’s one API host, https://api.integrateledger.com, for both environments. Ledger reads the environment from the key on each request: A request body or header can’t switch environments. A Sandbox key that asks for a Live customer gets 404 customer_not_found, because that customer doesn’t exist in Sandbox. The same customerId can exist in both environments as two separate customers. In the dashboard, the switch at the top of the sidebar chooses which environment you’re looking at. Sandbox pages carry a hatched band across the top; Live pages carry an ink band.

Sandbox

Sandbox is ready the moment your workspace exists:
  • A Stripe test account. Ledger creates one for your workspace on its Stripe Connect platform, shown in Settings › Stripe as created by Ledger. Paid plans sync to it, and Checkout runs on it, with no setup. You can connect your own sk_test_ key instead (see Stripe).
  • Test payments. Checkout takes Stripe test cards, such as 4242 4242 4242 4242.
  • Simulated time. Move a customer through renewals on a Stripe test clock. See Simulated time.
  • Overage. Paid plans can bill usage past their allowance. See Overage.
  • Deleting customers removes their usage events too, so you can start over cleanly.

Live

Live takes real payments from your own Stripe account. Before it can, you finish a short setup in the dashboard: a Live API key, your live Stripe key, the payment webhook, Checkout redirect URLs and a paid plan synced to Stripe. Then you activate Live from Settings, and live charges start straight away. Ledger can suspend a workspace that breaks its terms. Deploy walks through each step. Free plans work in Live as soon as you have a Live API key, because they never touch Stripe.

What Live doesn’t support yet

Deleting a Live customer keeps its usage events as the record of what the customer used.

Next steps

Deploy and go live

Finish Live setup and take your first real payment.

API keys and permissions

Create keys for each environment and limit what they can do.