Environments
Each MAES Platform project has two completely isolated environments: Sandbox and Production.
Sandbox Environmentโ
The sandbox is your development playground.
Characteristicsโ
- โ Mock data โ No real MAES operations
- โ Safe testing โ Experiment without consequences
- โ Instant responses โ No waiting for MAES portal
- โ Webhook testing โ Event simulator & scheduled events
Use Casesโ
- Developing new integrations
- Testing edge cases
- CI/CD pipelines
- Demo environments
API Key Prefixโ
sk_sandbox_aBcDeFgHiJkLmNoPqRsTuVwXyZ...
Production Environmentโ
Production connects to the real MAES portal.
Characteristicsโ
- โก Real operations โ Actual MAES portal changes
- ๐ Background sync โ Data synced from MAES
- ๐ Live data โ Real card information
- ๐ Real events โ Actual webhook notifications
Use Casesโ
- Live fleet management
- Real card operations
- Production integrations
API Key Prefixโ
sk_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ...
Environment Isolationโ
Environments are completely isolated:
| Aspect | Sandbox | Production |
|---|---|---|
| Cards | Mock/test cards | Real MAES cards |
| API Keys | sk_sandbox_* | sk_live_* |
| Webhooks | Independent config | Independent config |
| Operations | Instant (simulated) | Background (real) |
warning
You cannot access production data with a sandbox API key, and vice versa.
Switching Environmentsโ
In the Dashboardโ
Click the environment tab in your project:
[Project Name]
โโโ ๐งช Sandbox โ Click to switch
โโโ ๐ Production โ Click to switch
In Your Codeโ
Simply use the appropriate API key:
// Development/Testing
const API_KEY = process.env.MAES_SANDBOX_KEY; // sk_sandbox_...
// Production
const API_KEY = process.env.MAES_PRODUCTION_KEY; // sk_live_...
Sandbox-Only Featuresโ
These features are available only in sandbox:
Event Simulatorโ
Manually trigger webhook events for testing:
POST /projects/{id}/webhook/simulate
{
"event": "card.enabled",
"cardId": "optional-card-uuid"
}
Scheduled Eventsโ
Automatically send test events at intervals:
PATCH /projects/{id}/webhook/scheduler
{
"enabled": true,
"intervalHours": 6,
"scheduledEvents": ["card.enabled", "card.disabled"]
}
Best Practicesโ
- Always develop in sandbox first
- Use environment variables for keys
- Test all edge cases in sandbox
- Have separate CI/CD keys
- Monitor production separately
# .env.development
MAES_API_KEY=sk_sandbox_xxxxx
# .env.production
MAES_API_KEY=sk_live_xxxxx