Integrate once, enforce everywhere
API-first monetization infrastructure with SDKs, comprehensive documentation, and real-time observability for debugging.
// 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);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.
2. Checking Entitlements
Check if a customer has access to a feature before allowing access. Deterministic evaluation with sub-50ms latency.
3. Recording Usage Events
Send usage events as they occur. Events are aggregated, connected to meters, and used for billing and budget enforcement.
4. Managing Credits
Check credit balances before processing requests. Enforce budgets with deny, degrade, or prompt-for-topup policies.
Install the SDK
npm install @monetizekit/nodepip install monetizekitgem install monetizekitgo get github.com/monetizekit/goBuilt 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.