PayHazeDocsTableau de bord

Moyens enregistrés

Enregistrer un moyen

POST/v1/payment-methodspayments:write

Needs payments:write. A provider reference bound to one account of the space, one customer and the consent the buyer accepted. Never portable: portable is always false.

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.

Corps

connection_idstringobligatoire
provider_referencestring, 0 à 255obligatoire
The reference the provider issued (never a card number: refused with 400 card_number_refused).
customer_referencestring, 0 à 128obligatoire
usage"customer_initiated" | "merchant_initiated"obligatoire
consentobjectobligatoire
mandate_referencestring, 0 à 255
Required for a merchant-initiated usage recorded through the API.
cardobject
What the provider said of the card, for the buyer to recognise it. Never a card number.

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.