Points of sale
Create a point of sale
POSThttps://api.hpay.cash/newmarchant/
Token: action newaccount, valid for 10 min
Adds a point of sale (till, shop, terminal) to your account. You choose its number. Its login details are sent by SMS and email to the given phone and address. Even in test mode the point of sale is really created: call it only once.
Parameters (JSON)
main_api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idrequiredstring |
Chosen number, unique, 1 to 15 characters. |
marchant_namerequiredstring |
Display name (45 characters). |
marchant_phone_numberrequiredstring |
Phone, unique (15 characters). |
marchant_emailrequiredstring |
Email, 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"
}Response
{
"success": true,
"message": "…",
"new_marchand_id": "1002",
"register_date": "2026-11-18 10:12:00",
"transaction_mode": "test",
"token_used": "…",
"error_code": 0
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
7004 | 400 | marchant_id empty or longer than 15 characters. |
30 | 200 | Unknown API key. |
7002 | 200 / 409 | Number, phone or email already used. |
7003 | 500 | Could not be stored: contact HPay. |
List points of sale
POSThttps://api.hpay.cash/sousMarchandListe/
Token: action submarchant, valid for 15 min
With an empty marchant_id, returns all your points of sale, by name.
Parameters (JSON)
main_api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idmay be emptystring |
One point of sale, or empty for all. |
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": ""
}Response
{
"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
}
]
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
30 | 200 | Unknown API key. |
111 | 200 | No point of sale. |
Read a balance
POSThttps://api.hpay.cash/getBalance/
Token: action get_balance, valid for 15 min
With a marchant_id, returns that point of sale's balance; empty, your Business account balance.
Parameters (JSON)
main_api_keyrequiredstring |
Your API key. |
tokenrequiredstring |
Token from /token/ with the stated action. |
marchant_idmay be emptystring |
One point of sale, or empty for the Business account. |
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"
}Response
{
"info": {
"success": true,
"message": "…",
"balance": "182450.00",
"currency": "HTG",
"payment_date": "2026-11-18 15:20:00",
"token_used": "…",
"error_code": 0
}
}Errors specific to this endpoint
| error_code | HTTP | Cause |
|---|---|---|
30 | 200 | Unknown API key. |
61 | 200 | Business account not found. |
62 | 200 | Point of sale not found. |