Documentation API Transactions

Transactions

Listez, filtrez et consultez toutes les transactions de votre compte marchand.

Lister les transactions

GET https://api.germinopay.com/v1/transactions

Paramètres de requête

Paramètre Type Défaut Description
pageint1Numéro de page
per_pageint20Éléments par page (max 100)
statutstring—initie, en_cours, succes, echoue, rembourse
fournisseurstring—paypal, cinetpay, fedapay, paydunya
devisestring—Code devise
date_fromdate—Date ISO (YYYY-MM-DD)
date_todate—Date ISO (YYYY-MM-DD)
referencestring—Correspondance exacte sur la référence
curl "https://api.germinopay.com/v1/transactions?statut=succes&per_page=50&date_from=2025-10-01" \
  -H "X-Public-Key: pk_live_xxxx" \
  -H "X-Timestamp: 1730000000" \
  -H "X-Signature: hmac_sha256_signature"
<?php
$query = http_build_query([
    "statut" => "succes",
    "per_page" => 50,
    "date_from" => "2025-10-01",
]);

$path = "/v1/transactions?" . $query;
$timestamp = time();
$signature = hash_hmac("sha256", "GET" . $path . $timestamp, $secretKey);

$ch = curl_init("https://api.germinopay.com" . $path);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-Public-Key: " . $publicKey,
        "X-Timestamp: " . $timestamp,
        "X-Signature: " . $signature,
    ],
]);

$data = json_decode(curl_exec($ch), true);
const query = new URLSearchParams({
  statut: 'succes',
  per_page: 50,
  date_from: '2025-10-01',
}).toString();

const path = `/v1/transactions?${query}`;
const timestamp = Math.floor(Date.now() / 1000);
const signature = crypto
  .createHmac('sha256', process.env.GERMINOPAY_SECRET)
  .update(`GET${path}${timestamp}`)
  .digest('hex');

const res = await fetch(`https://api.germinopay.com${path}`, {
  headers: {
    'X-Public-Key': process.env.GERMINOPAY_PUBLIC,
    'X-Timestamp': timestamp,
    'X-Signature': signature,
  },
});
const data = await res.json();
200 OK
{
  "success": true,
  "data": {
    "transactions": [
      {
        "reference": "GP-20251001-ABC123",
        "transaction_id": "txn_9f8e7d6c5b4a",
        "fournisseur": "cinetpay",
        "montant": 5000,
        "devise": "XOF",
        "frais": 75,
        "montant_net": 4925,
        "statut": "succes",
        "client_email": "client@example.com",
        "created_at": "2025-10-01T13:30:00Z",
        "paid_at": "2025-10-01T13:32:15Z"
      }
    ],
    "pagination": {
      "page": 1,
      "per_page": 50,
      "total": 127,
      "total_pages": 3
    }
  }
}

Transaction unique

GET https://api.germinopay.com/v1/transactions/{reference}
200 OK
{
  "success": true,
  "data": {
    "reference": "GP-20251001-ABC123",
    "transaction_id": "txn_9f8e7d6c5b4a",
    "fournisseur": "cinetpay",
    "montant": 5000,
    "devise": "XOF",
    "frais": 75,
    "montant_net": 4925,
    "statut": "succes",
    "client_email": "client@example.com",
    "client_nom": "Kossi Amegan",
    "metadata": {
      "commande_id": 1042,
      "source": "web"
    },
    "created_at": "2025-10-01T13:30:00Z",
    "updated_at": "2025-10-01T13:32:15Z",
    "paid_at": "2025-10-01T13:32:15Z"
  }
}

Statuts

Statut Signification
initieTransaction créée, en attente du paiement du client.
en_coursLe fournisseur traite le paiement.
succesPaiement réussi. Les fonds sont crédités sur votre solde.
echouePaiement échoué (fonds insuffisants, carte expirée, annulation...).
rembourseTransaction remboursée au client.