RevKeen Docs

API Overview

Base URLs, authentication, pagination, idempotency, rate limits, and SDK setup for the RevKeen API.

The RevKeen API is organized around a single REST surface for payments, billing, subscriptions, invoicing, usage, and terminal workflows. Use this page for the platform-wide rules. Use the interactive API reference for endpoint-by-endpoint details.

Start Here

Base URLs

EnvironmentBase URLPurposeNotes
Productionhttps://api.revkeen.com/v2Live traffic and real transactionsUse rk_live_* keys
Staginghttps://staging-api.revkeen.com/v2Integration testing and pre-production validationUse rk_sandbox_* keys
Mockhttps://mock-api.revkeen.com/v2Schema validation, client prototyping, CI smoke checksAuth not enforced

Staging is the recommended environment for integration work. It is isolated from production, but the API key prefix remains rk_sandbox_* in the current platform implementation.

Authentication

All authenticated requests use the x-api-key header:

x-api-key: rk_sandbox_your_api_key

Do not use Authorization: Bearer for the public REST API.

Key PrefixEnvironmentTypical Use
rk_live_*ProductionReal customers, real money, production automations
rk_sandbox_*StagingQA, integration development, test data, demo accounts
curl https://staging-api.revkeen.com/v2/customers \
  -H "x-api-key: rk_sandbox_your_api_key" \
  -H "Accept: application/json"

See Authentication for scopes, key hygiene, and security guidance.

OpenAPI JSON

The public OpenAPI artifact used by the docs is available at:

https://docs.revkeen.com/api/openapi-spec

Use it when importing the API into Scalar, Postman, Insomnia, Bruno, or other OpenAPI-aware tools.

/api/openapi-spec is the public, machine-readable spec route. It is intended for tooling imports and the Scalar reference, not as a narrative documentation page.

Pagination

RevKeen uses cursor-based pagination on list endpoints.

Request Parameters

ParameterTypeDefaultDescription
limitinteger20Number of items to return per request. Max 100.
starting_afterstring-Cursor for the next page, using the last item ID from the previous response.
ending_beforestring-Cursor for the previous page, using the first item ID from the current response.

Response Shape

{
  "object": "list",
  "data": [],
  "has_more": false,
  "url": "/v2/customers"
}
FieldDescription
dataThe current page of records
has_moretrue when another page exists
urlThe canonical collection path

Idempotency

Use Idempotency-Key on write requests that create or mutate financial state:

Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
  • Use a fresh UUID per logical operation.
  • Reuse the same key only when retrying the same request.
  • RevKeen honors idempotency keys for 24 hours.

Rate Limits

EnvironmentLimitApplies To
Production1,000 requests/minuteAuthenticated API traffic per API key
Staging100 requests/minuteAuthenticated API traffic per API key
Mock30 requests/second per IPHosted Scalar mock server traffic

When a limit is exceeded, the API returns 429 Too Many Requests and includes Retry-After. Authenticated API responses also include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

SDK Quickstart

All official SDKs can target staging by overriding the base URL.

import RevKeen from '@revkeen/sdk';

const client = new RevKeen({
  apiKey: process.env.REVKEEN_API_KEY,
  baseUrl: 'https://staging-api.revkeen.com',
});
from revkeen import RevKeen
import os

client = RevKeen(
    api_key=os.environ["REVKEEN_API_KEY"],
    base_url="https://staging-api.revkeen.com",
)
use RevKeen\Client;
use RevKeen\ClientOptions;

$client = new Client(
    apiKey: getenv('REVKEEN_API_KEY'),
    options: new ClientOptions(
        baseUrl: 'https://staging-api.revkeen.com',
    )
);

See the full SDK guides for language-specific examples and production configuration.

Next Steps

On this page