- subscription : abonnement mensuel/annuel
- pack : achat ponctuel de crédits
Packs (achat ponctuel)
- Listez les packs via
GET /v1/plans(typepack). - Créez une session de paiement :
POST /v1/billing/checkoutavecplanId.
Abonnements
- Listez les plans
subscriptionviaGET /v1/plans. - Souscrivez :
POST /v1/billing/subscribeavecplanetphone. - Redirigez l’utilisateur vers
paymentUrl. - DexPay appelle
POST /v1/billing/webhookpour activer l’abonnement.
Téléphone requis
DexPay demande un numéro de téléphone. Vous pouvez le stocker sur le profil utilisateur ou l’envoyer lors de la souscription.Webhook DexPay
- Endpoint :
POST /v1/billing/webhook - Signature :
x-webhook-signature(HMAC SHA-256 du body brut) - Secret :
DEXPAY_SECRET_KEYouDEXPAY_API_SECRET
Endpoints utiles
POST /v1/billing/checkoutPOST /v1/billing/subscribePOST /v1/billing/subscription/cancelGET /v1/billing/transactionsGET /v1/billing/invoices