Sandbox environment

Updated November 24, 2026

A sandbox environment is an isolated space for running and testing software, an integration or an API call without affecting production systems or real customers. In security, it restricts what untrusted code can reach. In API products, it usually means a test account, test keys or a free tier with limits, where developers check requests and responses before going live.

In short: A sandbox environment is an isolated, restricted space for testing code or API integrations without touching production, ranging from security sandboxes for untrusted code to free or test API tiers.

How a sandbox environment works

The word sandbox covers two related ideas, and both turn on limits. One limits what code can reach, and the other limits what a test can change.

The security sense. NIST glossary sources describe a sandbox as a restricted, controlled execution environment 1. It stops potentially malicious software from reaching any system resources beyond those it is authorized to use 1. A program in a sandbox is usually kept away from the file system or the network 1. Browsers, AI agent runtimes and malware analysis tools all use this kind of sandbox.

The API sense. For an API product, a sandbox is a place to build and test an integration before it runs on real data or real money. Stripe's version is an isolated test environment where a team can experiment without affecting its live integration 2. Payments created there are not processed by card networks or payment providers 2.

What isolation buys. A good sandbox keeps tests from leaking into production and keeps tests from colliding with each other. Stripe recommends separate sandboxes for local development and continuous integration 2. Changes made in one sandbox do not interfere with another 2.

Common forms. API sandboxes come in a few shapes. Some are a separate host with test keys and simulated data. Some are a test mode on the same account. Others are a free tier on the real service with tight quotas, so the responses are real but the volume is small. Each answers a different question. Simulated data tests code paths. A free tier on real data also tests whether the data is good enough.

What a sandbox cannot show. Production traffic, real rate limit pressure and real error mixes rarely appear in a test. Plan a short, monitored first run in production even after the sandbox passes. Write down what the sandbox could not test, so the first production run checks exactly those things.

How the RichAPI Sandbox works

RichAPI's Sandbox is a free tier on the same API, and the pricing page describes no separate mock-data mode 3. It lists the Sandbox with 100 credits, no card, every endpoint available, REST and MCP access, and a rate limit for evaluation 3. It is meant for the first 200 OK and an MCP test drive 3.

Real calls, real credits. The pricing FAQ says the 100 Sandbox credits are enough to validate the response shapes and run the MCP install end to end 3. Each call spends credits at the endpoint's published rate, so choose cheap calls for shape checks. Status checks and inquiry endpoints are free 3.

One key. Every request carries an API key in the x-api-key header against the base URL on the developers page 4. The same key and credit pool work for the REST API and the MCP server 4.

The limit. The Sandbox allows 1 request per second, with short bursts of up to twice the limit 3. A request over the limit gets a 429 with a Retry-After header 3. Build the retry logic now, because paid tiers use the same mechanism at higher limits.

Running out. When credits run out, the API returns a 402 with a clear error 3. Treat that as a handled case in the integration, not a crash. Moving to a paid bundle needs a card, and the Sandbox itself does not 3.

Example of testing a data API in a sandbox

A developer is adding company and contact enrichment to an internal tool. She signs up, gets a key and the free Sandbox credits, and sets a test plan before writing any production code 4.

Check the shape. The first call is a single profile enrichment, which the developers page prices at 1 credit 4. She saves the JSON response as a fixture for unit tests.

Check the cost. The next call hits the usage endpoint, which the developers quickstart marks as free, to confirm what the first call billed 4.

Check the limit. A small script sends three requests at once. The Sandbox allows short bursts of twice its 1 request per second limit, so the third one comes back as a 429 3.

text
request   status  note
first     OK      enrich_profile, fixture saved
second    OK      usage check, free
third     429     over the limit, Retry-After honored

Check the failure path. She adds handling for the 402 the API returns when credits run out 3, so the tool shows a clear message instead of a stack trace.

Go live. The fixtures cover the code paths, the retry logic is tested, and the first paid run is a small batch watched in the logs. She keeps the Sandbox key for later debugging, because the fixtures will go stale when response fields change, and a quick live call is the fastest way to refresh them.

Sandbox environment vs production environment

A sandbox and production can share code and keys. The difference is what a mistake costs, which is why Stripe keeps test payments away from card networks 2.

Sandbox environmentProduction environment
What it answersDoes the integration work as designed?Does it work for real users at real volume?
InputTest keys, fixtures, small real samplesLive traffic and customer data
OutputConfidence before launchBusiness results
Cost driverDeveloper time and small test spendFull usage and incident risk
Main riskTests that do not resemble productionBugs reaching customers
Use it whenBuilding, changing or debugging an integrationThe integration has passed its tests
Read the reference →

Frequently asked questions

What is the purpose of a sandbox environment?

To test software, an integration or untrusted code without affecting production systems or real customers. In API products it lets developers check requests, responses and error handling before go-live. In security it limits what code can reach 1.

Is a sandbox the same as a test environment?

Mostly. A test or staging environment usually mirrors production for a whole application. A sandbox is often narrower, scoped to one account, one integration or one piece of untrusted code. Stripe calls its sandboxes isolated test environments 2.

Does RichAPI have a sandbox?

Yes. The RichAPI Sandbox is a free tier with 100 credits and no card, with every endpoint available over REST and MCP and a rate limit for evaluation 3. Calls run against the real service and spend credits.

What happens when Sandbox credits run out?

The API returns a 402 with a clear error 3. To keep going, buy a credit bundle, which needs a card. Bundle credits never expire, and the rate limit rises with the credits the account buys in a month 3.

The bottom line

A sandbox environment is an isolated place to test code or an API integration without touching production 1. API sandboxes range from simulated data to free tiers on the real service. RichAPI's Sandbox is the second kind, with 100 credits, no card, all endpoints and a 1 request per second limit 3. Save real responses as fixtures and test the 429 and 402 paths before launch 3.

Sources

  1. Sandbox, Glossary, NIST Computer Security Resource Center
  2. Sandboxes, Stripe Documentation
  3. Pricing, RichAPI
  4. Developers, RichAPI

More terms