Points de vente
Créer un point de vente
POSThttps://api.hpay.cash/newmarchant/
Jeton : action newaccount, valable 10 min
Ajoute un point de vente (caisse, magasin, terminal) à votre compte. Vous choisissez son numéro. Ses identifiants de connexion sont envoyés par SMS et courriel au numéro et à l'adresse indiqués. Même en mode test, le point de vente est réellement créé : ne l'appelez qu'une fois.
Paramètres (JSON)
main_api_keyrequisstring |
Votre clé API. |
tokenrequisstring |
Jeton obtenu par /token/ avec l'action indiquée. |
marchant_idrequisstring |
Numéro choisi, unique, 1 à 15 caractères. |
marchant_namerequisstring |
Nom affiché (45 caractères). |
marchant_phone_numberrequisstring |
Téléphone, unique (15 caractères). |
marchant_emailrequisstring |
Courriel, unique. |
curl -X POST https://api.hpay.cash/newmarchant/ \
-H "Content-Type: application/json" \
-d '{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1002",
"marchant_name": "Caisse 2",
"marchant_phone_number": "50937000000",
"marchant_email": "caisse2@example.com"
}'{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1002",
"marchant_name": "Caisse 2",
"marchant_phone_number": "50937000000",
"marchant_email": "caisse2@example.com"
}Réponse
{
"success": true,
"message": "…",
"new_marchand_id": "1002",
"register_date": "2026-11-18 10:12:00",
"transaction_mode": "test",
"token_used": "…",
"error_code": 0
}Erreurs propres à ce point d'accès
| error_code | HTTP | Cause |
|---|---|---|
7004 | 400 | marchant_id vide ou de plus de 15 caractères. |
30 | 200 | Clé API inconnue. |
7002 | 200 / 409 | Numéro, téléphone ou courriel déjà utilisé. |
7003 | 500 | Enregistrement impossible : contactez HPay. |
Lister les points de vente
POSThttps://api.hpay.cash/sousMarchandListe/
Jeton : action submarchant, valable 15 min
Avec marchant_id vide, renvoie tous vos points de vente, par nom.
Paramètres (JSON)
main_api_keyrequisstring |
Votre clé API. |
tokenrequisstring |
Jeton obtenu par /token/ avec l'action indiquée. |
marchant_idpeut être videstring |
Un point de vente, ou vide pour tous. |
curl -X POST https://api.hpay.cash/sousMarchandListe/ \
-H "Content-Type: application/json" \
-d '{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": ""
}'{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": ""
}Réponse
{
"info": {
"success": true,
"message": "Data filtered",
"token_used": "…",
"error_code": "0"
},
"sub_marchant_list": [
{
"marchant_id": "1001",
"marchant_name": "Caisse 1",
"marchant_phone": "…",
"marchant_email": "…",
"register_date": "2026-03-02 09:15:00",
"activated": true
}
]
}Erreurs propres à ce point d'accès
| error_code | HTTP | Cause |
|---|---|---|
30 | 200 | Clé API inconnue. |
111 | 200 | Aucun point de vente. |
Consulter un solde
POSThttps://api.hpay.cash/getBalance/
Jeton : action get_balance, valable 15 min
Avec un marchant_id, renvoie le solde de ce point de vente ; vide, celui de votre compte Entreprise.
Paramètres (JSON)
main_api_keyrequisstring |
Votre clé API. |
tokenrequisstring |
Jeton obtenu par /token/ avec l'action indiquée. |
marchant_idpeut être videstring |
Un point de vente, ou vide pour le compte Entreprise. |
curl -X POST https://api.hpay.cash/getBalance/ \
-H "Content-Type: application/json" \
-d '{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}'{
"main_api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}Réponse
{
"info": {
"success": true,
"message": "…",
"balance": "182450.00",
"currency": "HTG",
"payment_date": "2026-11-18 15:20:00",
"token_used": "…",
"error_code": 0
}
}Erreurs propres à ce point d'accès
| error_code | HTTP | Cause |
|---|---|---|
30 | 200 | Clé API inconnue. |
61 | 200 | Compte Entreprise introuvable. |
62 | 200 | Point de vente introuvable. |