Skip to content
HPay Developers
Français
Merchant API reference

Bank payouts

Register a bank account

POSThttps://api.hpay.cash/sousMarchandAddBank/

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"
}'
Response
{
  "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_codeHTTPCause
703200Point of sale not found.
704200This account (bank + IBAN/SWIFT) already exists.
705 / 706 / 707200Could not be stored: contact HPay.

List bank accounts

POSThttps://api.hpay.cash/sousMarchandAddBank/subMarchandAccountList/

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"
}'
Response
{
  "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_codeHTTPCause
703200Point of sale not found.
404200No bank account.

Delete a bank account

POSThttps://api.hpay.cash/sousMarchandAddBank/subMarchandDeleteAccount/

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
}'
Response
{
  "success": true,
  "message": "Le compte bancaire a été supprimé avec succès",
  "deleted_bank_details": {
    "…": "…"
  },
  "error_code": 0
}

Errors specific to this endpoint

error_codeHTTPCause
703200Point of sale not found.
704200Bank account not found for this point of sale.
705200Could not delete.

Request a payout

POSThttps://api.hpay.cash/sousMarchandAddBank/subMarchandAddWithdraw/

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"
}'
Response
{
  "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_codeHTTPCause
703200Point of sale not found.
704200Insufficient balance.
705200Bank account not found for this point of sale.
707200A request is already pending.

Track payouts

POSThttps://api.hpay.cash/sousMarchandAddBank/subMarchandWithdrawAll/

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
}'
Response
{
  "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_codeHTTPCause
703200Point of sale not found.
404200No request.

Cancel a pending payout

POSThttps://api.hpay.cash/sousMarchandAddBank/subMarchandDeleteWithdraw/

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"
}'
Response
{
  "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_codeHTTPCause
703200Point of sale not found.
404200No pending request.
500200Could not cancel.

Next : HPay top-ups →