API / Billing
POST
/billing/upgrade/quote
Quote what an upgrade would cost
Returns the prorated amount owed today for moving to a larger tier — the difference between the tiers for the time remaining in the period already paid, never the catalogue price. Charges nothing. An amount of 0 means the upgrade is granted without a charge.
Authentification : clé API Bearer requise.
Corps JSON
Target plan
| Nom | Type | Description |
|---|---|---|
| plan | string | — |
Exemple curl
curl -X POST https://api.sporee.fr/billing/upgrade/quote \
-H "Authorization: Bearer $SPORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Réponses
| Statut | Description | Type |
|---|---|---|
| 200 | OK | upgrade_subscription.Quote |
| 400 | Bad Request | echo.HTTPError |
| 401 | Unauthorized | echo.HTTPError |
| 404 | no subscription — open a checkout instead | echo.HTTPError |
| 422 | not an upgrade, or the subscription cannot change tier | echo.HTTPError |
| 503 | billing is not configured | echo.HTTPError |
Source machine : openapi.json · opération quoteBillingUpgrade