Abonnements
Changer de plan
POST/v1/subscriptions/{id}/changepayments:read
Preview needs payments:read, applying needs payments:write. Prepaid: at once, the unused time of the price in force credited and the remaining time of the new one charged (proration invoice, or credit note when it comes down). Usage: at the end of the period. During a trial: at once. Changing the interval or mixing usage and prepaid prices is refused (409). At one logical instant cancellation wins: a change after a cancellation is refused.
En-têtes
AuthorizationBearer pos_test_…obligatoire- Clé de serveur. Jamais dans un navigateur.
X-Merchant-IDstringobligatoire- L’espace marchand concerné (mrc_…).
X-Environment"test"obligatoire- Seule valeur acceptée tant que la production n’est pas ouverte.
Paramètres
iddans le cheminobligatoire
Corps
plan_idstringobligatoirequantityintegerpreviewboolean
Réponses
- 200Réussi
- 400Requête invalide
- 401Clé absente ou invalide
- 403Autorisation ou espace refusé
- 404Ressource introuvable
- 409Conflit avec une demande existante
- 429Trop de demandes, réessayez plus tard
- 503Service momentanément indisponible
Une erreur ne vaut jamais paiement. Le corps donne code, message, request_id et retry_action ; renvoyez la même Idempotency-Key si retry_action le propose.