PayHazeDocsTableau de bord

Abonnements

Ajouter un prix

POST/v1/plans/{id}/pricespayments:write

Needs payments:write. Applies to new subscriptions; a price is never rewritten and subscribers keep theirs.

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

model"fixed" | "tiered" | "usage"obligatoire
interval"month" | "year"obligatoire
unit_minorstring
Fixed or usage price per unit, in cents.
tiersliste de object
tier_mode"graduated" | "volume"
graduated: each tier bills its own units at its price; volume: every unit at the price of the tier the quantity reaches.
trial_daysinteger
unit_labelstring, 0 à 40
tax_bpinteger
The VAT rate the merchant configured, in basis points; prices are before tax.

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.