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

# Testing in Sandbox

> Trigger Completed, Failed, and Refunded outcomes in the Borderless sandbox by varying the transaction amount.

The Borderless sandbox lets you exercise your integration end-to-end without moving real funds. Sandbox transactions do not call real PFIs — Borderless simulates the full transaction lifecycle, including the same intermediate statuses and webhook deliveries you would observe in production.

## Choosing the final status

The **final status** of a sandbox deposit, withdrawal, or exchange is determined by the **last digit of the integer part of `source.amount`**:

| Last digit of `source.amount`  | Final status |
| ------------------------------ | ------------ |
| `9` (e.g. `19`, `109`, `1009`) | `Failed`     |
| `8` (e.g. `18`, `108`, `1008`) | `Refunded`   |
| anything else                  | `Completed`  |

Only the integer part is considered — `19.99` triggers `Failed`, `10.50` triggers `Completed`. The rule applies regardless of currency, so you can use the same convention for fiat-denominated deposits and stablecoin-denominated withdrawals.

## Timing

Sandbox status transitions are emitted on a short delay (a few seconds between each status). The transaction moves through the same status sequence as in production — typically `Submitted` → `Verifying` → `Orchestrating` → `Pending` → `Processing` → final — so your integration can observe and react to each intermediate webhook just as it would in production.

## Cancellation

To exercise the `Cancelled` flow, cancel the transaction yourself via the API or dashboard while it is still in `Submitted`, `Verifying`, `Preparing`, or `Pending`. The amount-based trigger does not produce `Cancelled` on its own.

## Sandbox vs production

<Warning>
  Sandbox and production are fully separate environments. Sandbox API keys do not work against the production API. Triggering `Failed` or `Refunded` in sandbox has no effect on any production transaction.
</Warning>

<Info>
  If you have any questions, please don't hesitate to reach out to us via [email](mailto:support@borderless.xyz) or slack.
</Info>
