Dessalines Bank

Documentation API Dessalines Bank

Base URL : 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();
                            
GET/getTransaction

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 required
  • country string required : us or ht
  • mode 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",
                                            'country' => 'ht'
                                        ]
                                    ]);

                                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"
                                        }
                                }
                            
POST /getBalance
Paramètres de corps :
  • apiKey string required
  • country string required : us or ht
                                $response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/getBalance', [
                                        'headers' => [
                                            'accept' => 'application/json',
                                        ],
                                        'json' => [
                                            'apiKey' => "VOTRE_API_KEY_ICI",
                                            'country' => 'ht'
                                        ]
                                    ]);

                                echo $response->getBody();
                            
Réponse JSON (Exemple) :
                                {
                                "success": true,
                                "message": "Getting balance with success",
                                "email": "user@email.com",
                                "balance": 2500,
                                "currency": "HTG"
                                }
                            
POST /getBalanceByEmail
Paramètres de corps :
  • email string required
  • country string required : us or ht
                                $response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/getBalanceByEmail', [
                                        'headers' => [
                                            'accept' => 'application/json',
                                        ],
                                        'json' => [
                                            'email' => "your@example.com",
                                            'country' => 'ht'
                                        ]
                                    ]);

                                echo $response->getBody();
                            
Réponse JSON (Exemple) :
                                {
                                "success": true,
                                "message": "Getting balance with success",
                                "email": "user@email.com",
                                "balance": 2500,
                                "currency": "HTG"
                                }
                            
POST /create-deposit

Créer un dépôt

Paramètres de corps :
  • apiKey string required
  • email string required
  • amount float required
  • country string required : us or ht
                                $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,
                                            'country' => 'ht'
                                        ]
                                    ]);

                                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"
                                }
                                }
                            
POST /create-withdraw

Créer un retrait

Paramètres de corps :
  • apiKey string required
  • email string required
  • amount float required
  • country string required : us or ht
                                $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,
                                            'country' => 'ht'
                                        ]
                                    ]);

                                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"
                                }
                                }
                            
POST /payment

Effectuer un paiement

Paramètres de corps :
  • amount float required
  • email string required
  • apiKey string required
  • country string required : us or ht
                                $response = $client->request('POST', 'https://dessalinesbank.com/api/transactions/payment', [
                                        'headers' => [
                                            'accept' => 'application/json',
                                        ],
                                        'json' => [
                                            'apiKey' => "VOTRE_API_KEY_ICI",
                                            'email' => "EMAIL_USER",
                                            'amount' => 3000,
                                            'country' => 'ht'
                                        ]
                                    ]);

                                echo $response->getBody();
                            
Redirection pour authentication PIN
PIN Verification
                                    $url = "https://dessalinesbank.com/api/auth/return_url.php";
                                    $headers = [
                                        'Content-Type: application/json',
                                        'Accept: application/json'
                                    ];
                                    $ch = curl_init($url);
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

                                    $response = curl_exec($ch);
                                    curl_close($ch);

                                    $result = json_decode($response, true);
                                
Réponse JSON (Exemple) :
                                {
                                    "success": true,
                                    "message": "Données de transaction reçues et traitées",
                                    "transaction": {
                                        "reference": "REF123456",
                                        "amount": 100.0,
                                        "fee": 2.0,
                                        "total": 102.0,
                                        "timestamp": "2026-05-05 12:00:00",
                                        "status": "completed",
                                        "currency": "HTG"
                                    },
                                    "user": {
                                        "id": 1,
                                        "email": "user@example.com",
                                        "country": "ht"
                                    }
                                }