🌐 FR EN
Official SDKs

Client Libraries & SDKs

Speed up development with official SDKs designed with strict typing, robust error handling, native idempotency keys, and webhook cryptographic verification.

PHP

Official PHP SDK

v1.0.0 Available (v1.0.0)

The official PHP client recommended for PHP 8.2+ projects. Powers the underlying WHMCS and WordPress integration modules.

Installation
composer require cleanhoster/cleanhoster-php Terminal
Included capabilities
  • ✓ Strict typing PHP 8.2+ and seamless Bearer token management
  • ✓ Cryptographic HMAC-SHA256 signature verification for incoming webhooks
  • ✓ Durable idempotency keys required for critical operations
  • ✓ Explicit key reuse for safe retries after timeouts
Code Example
use CleanHoster\Client\CleanHosterClient;

$client = new CleanHosterClient([
    'api_key' => 'clh_prod_xxx.secret_token_yyy',
    'environment' => 'production', // ou 'sandbox'
]);

// Vérifier la disponibilité d'un domaine
$result = $client->domains()->check('mon-entreprise.com');
if ($result->isAvailable()) {
    echo "Domaine disponible au tarif : " . $result->getPriceFormatted();
}
Python

Python SDK

v1.0.0 Available (v1.0.0)

Async Python library designed for automation scripts, DevOps tooling, and Django/FastAPI applications.

Installation
pip install cleanhoster Terminal
Included capabilities
  • ✓ Full asyncio and httpx support for high throughput
  • ✓ Pydantic v2 data validation
  • ✓ Complete type hints compatible with mypy
Code Example
from cleanhoster import CleanHosterClient

client = CleanHosterClient(api_key="clh_prod_xxx.secret_token_yyy")

# Consultation du solde portefeuille revendeur
wallet = client.wallet.get_balance()
print(f"Solde disponible : {wallet.balance_minor / 100} {wallet.currency}")
TypeScript / Node.js

Node.js & TypeScript SDK

v1.0.0 Available (v1.0.0)

TypeScript and JavaScript client library for Node.js, Next.js, and serverless architectures.

Installation
npm install @cleanhoster/sdk Terminal
Included capabilities
  • ✓ Comprehensive TypeScript definitions
  • ✓ Compatible with Node 18+, Bun, and Deno
  • ✓ Dual ESM and CommonJS support
Code Example
import { CleanHoster } from '@cleanhoster/sdk';

const cleanhoster = new CleanHoster({
  apiKey: 'clh_prod_xxx.secret_token_yyy'
});

const order = await cleanhoster.orders.create({
  items: [{ productCode: 'DOM-COM-1Y', action: 'create' }]
});
console.log('Commande créée :', order.orderNumber);
Go

CleanHoster Go SDK

v1.0.0-draft Planned

Go client library for high-throughput backend services, microservices, and Kubernetes/Terraform integrations.

go get github.com/cleanhoster/cleanhoster-go