https://dessalinesbank.com/api/transactions
Installation du Client Guzzle
composer require guzzlehttp/guzzle
Utilisation du Client
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
Récupère toutes les transactions via la clé API de l'utilisateur et les retourne en format JSON.
Paramètres de requete :apiKey string requiredtype string required : deposit or withdrawmode required : sandbox (Seulement en cas de test)
$response = $client->request('GET', 'https://dessalinesbank.com/api/transactions/getTransaction', [
'headers' => [
'accept' => 'application/json',
],
'query' => [
'apiKey' => "VOTRE_API_KEY_ICI",
'type' => 'deposit'
]
]);
echo $response->getBody();
Réponse JSON (Exemple) :
{
"success": true,
"message": "Transaction retrieved successfully",
"user": [
{
"method": "paypal",
"currency": "USD",
"amount": "500000.00",
"fee": 0,
"totalAmount": 0,
"status": "approved",
"created_at": "2025-06-01 14:17:03",
"info_reception": "jeanpierre@gmail.com"
},
{
"method": "cashapp",
"currency": "USD",
"amount": "50.00",
"fee": 0,
"totalAmount": 0,
"status": "approved",
"created_at": "2025-06-25 02:08:51",
"info_reception": "43568763"
}
}
apiKey string required
$response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/getBalance', [
'headers' => [
'accept' => 'application/json',
],
'json' => [
'apiKey' => "VOTRE_API_KEY_ICI",
]
]);
echo $response->getBody();
Réponse JSON (Exemple) :
{
"success": true,
"message": "Getting balance with success",
"email": "user@email.com",
"balance": 2500,
"currency": "HTG"
}
Créer un dépôt
Paramètres de corps :apiKey string requiredemail string requiredamount float required
$response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/create-deposit', [
'headers' => [
'accept' => 'application/json',
],
'json' => [
'apiKey' => "VOTRE_API_KEY_ICI",
'email' => "EMAIL_USER",
'amount' => 3000
]
]);
echo $response->getBody();
Réponse JSON (Exemple) :
{
"success": true,
"message": "Depot effectue avec succes",
"data": {
"id": 123,
"email": "client@email.com",
"amount": 1000,
"fee": 30,
"total": 1030,
"currency": "HTG",
"status": "approved"
}
}
Créer un retrait
Paramètres de corps :apiKey string requiredemail string requiredamount float required
$response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/create-withdraw', [
'headers' => [
'accept' => 'application/json',
],
'json' => [
'apiKey' => "VOTRE_API_KEY_ICI",
'email' => "EMAIL_USER",
'amount' => 3000
]
]);
echo $response->getBody();
Réponse JSON (Exemple) :
{
"success": true,
"message": "Retrait effectue avec succes",
"data": {
"id": 123,
"email": "client@email.com",
"amount": 1000,
"fee": 30,
"total": 1030,
"currency": "HTG",
"status": "approved"
}
}