Skip to content

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 profilMa recommandation
Je débuteUtilisez le Guide de Démarrage Rapide (Bouton Magique). C'est le plus simple.
J'utilise un CMSAllez directement à la section Plugins CMS ci-dessous.
Je suis Développeur BackendChoisissez votre langage favori dans la section Serveur.
Je crée une App MobileUtilisez les bibliothèques dans la section Mobile.

Serveur (Backend)

LangageVersionStatut
PHP / Laravel1.0.0Stable
Node.js1.0.0Stable
Python / Django1.0.0Stable
Ruby / Rails1.0.0Stable
Java / Spring Boot1.0.0Stable
Go (Golang)1.0.0Stable
.NET / C#1.0.0Stable

Mobile & Frontend

PlatformVersionStatut
HayBTech.js (Navigateur)1.0.0Stable
Unity (Jeux Vidéo)1.0.0Stable
React Native1.0.0Stable
Flutter1.0.0Stable
iOS (Swift)1.0.0Stable
Android (Kotlin)1.0.0Stable

Plugins CMS & E-commerce

CMSPluginStatut
WordPressWooCommerce GatewayStable
Magento 2Payment MethodStable
PrestaShopPayment ModuleStable
DrupalCommerce PaymentStable
OdooPayment ProviderStable
WHMCSPayment GatewayStable

Exemples par Framework

Retrouvez des guides d'intégration complets (Paiement + Webhook) pour vos frameworks préférés :

EnvironnementFrameworks documentés
PHPLaravel, Symfony, Native PHP
Node.jsExpress, NestJS, Fastify
PythonFastAPI, Django, Flask
RubyRails, Sinatra
GoGin, Echo, Standard Library
JavaSpring Boot, Jakarta EE
.NETASP.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.go

Conventions 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.

HayBTech Payment API Documentation.