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

# Sandbox Testing

> Use the sandbox environment to validate KYC, cards, and deposits before production.

## Environments

Use separate API keys per environment.

| Environment | Base URL                                                                    |
| ----------- | --------------------------------------------------------------------------- |
| Sandbox     | <code>[https://dev-api.machines.cash](https://dev-api.machines.cash)</code> |
| Production  | <code>[https://api.machines.cash](https://api.machines.cash)</code>         |

Recommended env file for local API testing:

```bash theme={null}
cat > .env.local <<'EOF'
MC_ENV=sandbox
MC_API_BASE_URL=https://dev-api.machines.cash/partner/v1
MC_API_BASE_URL_PRODUCTION=https://api.machines.cash/partner/v1
MC_PARTNER_KEY=replace-with-your-sandbox-partner-key
EOF

set -a
source .env.local
set +a
```

## Sandbox KYC shortcut

To bypass KYC in sandbox, set the applicant's <code>lastName</code> to <code>approved</code> when calling <code>POST /kyc/applications</code>. The next status check returns <code>approved</code>.

```bash theme={null}
curl --request POST \
  --url ${MC_API_BASE_URL}/kyc/applications \
  --header 'Authorization: Bearer <SESSION_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "John",
  "lastName": "approved",
  "birthDate": "1990-01-01",
  "nationalId": "123456789",
  "countryOfIssue": "US",
  "email": "jsmith@example.com",
  "address": {
    "line1": "123 Main St",
    "city": "New York",
    "region": "NY",
    "postalCode": "10001",
    "countryCode": "US"
  },
  "occupation": "49-3023",
  "annualSalary": "<40k",
  "accountPurpose": "testing",
  "expectedMonthlyVolume": "under $1k"
}
'
```

## Sandbox deposits (rUSD on Base Sepolia)

Sandbox deposits use rUSD on Base Sepolia. You need Base Sepolia ETH for gas.

### 1) Create a deposit intent

```
POST /deposits
{
  "currency": "rusd",
  "network": "base",
  "amount": 25
}
```

The response includes <code>deposit.id</code> and <code>deposit.depositAddress</code> (the Base Sepolia deposit address).

### 2) Mint rUSD

Mint rUSD on Base Sepolia, then send it to <code>deposit.depositAddress</code>.

* Chain: Base Sepolia (<code>84532</code>)
* rUSD contract: <code>0x10b5Be494C2962A7B318aFB63f0Ee30b959D000b</code>
* Mint function: <code>mint(uint256 amountDollars\_Max100)</code>
* Max per mint tx: 100 rUSD

### 3) Track status

Poll until the deposit completes:

```
GET /deposits/{"{depositId}"}
```

<Note>Sandbox deposits are for testing only. Production deposits use USDC on Base.</Note>
