API / Billing
POST
/billing/downgrade
Schedule a downgrade to a smaller plan
Schedules a move to a smaller tier, effective at the next renewal. Nothing changes today and nothing is refunded: the tenant keeps the tier they paid for until the current period ends. Moving to the free tier is a cancellation, not a downgrade.
Authentification : clé API Bearer requise.
Corps JSON
Target plan
| Nom | Type | Description |
|---|---|---|
| plan | string | Plan is the smaller tier to move to at the next renewal. |
Exemple curl
curl -X POST https://api.sporee.fr/billing/downgrade \
-H "Authorization: Bearer $SPORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Réponses
| Statut | Description | Type |
|---|---|---|
| 200 | OK | downgrade_subscription.Result |
| 400 | Bad Request | echo.HTTPError |
| 401 | Unauthorized | echo.HTTPError |
| 404 | no subscription | echo.HTTPError |
| 422 | not a downgrade, or use cancellation for the free tier | echo.HTTPError |
| 503 | billing is not configured | echo.HTTPError |
Source machine : openapi.json · opération downgradeBillingSubscription