> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.deel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.deel.com/_mcp/server.

# Sandbox

> 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-staging.letsdeel.com/rest` | `https://api.letsdeel.com/rest` |
| **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               |

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

## 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:

#### Sample Employees (EOR)

* **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

#### Sample Contractors (IC)

* **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

#### Sample Organizations

* **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

### 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

**`Create Test Contract`**

```bash Create Test Contract
# Create a new contractor agreement in sandbox
curl -X POST "https://api-staging.letsdeel.com/rest/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"
  }'
```

**`Test Payment Flow`**

```bash Test Payment Flow
# Submit an invoice for payment (simulated)
curl -X POST "https://api-staging.letsdeel.com/rest/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"
  }'
```

**`Test Webhooks`**

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

## 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

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

## Frequently Asked Questions

#### Can I create unlimited test contracts in sandbox?

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.

#### Do sandbox contracts expire?

No. Sandbox contracts remain active indefinitely unless you manually terminate them or reset your sandbox environment.

#### Can I test international payments in sandbox?

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.

#### How do I test webhook failures?

Use the webhook testing endpoint to simulate different webhook scenarios including failures, retries, and timeouts. See [Webhook Simulation](/api/webhooks/simulations) for details.

#### Can multiple developers share one sandbox?

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).

#### Does sandbox data persist?

Yes, your sandbox data persists until you manually reset it. Changes you make remain between sessions.

## Next Steps

#### [Authentication](/api/authentication)

Learn how to authenticate sandbox API requests

#### [Webhooks](/api/webhooks/introduction)

Learn more about webhooks

#### [Sample Apps](/api/quickstart#try-a-sample-app)

Clone pre-built apps configured for sandbox

#### [API Reference](/api/reference)

Explore all available endpoints