Créer un abonnement
Subscriptions
Créer un abonnement
Créer un abonnement pour un client
POST
Créer un abonnement
Documentation Index
Fetch the complete documentation index at: https://docs.sahelpay.ml/llms.txt
Use this file to discover all available pages before exploring further.
Créer un abonnement
Crée un nouvel abonnement pour un client à un plan existant.Endpoint
Headers
| Header | Requis | Description |
|---|---|---|
Authorization | ✅ | Bearer sk_xxx |
Content-Type | ✅ | application/json |
Body
| Paramètre | Type | Requis | Description |
|---|---|---|---|
plan_id | string | ✅ | ID du plan d’abonnement |
customer_phone | string | ✅ | Numéro de téléphone du client (+223…) |
start_date | string | Date de début (ISO format, défaut: maintenant) |
Exemple
Réponse
Créer un abonnement avec lien de paiement
Pour créer un abonnement ET générer immédiatement un lien de paiement :redirect_url(optionnel) : URL de retour après paiementmetadata(optionnel) : Données personnalisées
Erreurs
| Code | Description |
|---|---|
PLAN_NOT_FOUND | Plan non trouvé |
INVALID_PHONE | Numéro de téléphone invalide |