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

NomTypeDescription
planstring

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

StatutDescriptionType
200OKupgrade_subscription.Quote
400Bad Requestecho.HTTPError
401Unauthorizedecho.HTTPError
404no subscription — open a checkout insteadecho.HTTPError
422not an upgrade, or the subscription cannot change tierecho.HTTPError
503billing is not configuredecho.HTTPError

Source machine : openapi.json · opération quoteBillingUpgrade