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

# Sandbox

> Test your integration in the SmartRetry sandbox environment before going live.

The SmartRetry sandbox is a full simulation of the production environment. It lets you run API calls and validate response handling without processing real transactions.

## Getting sandbox access

To get sandbox credentials, contact SmartRetry or request access through your account manager. You will receive a sandbox API key and a sandbox terminal ID to use during testing.

## Authenticating in the sandbox

Authentication works the same way as production - pass your API key in the `x-api-key` header. Your sandbox key is separate from your production key; make sure you are using the correct one for each environment.

```bash theme={null}
x-api-key: YOUR_SANDBOX_API_KEY
```

<Warning>
  Never use your production API key in sandbox testing, and never use your sandbox key in production.
</Warning>

## What you can test

The sandbox replicates the full production flow. Use it to verify:

<CardGroup cols={2}>
  <Card title="API requests" icon="code">
    Test sale, refund, and other payment endpoints using your sandbox terminal ID.
  </Card>

  <Card title="Response handling" icon="check">
    Confirm your integration handles approved, declined, and error responses correctly.
  </Card>

  <Card title="Retry behavior" icon="rotate-right">
    Observe how SmartRetry responds to declines and triggers retry logic.
  </Card>

  <Card title="Error scenarios" icon="triangle-exclamation">
    Simulate decline codes and validation errors to test your error handling paths.
  </Card>
</CardGroup>

<Tip>
  Test both success paths and failure paths. Simulate declines to confirm your integration handles retry events, error codes, and fallback flows correctly - not just happy-path approvals.
</Tip>

## Verifying your integration

After making requests in the sandbox, confirm SmartRetry is active and working by checking for **retry events** in your dashboard or API logs. Each retried transaction includes a reference to the SmartRetry process, along with timestamps and result details.

If you are not seeing retries triggered as expected, contact [support@smartretry.com](mailto:support@smartretry.com) and the team will review your integration.

## Moving to production

Once you have validated your integration in the sandbox, follow these steps to go live:

<Steps>
  <Step title="Replace your API key">
    Swap your sandbox `x-api-key` for your production API key in all requests.
  </Step>

  <Step title="Update your terminal ID">
    Replace your sandbox `terminal_friendly_id` with your production terminal ID in all endpoint URLs.
  </Step>

  <Step title="Point to the production base URL">
    Confirm all requests go to `https://terminal.smartretry.com`. The sandbox and production environments share the same base URL - the API key and terminal ID determine which environment you are targeting.
  </Step>

  <Step title="Run a live test transaction">
    Process a low-value real transaction to confirm end-to-end connectivity before enabling full traffic.
  </Step>
</Steps>

## Status page

Monitor the health of the SmartRetry API and infrastructure at [status.smartretry.com](https://status.smartretry.com). If you experience unexpected errors or connectivity issues, check the status page first before escalating to support.
