title: Environments
description: Understand sandbox and production environments and how to switch between them.
Environments
Wontopos provides two environments for development and production use.
Sandbox vs. Production
Start in sandbox
Use the sandbox environment for development and testing. No real data is affected.
| Sandbox | Production | |
|---|---|---|
| Base URL | https://sandbox.wontopos.com | https://api.wontopos.com |
| API Key prefix | sk_test_ | sk_live_ |
| Rate limits | 100 req/min | 1,000 req/min |
| Data | Test data only | Live data |
| Webhooks | Simulated events | Real events |
| Billing | No charges | Metered billing |
| SLA | Best effort | 99.9% uptime |
Base URLs
All API requests are scoped to one of these base URLs.
https://sandbox.wontopos.com/v1 https://api.wontopos.com/v1 GET
/v1/healthEnvironment variables
Configure your environment via variables or SDK options.
WONTOPOS_API_KEY=sk_test_your_key_here
WONTOPOS_BASE_URL=https://sandbox.wontopos.com
WONTOPOS_ENV=sandbox WONTOPOS_API_KEY=sk_live_your_key_here
WONTOPOS_BASE_URL=https://api.wontopos.com
WONTOPOS_ENV=production Switching environments
Switch by changing the API key and base URL. The SDK auto-detects based on key prefix.
Update your API key
Replace the sk_test_ key with your sk_live_ key.
export WONTOPOS_API_KEY="sk_live_your_production_key"Set the base URL
Point to the production API.
export WONTOPOS_BASE_URL="https://api.wontopos.com"Verify the switch
Confirm you are hitting the correct environment.
curl $WONTOPOS_BASE_URL/v1/health
-H "Authorization: Bearer $WONTOPOS_API_KEY" Expected response:
{
"status": "ok",
"environment": "production"
}SDK configuration
Pass the environment directly in code.
// JavaScript
import Wontopos from "@wontopos/sdk";
// Sandbox
const sandbox = new Wontopos(process.env.WONTOPOS_API_KEY, {
baseUrl: "https://sandbox.wontopos.com",
});
// Production
const production = new Wontopos(process.env.WONTOPOS_API_KEY, {
baseUrl: "https://api.wontopos.com",
}); # Python
import wontopos
# Sandbox
sandbox = wontopos.Client(
api_key="sk_test_...",
base_url="https://sandbox.wontopos.com",
)
# Production
production = wontopos.Client(
api_key="sk_live_...",
base_url="https://api.wontopos.com",
) // Go
// Sandbox
sandbox := wontopos.NewClient(
"sk_test_...",
wontopos.WithBaseURL("https://sandbox.wontopos.com"),
)
// Production
production := wontopos.NewClient(
"sk_live_...",
wontopos.WithBaseURL("https://api.wontopos.com"),
) Do not mix keys and environments
A sandbox key will return `401 Unauthorized` against the production URL, and vice versa.
Next steps
- Quickstart — End-to-end setup walkthrough
- Authentication — Key types, OAuth, and scopes
- API Reference — Full endpoint documentation