Skip to main content

Sandbox Testing

The MLM Platform provides sandbox environments for safe testing without affecting production data.

Overview

Sandbox environments allow you to:
  • Test API integrations without real transactions
  • Simulate purchases and commission flows
  • Create test users and hierarchies
  • Reset data for clean test runs

Creating a Sandbox

  1. Navigate to Settings > Environments in the Admin Dashboard
  2. Click Create Sandbox
  3. Enter a label (e.g., “Development”, “QA”)
  4. Optionally connect Stripe test mode
  5. Click Create
You can create up to 3 sandbox environments per tenant.

Sandbox API Keys

Each sandbox has its own API keys:
  1. Go to Settings > API Keys
  2. Click Create API Key
  3. Select your sandbox environment
  4. Copy the key (prefix: mlm_sandbox_)

Simulating Purchases

Use your sandbox API key to record purchase events safely:
Response:

Creating Test Users

Create test users for building hierarchies:

Resetting Sandbox Data

To reset your sandbox, use the Admin Dashboard to reset or recreate your sandbox environment.

Cloning Configuration

Copy your production commission rules to sandbox:
This copies:
  • Commission rules and rates
  • Tier configurations
  • Payout settings
It does not copy:
  • User data
  • Commission history
  • API keys or credentials

Testing Stripe Integration

Connect Stripe Test Mode

  1. Go to Settings > Environments
  2. Select your sandbox
  3. Click Connect Stripe
  4. Use Stripe test mode credentials

Test Card Numbers

Test Webhooks

Use Stripe CLI to forward test webhooks:

Environment Detection

Verify you’re in sandbox mode:

Best Practices

Separate Test Data

  • Use distinct email patterns: test-*@example.com
  • Use recognizable product names: [TEST] Product Name
  • Add metadata: { "test": true, "scenario": "happy-path" }

Automated Testing

CI/CD Integration