***

title: Sandbox
description: Test Deel APIs safely with pre-populated data and isolated environments
------------------------------------------------------------------------------------

## What is the Sandbox?

The Deel API Sandbox is a **completely isolated testing environment** that mirrors production functionality without affecting real data, triggering actual payments, or creating legal contracts. It's pre-populated with sample data so you can start testing immediately.

* **Safe Testing**: Test without real money, contracts, or legal implications.
* **Pre-populated Data**: Use sample contracts, workers, and organizations right away.
* **Full API Access**: Experiment with all production endpoints in a safe environment.
* **Isolated Environment**: Keep test data and actions completely separate from production.

## Sandbox vs Production

| Feature            | Sandbox                                     | Production                         |
| ------------------ | ------------------------------------------- | ---------------------------------- |
| **Base URL**       | `https://api-sandbox.demo.deel.com/rest/v2` | `https://api.letsdeel.com/rest/v2` |
| **Data**           | Pre-populated sample data                   | Real business data                 |
| **Payments**       | Simulated (no real money moves)             | Real payments processed            |
| **Contracts**      | Test contracts (not legally binding)        | Legal contracts created            |
| **Rate Limits**    | Same as production                          | Same as production                 |
| **Authentication** | Separate API keys                           | Separate API keys                  |

<Warning>
  **Sandbox and Production use different API keys.** Never use production keys in sandbox or vice versa.
</Warning>

## Pre-populated Sample Data

Your sandbox comes with ready-to-use data for testing:

### Sample Workers

The sandbox includes pre-created workers across different contract types:

<AccordionGroup>
  <Accordion title="Sample Employees (EOR)" icon="user-tie">
    * **John Smith** - Full-time employee in United States
      * Contract ID: `eor_123456`
      * Status: Active
      * Salary: \$85,000/year

    * **Maria Garcia** - Full-time employee in Spain
      * Contract ID: `eor_789012`
      * Status: Active
      * Salary: €45,000/year

    * **Wei Chen** - Full-time employee in Singapore
      * Contract ID: `eor_345678`
      * Status: Onboarding
      * Salary: SGD 72,000/year
  </Accordion>

  <Accordion title="Sample Contractors (IC)" icon="briefcase">
    * **Sarah Johnson** - Hourly contractor in Canada
      * Contract ID: `ic_111222`
      * Status: Active
      * Rate: \$95/hour

    * **Ahmed Hassan** - Fixed-price contractor in UAE
      * Contract ID: `ic_333444`
      * Status: Active
      * Project Rate: \$5,000/milestone

    * **Lisa Park** - Pay-as-you-go contractor in South Korea
      * Contract ID: `ic_555666`
      * Status: Active
      * Rate: ₩120,000/hour
  </Accordion>

  <Accordion title="Sample Organizations" icon="building">
    * **Acme Corporation** (Main Org)
      * Org ID: `org_main_001`
      * Legal Entity: Acme Inc. (Delaware, USA)
      * 15 active workers

    * **Acme EMEA** (Child Org)
      * Org ID: `org_emea_001`
      * Parent: Acme Corporation
      * 8 active workers
  </Accordion>
</AccordionGroup>

### Test Credentials

Use these test workers to simulate different scenarios:

```json
// Test user credentials for webhook testing
{
  "worker_id": "test_worker_001",
  "email": "test.worker@deel-sandbox.com",
  "status": "active"
}

// Test organization admin
{
  "admin_id": "test_admin_001",
  "email": "admin@deel-sandbox.com",
  "organization": "org_main_001"
}
```

## How Sandbox Differs from Production

### Payments & Invoicing

* **Sandbox**: All payments are simulated. Invoice status changes to "paid" without actual fund transfers
* **Production**: Real money is transferred; payment failures are real

### Contract Signing

* **Sandbox**: E-signatures are simulated; documents are generated but not legally binding
* **Production**: Real DocuSign/SignNow integration; legally binding contracts

### Webhooks

* **Sandbox**: Webhooks fire normally; test webhook events in isolated environment
* **Production**: Webhooks trigger real business logic

### Background Checks & Verifications

* **Sandbox**: Always return success/approved status after 30 seconds
* **Production**: Real third-party checks (Veriff, Sterling, etc.)

### Email Notifications

* **Sandbox**: Emails are **not sent** to workers; check via API only
* **Production**: Real emails sent to workers and admins

## Testing Common Scenarios

<CodeGroup>
  ```bash Create Test Contract
  # Create a new contractor agreement in sandbox
  curl -X POST "https://api-sandbox.demo.deel.com/rest/v2/contracts" \
    -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "client_id": "org_main_001",
      "worker_email": "new.contractor@example.com",
      "job_title": "Backend Developer",
      "scope": "Software Development",
      "rate": 100,
      "rate_type": "hourly"
    }'
  ```

  ```bash Test Payment Flow
  # Submit an invoice for payment (simulated)
  curl -X POST "https://api-sandbox.demo.deel.com/rest/v2/invoice-adjustments" \
    -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "contract_id": "ic_111222",
      "amount": 1500,
      "description": "Project milestone completion"
    }'
  ```

  ```bash Test Webhooks
  # Trigger a test webhook event
  curl -X POST "https://api-sandbox.demo.deel.com/rest/v2/webhooks/test" \
    -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "event_type": "contract.signed",
      "contract_id": "ic_111222"
    }'
  ```
</CodeGroup>

## Resetting Sandbox Data

You can reset your sandbox environment to start fresh:

1. Go to [Developer Center](https://app.deel.com) → API Sandbox
2. Click **Reset Sandbox Data**
3. Confirm the reset

<Warning>
  Resetting will delete all test data you've created and restore the original pre-populated sample data.
</Warning>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I create unlimited test contracts in sandbox?" icon="circle-question">
    Yes! There are no limits on the number of test contracts, workers, or organizations you can create in sandbox. However, rate limits still apply to prevent abuse.
  </Accordion>

  <Accordion title="Do sandbox contracts expire?" icon="calendar">
    No. Sandbox contracts remain active indefinitely unless you manually terminate them or reset your sandbox environment.
  </Accordion>

  <Accordion title="Can I test international payments in sandbox?" icon="globe">
    Yes. You can create contracts in any supported country and test multi-currency payments. All conversions use real exchange rates but no actual money moves.
  </Accordion>

  <Accordion title="How do I test webhook failures?" icon="webhook">
    Use the webhook testing endpoint to simulate different webhook scenarios including failures, retries, and timeouts. See [Webhook Simulation](/api/webhooks/simulations) for details.
  </Accordion>

  <Accordion title="Can multiple developers share one sandbox?" icon="users">
    Each sandbox is tied to one set of credentials. For team testing, either share the sandbox credentials securely or create multiple sandboxes (one per developer).
  </Accordion>

  <Accordion title="Does sandbox data persist?" icon="database">
    Yes, your sandbox data persists until you manually reset it. Changes you make remain between sessions.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="fa-light key" href="/api/authentication">
    Learn how to authenticate sandbox API requests
  </Card>

  <Card title="Webhooks" icon="fa-light webhook" href="/api/webhooks/introduction">
    Learn more about webhooks
  </Card>

  <Card title="Sample Apps" icon="fa-light code" href="/api/quickstart#try-a-sample-app">
    Clone pre-built apps configured for sandbox
  </Card>

  <Card title="API Reference" icon="fa-light book" href="/api/reference">
    Explore all available endpoints
  </Card>
</CardGroup>
