Skip to main content

SDK Installation & Setup Guide

Get up and running with StateSet SDKs in minutes. This guide covers everything from installation to advanced configuration across all supported languages and frameworks.
New to StateSet? Start with our 5-minute quickstart to understand the basics before diving into SDK installation.

🚀 Quick Start

Choose your language and get started in under 5 minutes:

📦 Supported SDKs

StateSet provides official SDKs for the following languages:

Node.js / TypeScript

Most Popular Full TypeScript support with async/await

Python

AI/ML Ready Perfect for data science and backend APIs

Ruby

Rails Optimized Native Rails and Sinatra integration

PHP

WordPress Ready Compatible with Laravel and WordPress

🎯 Which SDK Should I Use?

Recommended: Node.js/TypeScript SDK
  • ✅ Best for React, Next.js, Vue, Angular
  • ✅ Full TypeScript support
  • ✅ Excellent async/await handling
  • ✅ Largest community and ecosystem
Recommended: Python SDK
  • ✅ Best for data processing and analytics
  • ✅ Native pandas/numpy integration
  • ✅ Perfect for Jupyter notebooks
  • ✅ Great for FastAPI/Django backends
Recommended: Ruby SDK
  • ✅ Native Rails integration
  • ✅ ActiveRecord-style syntax
  • ✅ Sidekiq/Resque job support
  • ✅ Convention over configuration
Recommended: PHP SDK
  • ✅ PSR-compliant implementation
  • ✅ WordPress plugin ready
  • ✅ Laravel service provider included
  • ✅ Composer autoloading

Node.js SDK

Prerequisites

1

Check Node.js Version

Node.js 16+ is required. For older versions, use StateSet-node@legacy
2

Verify Package Manager

3

Optional: TypeScript Setup

Installation

Quick Setup

1

Create Project Structure

2

Configure Environment Variables

3

Create Configuration Module

Basic Configuration

Advanced Configuration

Framework Integration


Python SDK

Prerequisites

1

Check Python Version

Python 3.8+ is required. For older versions, use StateSet-python==1.x
2

Set Up Virtual Environment

Installation

Quick Setup

1

Create Project Structure

2

Configure Environment

3

Create Configuration Module

Basic Configuration

Framework Integration


Ruby SDK

Prerequisites

1

Check Ruby Version

Ruby 2.7+ is required. For older versions, use StateSet-ruby v1.x
2

Install Dependencies

Installation

Quick Setup

1

Create Project Structure

2

Configure Environment

3

Create Configuration

Basic Configuration

Framework Integration


PHP SDK

Prerequisites

1

Check PHP Version

PHP 8.0+ is required. For older versions, use StateSet-php v1.x
2

Install Required Extensions

Installation

Quick Setup

1

Create Project Structure

2

Configure Environment

3

Create Configuration

Basic Configuration

Framework Integration


Environment Configuration

Development Environment

Production Environment

Docker Configuration


Troubleshooting

Common Issues

Problem: 401 Unauthorized errorsSolutions:
Code fix:
Problem: Requests timing out or ETIMEDOUT errorsSolutions:
Problem: Cannot import StateSet modules or TypeScript errorsSolutions:
Problem: 429 Too Many Requests errorsSolutions:
Problem: Webhook signature verification failingSolutions:

Platform-Specific Issues

Testing Your Integration

Unit Testing

Integration Testing

Load Testing


Best Practices

Security

Never commit API keys or secrets to version control. Always use environment variables.

Error Handling

Retry Strategy

Circuit Breaker

Performance Optimization

Monitoring & Logging


Next Steps

Now that you have StateSet SDK installed and configured:
1

Explore the API

API Reference

Detailed documentation for all endpoints

API Explorer

Interactive API testing environment
2

Follow Integration Guides

E-commerce Integration

Connect your online store

Webhook Setup

Configure real-time events

Error Handling

Build resilient applications

Rate Limits

Understand API limits
3

Build Your Application

Support & Resources

Need help? Our support team is available Monday-Friday, 9 AM - 5 PM PST. Enterprise customers have 24/7 support.