> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rheon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Proposal: Sandbox

> Test credentials, simulating outcomes, and simulating time.

<Info>
  **Proposal, not live spec.** A sandbox design drawn from Stripe, Transak, and Plaid. For
  team review once the test environment is built.
</Info>

## Encode the outcome in the input (the key pattern)

The best sandboxes make the developer change **one value** to test each path, instead of
reading config:

* **Stripe** encodes the result in the card number (`4000000000009995` = insufficient funds)
* **Transak** encodes it in an email alias (`xyz+refund@...` → refunded, `+failed` → failed)

> Rheon fit: pick one input field (e.g. amount or a test wallet) where a magic value
> selects success / pending-then-complete / pending-then-fail / refund.

## One canonical happy-path credential

Like Stripe's `4242 4242 4242 4242` or Plaid's `user_good` - one value to remember that
covers \~90% of testing.

## Simulating outcomes

| Scenario                      | How to trigger       | Final state              |
| ----------------------------- | -------------------- | ------------------------ |
| Success                       | default test deposit | `completed`              |
| Insufficient funds / declined | magic value          | `failed`                 |
| Pending then complete         | magic value          | `routing` → `completed`  |
| Pending then fail             | magic value          | `routing` → `failed`     |
| Refund                        | magic value          | `completed` → `refunded` |

## Simulate time (Stripe Test Clocks)

Stripe lets you advance a sandbox clock so you don't wait for renewals/expiry. This is
**directly relevant** to Rheon's escrow with an expiry deadline - a "test clock" would let
us test the expiry / reclaim path without waiting.

## Sandbox vs production (be explicit)

| Aspect     | Sandbox                     | Production           |
| ---------- | --------------------------- | -------------------- |
| Funds      | Mock                        | Real                 |
| Settlement | Instant                     | Real on-chain timing |
| Coverage   | Subset                      | Full                 |
| Data       | Mock - not for calculations | Real                 |

Call out (Meld pattern): "do not build pricing/calculation logic on sandbox responses."
