RevKeen Docs
Developers

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

EnvironmentBase URLKey PrefixPurpose
Livehttps://api.revkeen.com/v2rk_live_Production traffic, real money
Sandboxhttps://sandbox-api.revkeen.com/v2rk_sandbox_Safe testing, no real charges
Mockhttps://mock-api.revkeen.com/v2None requiredSchema-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 NumberResult
4111111111111111Successful payment
4000000000000002Declined
4000000000009995Insufficient funds
4000000000000069Expired 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.

PrefixEnvironmentExample
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:

PlanRequests / minuteBurst
Starter6010
Growth60050
Enterprise6000200

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/customers

Choosing 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.

Next Steps

On this page