DocsTableau de bord

Boutiques en ligne

Accorder la connexion d’une boutique

POST/v1/integrations/{platform}/authorize

The owner, signed in with a recent second factor and the keys:write and connections:write rights, agrees on PayHaze's connection page (/connect/{platform}). The site, notification and return addresses must share one origin (https, or http on this machine); state 1-256 unreserved characters; code_challenge the 43-character S256 PKCE challenge. Reply: where to send the browser, the return address with a one-time code (10 minutes) and the state. 400 invalid_connection_link, 400 destination_blocked.

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

platformdans le cheminobligatoire
The shop's platform; others (PrestaShop…) join the list as their extensions ship.

Corps

site_urlstringobligatoire
site_namestring, 0 à 120obligatoire
notify_urlstringobligatoire
return_urlstringobligatoire
statestringobligatoire
code_challengestringobligatoire
code_challenge_method"S256"obligatoire

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.