Bank payouts
Register a bank account
Token: action addBank, valid for 5 min
Registers the bank account where a point of sale wants to receive payouts. All 8 fields are required.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
bank_namerequiredstring |
Bank name. |
bank_numrequiredstring |
Account number. |
bank_adresserequiredstring |
Bank address. |
bank_paysrequiredstring |
Bank country. |
bank_ibanrequiredstring |
IBAN or SWIFT code. |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_name": "Banque Exemple",
"bank_num": "000123456789",
"bank_adresse": "Port-au-Prince",
"bank_pays": "Haiti",
"bank_iban": "EXMPHTPP"
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_name": "Banque Exemple",
"bank_num": "000123456789",
"bank_adresse": "Port-au-Prince",
"bank_pays": "Haiti",
"bank_iban": "EXMPHTPP"
}{
"success": true,
"message": "Le compte bancaire a été ajouté avec succès",
"new_bank_details": {
"bank_id": 12,
"…": "…"
},
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
704 | 200 | This account (bank + IBAN/SWIFT) already exists. |
705 / 706 / 707 | 200 | Could not be stored: contact HPay. |
List bank accounts
Token: action list-banks, valid for 5 min
Returns a point of sale's bank accounts, with their bank_id.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/subMarchandAccountList/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}{
"success": true,
"message": "Liste des comptes bancaires récupérée avec succès",
"data": [
{
"bank_id": 12,
"bank_name": "Banque Exemple",
"…": "…"
}
],
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
404 | 200 | No bank account. |
Delete a bank account
Token: action delete-bank, valid for 5 min
Deletes one of a point of sale's bank accounts.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
bank_idrequirednumber |
Identifier returned by the account list. |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/subMarchandDeleteAccount/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_id": 12
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_id": 12
}{
"success": true,
"message": "Le compte bancaire a été supprimé avec succès",
"deleted_bank_details": {
"…": "…"
},
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
704 | 200 | Bank account not found for this point of sale. |
705 | 200 | Could not delete. |
Request a payout
Token: action add-withdraw, valid for 5 min
Requests a transfer of part of a point of sale's balance to one of its bank accounts. HPay then processes it: it moves from "pending" to "validated". Only one pending request at a time per point of sale.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
bank_idrequirednumber |
The destination bank account. |
amountrequirednumber |
Amount, at most the point-of-sale balance. |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/subMarchandAddWithdraw/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_id": 12,
"amount": "150000.00"
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"bank_id": 12,
"amount": "150000.00"
}{
"success": true,
"message": "Demande de retrait enregistrée avec succès",
"withdrawal_id": "…",
"bank_details": "…",
"pending_requests": [
"…"
],
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
704 | 200 | Insufficient balance. |
705 | 200 | Bank account not found for this point of sale. |
707 | 200 | A request is already pending. |
Track payouts
Token: action all-withdraw, valid for 5 min
Lists a point of sale's payout requests. statut: 0 pending, 1 validated, 2 cancelled; null for all.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
statutmay be emptyinteger | null |
Filter: 0, 1, 2, or null. |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/subMarchandWithdrawAll/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"statut": null
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001",
"statut": null
}{
"success": true,
"message": "Liste des demandes récupérée avec succès",
"sub_marchant_info": {
"sous_num": "1001",
"sous_nom": "Caisse 1",
"sous_tel": "…"
},
"data": [
{
"idrestitution": "…",
"montant": "150000.00",
"frais": "0.00",
"total": "150000.00",
"reference": "…",
"statut": "0",
"date_trans": "2026-11-18 17:30:00"
}
],
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
404 | 200 | No request. |
Cancel a pending payout
Token: action cancel-withdraw, valid for 5 min
Cancels the point of sale's pending request (there is only one at a time). A validated request can no longer be cancelled.
Parameters (JSON)
api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Point-of-sale number (1 to 15 characters). |
curl -X POST https://api.hpay.cash/sousMarchandAddBank/subMarchandDeleteWithdraw/ \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}'{
"api_key": "YOUR_API_KEY",
"token": "FRESH_TOKEN",
"marchant_id": "1001"
}{
"success": true,
"message": "Demande de retrait annulée avec succès.",
"sub_marchant_info": {
"sous_num": "1001",
"sous_nom": "Caisse 1",
"sous_tel": "…"
},
"annulled_request": {
"idrestitution": "…",
"montant": "150000.00",
"frais": "0.00",
"total": "150000.00",
"reference": "…",
"statut": "2",
"date_trans": "…",
"bank_paiement": "…"
},
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
703 | 200 | Point of sale not found. |
404 | 200 | No pending request. |
500 | 200 | Could not cancel. |