DocsTableau de bord

Caisse

Créer une session de caisse

POST/v1/checkout-sessionspayments:write

Requires payments:write. Cookie mutations require CSRF. Does not debit or assert payment success. With return_url, the buyer is sent back to the merchant's shop (18a).

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_…).

Corps

payment_idstringobligatoire
return_urlstring, 0 à 2048
Optional page of the merchant's shop the buyer is sent back to, through GET /checkout/{id}/back, once the payment needs nothing more from them (and on « Retour à la boutique »). Its origin must be that of one of the space's active notification addresses; https, or http on this machine; no credentials or fragment. Kept by PayHaze: the provider only gets the checkout's own return page. Otherwise 400 invalid_return_url.

Réponses

201Créé
400Requête invalide
401Clé absente ou invalide
403Autorisation ou espace refusé
404Ressource introuvable
409Conflit avec une demande existante
410N’existe plus
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.