Skip to main content

Installation

Requirements: Node.js 18+. TypeScript is optional but fully supported.

Initialize the Client

Configuration Options

Tenant Management

Plans

Subscriptions

Feature Entitlements

Credits

Credits are the preferred way to track and gate consumption in Crovver. Each credit pool has a key (e.g. "ai_generations") and is refilled by plan entitlements or add-on purchases.

Check balance

Consume credits

consume is idempotent — passing the same idempotencyKey twice returns the original result without double-deducting.
ConsumeCreditsRequest fields: ConsumeResponse fields:

Add-ons

Add-ons let tenants purchase extra credit packs without changing their base plan.

List available add-ons

Purchase an add-on

Get active add-on credits


Usage Tracking (deprecated)

recordUsage and checkUsageLimit are deprecated. They write to a simple event log with no idempotency and do not integrate with the credit pool system. Use credits.consume instead.

Checkout

Invoices

Error Handling

5xx errors, 429, and 408 responses are retried automatically with exponential backoff. Checkout endpoints are never retried to prevent duplicate charges.