Abonnements
Ouvrir la caisse d’un abonnement
POST/v1/subscriptions/{id}/checkout-sessionpayments:write
Needs payments:write. Opens PayHaze's checkout for the first invoice due of the subscription. There the buyer ticks the agreement to the renewals, in a sentence PayHaze composes (seller, amount, « chaque mois » or « chaque année »), then pays; the card of that payment is kept with the dated agreement and pays the renewals without the buyer. Without the agreement nothing is kept. A second call takes up the payment the buyer has not finished. return_url: a page of the shop the buyer comes back to after the result, on the origin of one of the space's active notification addresses (the address itself never reaches the page). The account must keep cards (Stripe or the simulator). 409 nothing_to_collect: nothing is due now (a trial, everything paid). 409 capability_unsupported: the account cannot keep a card, nothing was created. 409 billing_conflict: a payment of this invoice is under way, or the subscription has ended.
En-têtes
AuthorizationBearer pos_key_…obligatoire- Clé de serveur, pour tout l’espace. Jamais dans un navigateur.
X-Merchant-IDstringobligatoire- L’espace marchand concerné (mrc_…).
Paramètres
iddans le cheminobligatoire
Corps
return_urlstring, 0 à 2048
Réponses
- 201Créé
- 400Requête invalide
- 401Clé absente ou invalide
- 402Service restreint
- 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.