Developer Documentation

Integrate once, enforce everywhere

API-first monetization infrastructure with SDKs, comprehensive documentation, and real-time observability for debugging.

Get Started
quickstart.js
// Install the SDK
npm install @monetizekit/node

// Initialize the client
import { MonetizeKit } from '@monetizekit/node';

const mk = new MonetizeKit({
  apiKey: process.env.MK_API_KEY
});

// Check entitlement
const canAccess = await mk.entitlements.check({
  customer: 'customer_123',
  feature: 'advanced-analytics'
});

// Record usage
await mk.usage.record({
  customer: 'customer_123',
  meter: 'api-calls',
  value: 1
});

// Get credits balance
const balance = await mk.credits.getBalance({
  customer: 'customer_123'
});

console.log('Balance:', balance.remaining);

Documentation

Guides, tutorials, and concepts to get you up and running quickly

Read the docs →

API Reference

Complete REST and GraphQL API reference with examples

View API docs →

SDKs & Libraries

Native SDKs for Node.js, Python, Ruby, Go, and more

Browse SDKs →

Core integration concepts

Understand how MonetizeKit works and how to integrate it into your application

1. Authentication & API Keys

Create scoped API keys with explicit permissions. Keys can be limited to specific operations, customers, or environments.

MK_API_KEY=mk_live_abc123...

2. Checking Entitlements

Check if a customer has access to a feature before allowing access. Deterministic evaluation with sub-50ms latency.

mk.entitlements.check({...})

3. Recording Usage Events

Send usage events as they occur. Events are aggregated, connected to meters, and used for billing and budget enforcement.

mk.usage.record({...})

4. Managing Credits

Check credit balances before processing requests. Enforce budgets with deny, degrade, or prompt-for-topup policies.

mk.credits.getBalance({...})

Install the SDK

Node.js
npm install @monetizekit/node
Python
pip install monetizekit
Ruby
gem install monetizekit
Go
go get github.com/monetizekit/go

Built for developer productivity

Observability Inspector

Debug entitlement checks in real-time. See exactly why a customer was granted or denied access with full evaluation context.

  • Real-time entitlement evaluation traces
  • Customer-level access inspection
  • Feature flag and limit debugging
  • Historical evaluation lookup

Webhooks & Events

Subscribe to real-time events for entitlement changes, usage updates, approvals, and system events.

  • Configurable webhook endpoints
  • Event filtering and routing
  • Retry logic and delivery guarantees
  • Webhook signing and verification

GraphQL & REST APIs

Choose between REST or GraphQL based on your preferences. Both APIs provide full platform coverage.

  • REST API with OpenAPI specification
  • GraphQL with introspection and playground
  • Consistent error handling and pagination
  • Rate limiting and usage tracking

Environments & Testing

Separate staging and production environments with isolated data. Test pricing changes before going live.

  • Staging and production environments
  • Environment-specific API keys
  • Data isolation and parity testing
  • Promotion workflows between environments

Start building with MonetizeKit

Get your API key and start integrating in minutes. Full documentation and code examples available.

Get Started Free