Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stigg.io/llms.txt

Use this file to discover all available pages before exploring further.

Stigg provides backend SDKs and APIs that allow you to manage customers, subscriptions, entitlements, and usage reporting from your server-side application.
For the Sidecar SDK (gRPC-based, optimized for low-latency entitlement checks), see the dedicated Sidecar SDK page.

Authentication

All backend SDKs authenticate using the Full access key, which can be found in the Stigg app under Integrations > API keys.
The Full access key should only be used in server-side applications and should never be exposed in client-side code.

Installing the SDK

npm install @stigg/node-server-sdk

SDK initialization

All SDKs are initialized with the Full access key. The SDK instance should be initialized once per process (singleton pattern) and reused throughout your application, as it maintains an internal cache and supports retries.
import { Stigg } from '@stigg/node-server-sdk';

const stiggClient = Stigg.initialize({ apiKey: 'YOUR_FULL_ACCESS_KEY' });

export default stiggClient;

Operations

Customer management

Provision, update, retrieve, and archive customers

Subscription management

Provision, update, cancel, list, and migrate subscriptions

Entitlement checks

Check feature access and retrieve entitlements

Usage, billing & credits

Report usage, estimate costs, manage credits and promotions

Products

Retrieve all products configured in Stigg, including display names, descriptions, metadata, and downgrade plan information.
const products = await stiggClient.getProducts();

Real-time updates

The Node.js Server SDK supports a streaming connection to receive real-time updates with low latency when customer entitlements or usage change. Available events:
  • Entitlements updated - fired when a customer’s entitlements change
  • Usage updated - fired when a customer’s usage is updated
// listen to customer entitlement updates
stiggClient.addListener('entitlementsUpdated', (data) => {
  console.log('entitlements updated: ', data.customerId, data.entitlements);
});

// listen to customer usage updates
stiggClient.addListener('usageUpdated', (data) => {
  console.log('entitlement usage updated', data.entitlement, data.usage);
});

Advanced features

Persistent caching

Configure a persistent cache (Redis) to survive restarts and share cache across multiple instances.

Persistent caching

Offline mode

The Node.js Server SDK supports offline mode for local development and testing, avoiding network requests to the Stigg API. In offline mode, entitlement evaluations use fallback values. The Sidecar SDK (Java) supports an offline/air-gapped mode for environments with restricted network access, enabling in-memory entitlement evaluation without connecting to a Sidecar process.

Sidecar service

The Sidecar service provides low-latency entitlement checks, handles caching, and subscribes to real-time entitlement and usage data updates. It can be deployed as a sidecar container or a standalone service.

Sidecar service

SDK references

Node.js SDK

Full reference for the Node.js Server SDK

Python SDK

Full reference for the Python API client

Go SDK

Full reference for the Go API client

GraphQL API

Interactive GraphQL API playground

SDK changelogs

Node.js

Node.js SDK changelog

Python

Python SDK changelog

Ruby

Ruby SDK changelog

Go

Go SDK changelog

Java

Java SDK changelog

.NET

.NET SDK changelog

Sidecar

Sidecar SDK changelog