Skip to main content

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:

AspectSandboxProduction
CardsMock/test cardsReal MAES cards
API Keyssk_sandbox_*sk_live_*
WebhooksIndependent configIndependent config
OperationsInstant (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โ€‹

  1. Always develop in sandbox first
  2. Use environment variables for keys
  3. Test all edge cases in sandbox
  4. Have separate CI/CD keys
  5. Monitor production separately
# .env.development
MAES_API_KEY=sk_sandbox_xxxxx

# .env.production
MAES_API_KEY=sk_live_xxxxx