Environments
Matchstra provides multiple environments to support your development lifecycle. This guide explains each environment and how to use them effectively.
Available Environments
Production
Base URL: https://api.matchstra.ca
The production environment is the live system serving real customer data.
Use for:
- Live customer-facing applications
- Production workloads
- Real identity verification and screening
Characteristics:
- ✅ 99.9% uptime SLA
- ✅ Full feature set
- ✅ Real sanctions and PEP data
- ✅ Charges count against your license quota
- ⚠️ Use production API keys only
Example:
curl -X POST https://api.matchstra.ca/api/Screening/screen \
-H "X-API-Key: sk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "entityType": "Individual"}'
Staging (Coming Soon)
Base URL: https://staging-api.matchstra.ca (Planned)
A pre-production environment mirroring production for final testing.
Use for:
- Pre-release testing
- Integration testing
- Load testing
- Reproducing production issues
Characteristics:
- Mirrors production configuration
- Test data only (no real PII)
- Separate API keys
- Does not count against production quota
Sandbox (Coming Soon)
Base URL: https://sandbox-api.matchstra.ca (Planned)
A fully isolated testing environment with mock data.
Use for:
- Development and prototyping
- CI/CD automated tests
- Learning and experimentation
- Demo applications
Characteristics:
- Mock responses (predictable test data)
- Unlimited requests (no quota limits)
- No real screening or verification
- Separate API keys
Environment Selection
Choose the appropriate environment based on your use case:
| Use Case | Environment | API Key Type |
|---|---|---|
| Live customer traffic | Production | sk_live_... |
| Pre-deployment QA | Staging | sk_staging_... |
| Development | Sandbox | sk_sandbox_... |
| CI/CD tests | Sandbox | sk_sandbox_... |
| Demos | Sandbox | sk_sandbox_... |
Configuration Examples
Environment Variables
Store environment-specific configuration in environment variables:
# .env.production
MATCHSTRA_API_URL=https://api.matchstra.ca
MATCHSTRA_API_KEY=sk_live_abc123...
# .env.staging
MATCHSTRA_API_URL=https://staging-api.matchstra.ca
MATCHSTRA_API_KEY=sk_staging_xyz789...
# .env.development
MATCHSTRA_API_URL=https://sandbox-api.matchstra.ca
MATCHSTRA_API_KEY=sk_sandbox_test123...
JavaScript/Node.js
// config.js
const config = {
production: {
apiUrl: 'https://api.matchstra.ca',
apiKey: process.env.MATCHSTRA_API_KEY_PROD
},
staging: {
apiUrl: 'https://staging-api.matchstra.ca',
apiKey: process.env.MATCHSTRA_API_KEY_STAGING
},
development: {
apiUrl: 'https://sandbox-api.matchstra.ca',
apiKey: process.env.MATCHSTRA_API_KEY_SANDBOX
}
};
const env = process.env.NODE_ENV || 'development';
module.exports = config[env];
C# (.NET)
// appsettings.json (per environment)
{
"Matchstra": {
"ApiUrl": "https://api.matchstra.ca",
"ApiKey": "sk_live_abc123..."
}
}
// Usage in code
public class MatchstraConfig
{
public string ApiUrl { get; set; }
public string ApiKey { get; set; }
}
// Startup.cs or Program.cs
services.Configure<MatchstraConfig>(
Configuration.GetSection("Matchstra")
);
Python
# config.py
import os
ENVIRONMENTS = {
'production': {
'api_url': 'https://api.matchstra.ca',
'api_key': os.getenv('MATCHSTRA_API_KEY_PROD')
},
'staging': {
'api_url': 'https://staging-api.matchstra.ca',
'api_key': os.getenv('MATCHSTRA_API_KEY_STAGING')
},
'development': {
'api_url': 'https://sandbox-api.matchstra.ca',
'api_key': os.getenv('MATCHSTRA_API_KEY_SANDBOX')
}
}
ENV = os.getenv('ENVIRONMENT', 'development')
config = ENVIRONMENTS[ENV]
API Compatibility
All environments share the same API contract:
- Identical endpoint paths
- Same request/response schemas
- Consistent error codes
- Matching HTTP status codes
This ensures code written for one environment works seamlessly in others (with only configuration changes).