Environments
Sandbox vs live environments, testing, rate limits, and API versioning
RevKeen provides multiple environments so you can safely build, test, and deploy billing integrations without risking production data or real money.
Available Environments
| Environment | Base URL | Key Prefix | Purpose |
|---|---|---|---|
| Live | https://api.revkeen.com/v2 | rk_live_ | Production traffic, real money |
| Sandbox | https://sandbox-api.revkeen.com/v2 | rk_sandbox_ | Safe testing, no real charges |
| Mock | https://mock-api.revkeen.com/v2 | None required | Schema-only mock responses |
Live Environment
Use the Live environment for:
- Real customers
- Real transactions through your payment gateway
- Production integrations
GET /v2/customers
Host: api.revkeen.com
x-revkeen-key: rk_live_123...Live mode uses real payment rails. Always double-check the base URL and key prefix before sending requests.
Sandbox Environment
Use the Sandbox environment for:
- Development and staging environments
- Automated tests and CI/CD pipelines
- Integration trials with your own systems
- Client demos
Sandbox provides:
- Separate data from Live -- nothing crosses over
- The same API surface and validation rules as Live
- The
rk_sandbox_key prefix
GET /v2/customers
Host: sandbox-api.revkeen.com
x-revkeen-key: rk_sandbox_123...Sandbox Test Cards
When testing payments in Sandbox, use these test card numbers:
| Card Number | Result |
|---|---|
4111111111111111 | Successful payment |
4000000000000002 | Declined |
4000000000009995 | Insufficient funds |
4000000000000069 | Expired card |
Mock Environment
The Mock environment is backed by the Scalar mock server and uses only the OpenAPI specification:
- No persistence -- responses are generated from the schema
- No real side effects -- nothing is created or modified
- Deterministic sample responses
Use it when:
- You want to prototype quickly without credentials
- You are building a UI without real data
- You are validating request/response shapes
The Mock environment is best for shape validation. Use Sandbox when you need realistic flows, invoices, and subscriptions.
API Key Prefixes
Each key prefix is tied to its environment. Using the wrong prefix for an environment will result in a 401 Unauthorized error.
| Prefix | Environment | Example |
|---|---|---|
rk_live_ | Live (production) | rk_live_a1b2c3d4e5f6... |
rk_sandbox_ | Sandbox (testing) | rk_sandbox_x9y8z7w6... |
Rate Limits by Environment
Rate limits apply identically across Live and Sandbox environments, enforced per API key:
| Plan | Requests / minute | Burst |
|---|---|---|
| Starter | 60 | 10 |
| Growth | 600 | 50 |
| Enterprise | 6000 | 200 |
The Mock environment has a separate, more generous rate limit since it does not hit a real backend.
API Versioning
The RevKeen API uses URL-based versioning. The current version is v2.
- All endpoints are prefixed with
/v2/ - Breaking changes will result in a new version (e.g.,
/v3/) - Non-breaking changes (new fields, new endpoints) are added to the current version
- Deprecated endpoints are announced at least 6 months before removal
https://api.revkeen.com/v2/customers
https://sandbox-api.revkeen.com/v2/customersChoosing the Right Environment
Use this as a rule of thumb:
- Local dev / staging -- Sandbox
- QA / client demos -- Sandbox or Mock
- CI / automated tests -- Sandbox (for integration tests) or Mock (for unit tests)
- Production -- Live
All environments share the same OpenAPI spec, all are protected by Unkey, and all SDKs automatically respect your chosen environment.