API Reference
Complete REST API documentation for the RevKeen platform
The RevKeen API v2 is organized around REST. Built with OpenAPI 3.1, our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Environments
| Environment | Base URL | Purpose |
|---|---|---|
| Production | https://api.revkeen.com/v2 | Live transactions, real money |
| Sandbox | https://sandbox-api.revkeen.com/v2 | Test environment, no real charges |
| Mock Server | https://mock-api.revkeen.com/v2 | Schema validation with mock responses |
Authentication
Include your API key in the x-api-key header:
x-api-key: rk_sandbox_your_api_key| Prefix | Environment |
|---|---|
rk_live_* | Production API key |
rk_sandbox_* | Sandbox API key |
Core Resources
| Resource | Description | Reference |
|---|---|---|
| Customers | Customer management and payment methods | Customers |
| Products | Product catalog and pricing | Products |
| Prices | Fixed, PWYW, and free pricing models | Prices |
| Subscriptions | Recurring billing management | Subscriptions |
| Invoices | Invoice creation and payment processing | Invoices |
| Orders | One-off purchases with lifecycle ops | Orders |
Payments and Billing
| Resource | Description | Reference |
|---|---|---|
| Charges | One-time charges for existing customers | Charges |
| Payment Links | Shareable payment pages | Payment Links |
| Checkout Sessions | Hosted checkout experiences | Checkout |
| Refunds | Refund management and tracking | Refunds |
| Disputes | Chargeback handling with evidence | Disputes |
| Payouts | Settlement batches and tracking | Payouts |
Configuration and Analytics
| Resource | Description | Reference |
|---|---|---|
| Discounts | Percentage and fixed amount discounts | Discounts |
| Tax Rates | Manual tax rate overrides | Tax Rates |
| Webhooks | Event notifications | Webhooks |
Interactive API Reference
Explore the complete API with interactive examples, try requests directly from the documentation, and generate code snippets for multiple languages.
- Open Full API Reference -- Interactive documentation with request/response examples and SDK code snippets in TypeScript, Python, PHP, and more
- Download OpenAPI Spec -- Import into Postman, Insomnia, or any OpenAPI-compatible tool
- Open in Scalar API Client -- Test endpoints interactively with your API key
Response Codes
| Code | Description |
|---|---|
200 | OK -- The request was successful |
201 | Created -- A new resource was created |
400 | Bad Request -- The request was malformed |
401 | Unauthorized -- Invalid or missing API key |
403 | Forbidden -- Insufficient permissions |
404 | Not Found -- Resource does not exist |
422 | Unprocessable Entity -- Validation failed |
429 | Too Many Requests -- Rate limit exceeded |
500 | Internal Server Error -- Something went wrong |
Rate Limiting
The RevKeen API implements rate limiting to ensure fair usage. Rate limits are applied per API key:
- Standard tier: 1,000 requests per minute
- Pro tier: 5,000 requests per minute
- Enterprise: Custom limits available
Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
SDKs and Libraries
All SDKs are auto-generated from the OpenAPI specification using Fern.
| SDK | Package | Documentation |
|---|---|---|
| TypeScript | @revkeen/sdk on npm | TypeScript SDK |
| Python | revkeen on PyPI | Python SDK |
| PHP | revkeen/sdk-php on Packagist | PHP SDK |