SDK & Librairies clients
Nous fournissons des SDK officiels pour la plupart des langages et plateformes modernes. Tous nos SDK sont conçus avec une approche Security-First.
Comment choisir ?
| Mon profil | Ma recommandation |
|---|---|
| Je débute | Utilisez le Guide de Démarrage Rapide (Bouton Magique). C'est le plus simple. |
| J'utilise un CMS | Allez directement à la section Plugins CMS ci-dessous. |
| Je suis Développeur Backend | Choisissez votre langage favori dans la section Serveur. |
| Je crée une App Mobile | Utilisez les bibliothèques dans la section Mobile. |
Serveur (Backend)
| Langage | Version | Statut |
|---|---|---|
| PHP / Laravel | 1.0.0 | Stable |
| Node.js | 1.0.0 | Stable |
| Python / Django | 1.0.0 | Stable |
| Ruby / Rails | 1.0.0 | Stable |
| Java / Spring Boot | 1.0.0 | Stable |
| Go (Golang) | 1.0.0 | Stable |
| .NET / C# | 1.0.0 | Stable |
Mobile & Frontend
| Platform | Version | Statut |
|---|---|---|
| HayBTech.js (Navigateur) | 1.0.0 | Stable |
| Unity (Jeux Vidéo) | 1.0.0 | Stable |
| React Native | 1.0.0 | Stable |
| Flutter | 1.0.0 | Stable |
| iOS (Swift) | 1.0.0 | Stable |
| Android (Kotlin) | 1.0.0 | Stable |
Plugins CMS & E-commerce
| CMS | Plugin | Statut |
|---|---|---|
| WordPress | WooCommerce Gateway | Stable |
| Magento 2 | Payment Method | Stable |
| PrestaShop | Payment Module | Stable |
| Drupal | Commerce Payment | Stable |
| Odoo | Payment Provider | Stable |
| WHMCS | Payment Gateway | Stable |
Exemples par Framework
Retrouvez des guides d'intégration complets (Paiement + Webhook) pour vos frameworks préférés :
| Environnement | Frameworks documentés |
|---|---|
| PHP | Laravel, Symfony, Native PHP |
| Node.js | Express, NestJS, Fastify |
| Python | FastAPI, Django, Flask |
| Ruby | Rails, Sinatra |
| Go | Gin, Echo, Standard Library |
| Java | Spring Boot, Jakarta EE |
| .NET | ASP.NET Core, Minimal APIs |
Génération à partir de l'OpenAPI
Si vous voulez démarrer immédiatement avec un client typé, la spécification OpenAPI est disponible auprès du support.
bash
# TypeScript types
npx openapi-typescript ./openapi.yaml -o src/haybtech.types.ts
# Full TypeScript client
npx @hey-api/openapi-ts -i ./openapi.yaml -o ./src/haybtech-client
# Python (via openapi-generator)
openapi-generator-cli generate \
-i ./openapi.yaml \
-g python \
-o ./haybtech-py
# Go
oapi-codegen -package haybtech ./openapi.yaml > haybtech.gen.goConventions communes
Tous nos SDK exposeront une surface similaire :
client.payments.create(...)
client.payments.retrieve(id)
client.payments.list({ status: 'success' })
client.payments.verify(id)
client.payments.splits.create(id, [...])
client.webhooks.constructEvent(rawBody, signatureHeader)Patterns recommandés
Pool de connexions
Réutilisez le client HTTP plutôt que d'en créer un par requête :
ts
// Préférer
const client = new HayBTech({ apiKey: process.env.HAYBTECH_API_KEY! })
function pay() {
return client.payments.create({ ... })
}Retry avec backoff
ts
async function withRetry<T>(fn: () => Promise<T>, max = 3): Promise<T> {
let attempt = 0
while (true) {
try {
return await fn()
} catch (e: any) {
if (e.status >= 500 && attempt < max) {
const wait = 2 ** attempt * 1000 // 1s, 2s, 4s
await new Promise(r => setTimeout(r, wait))
attempt++
continue
}
throw e
}
}
}Important
Toujours retry avec la même Idempotency-Key sur 5xx. Ne jamais retry sur 4xx.
Demande de SDK
Votre langage manque ? Email support@haybtech.com avec :
- Langage / framework cible
- Volume de transactions attendu
- Cas d'usage principal
Les SDK sont priorisés selon la demande marchand.