📌 Documentation API - Balance Compte Entreprise

Endpoint

URL : /app/api/entreprise/getBalance

Méthode : POST

Description : Permet de récupérer la balance actuelle du compte entreprise.

📦 Payload JSON attendu

{
  "api_key":"933366",
  "action":"balance",
  "api_public_key":"p.193.11643",
  "token":"Q0hyZUp3V3VNqdCtUeHB5N0gx..."
}

🗂️ Détails des champs

Champ Type Obligatoire Description
api_keystring✅Clé privée d’authentification du marchand
actionstring✅Action demandée : "balance"
api_public_keystring✅Clé publique associée au marchand
tokenstring✅Jeton sécurisé signé

📤 Exemple de requête

curl -X POST /app/api/entreprise/getBalance \
-H "Content-Type: application/json" \
-d '{
  "api_key":"933ada329b6",
  "action":"balance",
  "api_public_key":"p.19e2b8a3.11643",
  "token":"Q0hyZUp3V3VhTy9VMy9oMJzNmprZWxvVmNqdCtUeHB5N0gx..."
}'

📥 Exemple de réponse JSON

{
  "success": true,
  "message": "Account balance fetched",
  "data": {
    "num_compte": "1776951497",
    "balance": "1000",
    "currency": null
  }
}