LogoStacked
Client SDK

Overview

Client-side SDKs for integrating Stacked offerwall into web applications and games

The Client SDKs provide client-side libraries for integrating Stacked offerwall into web applications and games. They handle connecting to the Stacked API to fetch offers, claim rewards, and receive real-time offer notifications.

Client-Side SDK

Client SDKs run in the browser/client environment. For server-side event tracking, use the Analytics SDK.


Available SDKs

The Client SDK is available for JavaScript/TypeScript and C#, with support for web applications, games, and various frameworks. All documentation includes examples in both languages.

See the Getting Started guide to begin integrating the SDK into your application.


Core Features

All client SDKs share the same core functionality:

  • Real-Time Offer Surfacing - Receive instant offer notifications via Server-Sent Events (SSE)
  • Event-Driven Architecture - React to offer events and connection changes
  • Flexible Configuration - Customizable asset resolution and lifecycle hooks
  • Auto-Reconnection - Robust connection management with exponential backoff retry logic

Client SDK vs Direct API

When to Use the Client SDK

The Client SDKs are recommended for most client-side integrations because they provide:

  • Automatic Token Management - Handles JWT refresh and expiry automatically
  • SSE Reconnection - Robust connection management with exponential backoff retry logic
  • Event System - Easy-to-use event listeners for offers, connections, and errors
  • State Management - Built-in offer store and player data caching
  • Type Safety - Full TypeScript/C# type definitions
  • Framework Integrations - React, Vue, Angular, Unity support

When to Use the Direct API

Consider using the REST API directly if:

  • Your language isn't supported yet - Request support or use the API temporarily
  • You need custom behavior - Full control over requests and state management
  • Server-side only - Use the Analytics SDK for server operations
  • Minimal overhead - Simple use case that doesn't need SDK features

Request Language Support

If you need the Client SDK in a language we don't currently support, please let us know! We're actively expanding language support based on developer needs.