Paiements

Initiate, confirm and manage payments across all providers with a single endpoint.

Initiate a payment

POST https://api.germinopay.com/v1/paiement/initier

Creates a payment and returns a redirect URL. Send the user to that URL.

Parameters

Field Type Required Description
montant number Yes Amount to charge (in the smallest unit of the currency).
devise string Yes Currency code: XOF, XAF, EUR, USD, NGN, GHS.
fournisseur string Yes paypal, cinetpay, fedapay, paydunya
reference string Yes Your own unique reference (command ID, invoice number...).
client_email string No Email of the paying customer (for receipts).
client_nom string No Customer name.
return_url string No URL to redirect the customer after successful payment.
cancel_url string No URL to redirect if the customer cancels.
metadata object No Custom data attached to the transaction (returned in webhooks).

Responses

200 OK Payment successfully initiated
{
  "success": true,
  "message": "Payment initiated successfully",
  "data": {
    "reference": "GP-20251001-ABC123",
    "transaction_id": "txn_9f8e7d6c5b4a",
    "fournisseur": "cinetpay",
    "montant": 5000,
    "devise": "XOF",
    "frais": 75,
    "montant_net": 4925,
    "statut": "initie",
    "payment_url": "https://checkout.cinetpay.com/pay/GP-20251001-ABC123",
    "expires_at": "2025-10-01T14:30:00Z",
    "created_at": "2025-10-01T13:30:00Z",
    "metadata": {
      "commande_id": 1042
    }
  }
}
400 Bad Request Invalid parameters
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'montant' field must be a positive number",
    "field": "montant",
    "docs": "https://germinopay.com/docs/erreurs#INVALID_PARAMETER"
  }
}
401 Unauthorized Invalid signature
{
  "success": false,
  "error": {
    "code": "INVALID_SIGNATURE",
    "message": "The HMAC signature does not match",
    "docs": "https://germinopay.com/docs/erreurs#INVALID_SIGNATURE"
  }
}
409 Conflict Duplicate reference
{
  "success": false,
  "error": {
    "code": "DUPLICATE_REFERENCE",
    "message": "A transaction with this reference already exists",
    "docs": "https://germinopay.com/docs/erreurs#DUPLICATE_REFERENCE"
  }
}

Verify a payment

GET https://api.germinopay.com/v1/paiement/{reference}
curl https://api.germinopay.com/v1/paiement/GP-20251001-ABC123 \
  -H "X-Public-Key: pk_live_xxxx" \
  -H "X-Timestamp: 1730000000" \
  -H "X-Signature: hmac_sha256_signature"
<?php
$reference = "GP-20251001-ABC123";
$timestamp = time();
$message = "GET/v1/paiement/" . $reference . $timestamp;
$signature = hash_hmac("sha256", $message, $secretKey);

$ch = curl_init("https://api.germinopay.com/v1/paiement/" . $reference);
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);
curl_close($ch);

echo $data["data"]["statut"]; // initie, en_cours, succes, echoue, rembourse
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",
    "metadata": { "commande_id": 1042 },
    "created_at": "2025-10-01T13:30:00Z",
    "paid_at": "2025-10-01T13:32:15Z"
  }
}

Provider specifics

PayPal

CinetPay

FedaPay

PayDunya