SDKs & Client Libraries

Official SDKs for your favorite programming language. Type-safe, well-documented, and production-ready.

JavaScript/TypeScript🐍 Python🔵 Go Java💎 Ruby🐘 PHP🔷 .NET/C#

Choose Your Language

Get started with our official SDKs

JavaScript/TypeScript

v2.1.0

Modern TypeScript SDK with full type safety and React hooks support

Installation

npm install @unified-commerce/sdk
📦 50K+ downloads/month1.2K stars
🐍

Python

v1.8.3

Pythonic SDK with async support and comprehensive type hints

Installation

pip install unified-commerce
📦 25K+ downloads/month890 stars
🔵

Go

v1.5.2

High-performance Go SDK with idiomatic error handling

Installation

go get github.com/unified-commerce/go-sdk
📦 15K+ downloads/month650 stars

Java

v2.0.1

Enterprise-ready Java SDK with Spring Boot integration

Installation

implementation "com.unifiedcommerce:sdk:2.0.1"
📦 20K+ downloads/month780 stars
💎

Ruby

v1.6.4

Ruby SDK with Rails integration and ActiveRecord-like API

Installation

gem install unified_commerce
📦 12K+ downloads/month540 stars
🐘

PHP

v1.7.0

Modern PHP SDK with Laravel and Symfony support

Installation

composer require unified-commerce/sdk
📦 18K+ downloads/month620 stars
🔷

.NET/C#

v2.2.0

.NET SDK with async/await support and ASP.NET Core integration

Installation

dotnet add package UnifiedCommerce.SDK
📦 22K+ downloads/month720 stars

Quick Start

Get up and running in minutes

JavaScript/TypeScript Quick Start

Basic usage example

import { UnifiedCommerce } from '@unified-commerce/sdk';

const client = new UnifiedCommerce({
  apiKey: process.env.UNIFIED_COMMERCE_API_KEY,
  environment: 'production'
});

// Query products
const products = await client.products.list({
  limit: 10,
  category: 'electronics'
});

// Create an order
const order = await client.orders.create({
  items: [{ productId: '123', quantity: 2 }],
  customer: { email: 'customer@example.com' }
});

Feature Comparison

All SDKs support the core features with language-specific optimizations

Feature
javascript
🐍python
🔵go
java
💎ruby
🐘php
🔷csharp
GraphQL Support
REST Fallback
Type Safety
Async/Await
Webhooks
Rate Limiting
Retry Logic
Request Signing
Streaming
Framework Integration

Installation Guides

Step-by-step installation for each platform

JavaScript/TypeScript

1. Install the SDK

npm install @unified-commerce/sdk

2. Initialize the client

import { UnifiedCommerce } from '@unified-commerce/sdk'; const client = new UnifiedCommerce({ apiKey: process.env.UNIFIED_COMMERCE_API_KEY, environment: 'production'
View full installation guide →
🐍

Python

1. Install the SDK

pip install unified-commerce

2. Initialize the client

from unified_commerce import UnifiedCommerce client = UnifiedCommerce( api_key=os.environ['UNIFIED_COMMERCE_API_KEY'], environment='production'
View full installation guide →
🔵

Go

1. Install the SDK

go get github.com/unified-commerce/go-sdk

2. Initialize the client

package main import ( "context" "github.com/unified-commerce/go-sdk"
View full installation guide →

Java

1. Install the SDK

implementation "com.unifiedcommerce:sdk:2.0.1"

2. Initialize the client

import com.unifiedcommerce.sdk.*; UnifiedCommerce client = UnifiedCommerce.builder() .apiKey(System.getenv("UNIFIED_COMMERCE_API_KEY")) .environment(Environment.PRODUCTION)
View full installation guide →
💎

Ruby

1. Install the SDK

gem install unified_commerce

2. Initialize the client

require 'unified_commerce' UnifiedCommerce.configure do |config| config.api_key = ENV['UNIFIED_COMMERCE_API_KEY'] config.environment = 'production'
View full installation guide →
🐘

PHP

1. Install the SDK

composer require unified-commerce/sdk

2. Initialize the client

<?php use UnifiedCommerce\SDK\UnifiedCommerce; $client = new UnifiedCommerce([
View full installation guide →
🔷

.NET/C#

1. Install the SDK

dotnet add package UnifiedCommerce.SDK

2. Initialize the client

using UnifiedCommerce.SDK; var client = new UnifiedCommerceClient( apiKey: Environment.GetEnvironmentVariable("UNIFIED_COMMERCE_API_KEY"), environment: CommerceEnvironment.Production
View full installation guide →

Authentication

Secure your API requests with API keys

1. Get your API key

Generate an API key from your developer dashboard. Keep this key secure and never commit it to version control.

UNIFIED_COMMERCE_API_KEY=uc_live_xxxxxxxxxxxxx

2. Set environment variable

Store your API key in environment variables for security:

export UNIFIED_COMMERCE_API_KEY=your_api_key_here

3. Initialize with authentication

All SDKs support authentication via API key:

// The SDK will automatically use your API key // from environment variables or configuration

💡 Tip: Use different API keys for development, staging, and production environments

Common Use Cases

Examples for the most common scenarios

List Products with Filters

// Fetch products with pagination and filters
const products = await client.products.list({
  category: 'electronics',
  minPrice: 100,
  maxPrice: 1000,
  inStock: true,
  limit: 20,
  offset: 0
});

Create an Order

// Create a new order with items
const order = await client.orders.create({
  items: [
    { productId: '123', quantity: 2 },
    { productId: '456', quantity: 1 }
  ],
  customer: {
    email: 'customer@example.com'
  },
  shippingAddress: { /* ... */ }
});

Handle Webhooks

// Verify and handle webhook events
const event = client.webhooks.verify(
  request.body,
  request.headers['webhook-signature']
);

if (event.type === 'order.created') {
  // Handle order created event
  console.log('New order:', event.data);
}

Update Inventory

// Update product inventory levels
const updated = await client.inventory.update(
  'product-123',
  {
    quantity: 100,
    location: 'warehouse-1',
    reservedQuantity: 5
  }
);

Troubleshooting

Solutions to common issues

Authentication errors (401 Unauthorized)

This usually means your API key is invalid or missing. Check:

  • Your API key is correctly set in environment variables
  • The API key is active in your dashboard
  • You're using the correct environment (test vs. production keys)
Rate limit errors (429 Too Many Requests)

You've exceeded the rate limit for your plan. Solutions:

  • Implement exponential backoff retry logic
  • Reduce request frequency or implement request queuing
  • Upgrade your plan for higher limits
  • Check the X-RateLimit-* headers for limit information
TypeScript type errors

TypeScript compilation errors with the SDK:

  • Ensure you're using TypeScript 5.0 or higher
  • Check that @types packages are installed
  • Enable esModuleInterop in tsconfig.json
  • Clear node_modules and reinstall dependencies
Network timeout errors

Request timeouts can be configured:

  • Increase the timeout value in client configuration
  • Check your network connectivity
  • Verify the API endpoint is accessible
  • Consider using pagination for large datasets
Webhook signature verification fails

Webhook verification issues:

  • Ensure you're using the raw request body (not parsed JSON)
  • Check that the webhook secret is correctly configured
  • Verify the signature header name matches your SDK version
  • Check for any middleware that might modify the request

Still having issues?

Our support team is here to help. Reach out through any of these channels:

Ready to Get Started?

Pick your favorite language and start building today