API & développeurs

API Fidepay.

Intégrez Fidepay dans votre application en quelques heures. API REST sécurisée, tokens Bearer Sanctum, webhooks signés HMAC SHA-256, environnements sandbox & production.

22opérateurs mobile money
11pays africains
10devises
8endpoints REST

Currencies

Devises supportées par Fidepay (10 devises actives).

Currency NameSymbolCode
EuroEUR
Main Wallet (USD)$USD
Franc CFA BEACFCFAXAF
Franc CFA BCEAOFCFAXOF
Franc CongolaisFCCDF
Kenyan ShillingKShKES
Rwandan FrancFRwRWF
Sierra Leonean LeoneLeSLE
Ugandan ShillingUShUGX
Zambian KwachaKZMW

Obtain API Key

  1. Connecte-toi à ton compte commerçant : merchant.fide-pay.com
  2. Va dans Merchant App → API Access Key.
  3. Tu trouveras ta Public Key et ta Secret Key.
  4. Bouton Regenerate pour générer de nouvelles clés à tout moment.

⚠️ Garde ces clés privées. Ne les partage jamais et ne les exposes jamais côté frontend.

Sandbox testing

Numéros de test mobile money

Utilise ces MSISDN dans tes appels sandbox pour simuler chaque scénario : succès, attente (polling), échec ciblé. La convention PawaPay code le résultat dans le dernier suffixe du numéro (ex. …789 = COMPLETED, …129 = SUBMITTED, …049 = INSUFFICIENT_BALANCE).

11 pays · 22 opérateurs · source : docs.pawapay.io

🇨🇩

RDC

+243 · CDF
Vodacom M-Pesa VODACOM_MPESA_COD
243893456789243893456129
4 échecs simulés
  • 243893456029PAYER_NOT_FOUND
  • 243893456039PAYMENT_NOT_APPROVED
  • 243893456049INSUFFICIENT_BALANCE
  • 243893456069UNSPECIFIED_FAILURE
Airtel Money AIRTEL_COD
243973456789243973456129
1 échec simulé
  • 243973456069UNSPECIFIED_FAILURE
Orange Money ORANGE_COD
243893456789243893456129
4 échecs simulés
  • 243893456029PAYER_NOT_FOUND
  • 243893456039PAYMENT_NOT_APPROVED
  • 243893456049INSUFFICIENT_BALANCE
  • 243893456069UNSPECIFIED_FAILURE
🇨🇮

Côte d'Ivoire

+225 · XOF
MTN MoMo MTN_MOMO_CIV
22505034567892250503456129
3 échecs simulés
  • 2250503456029PAYER_NOT_FOUND
  • 2250503456039PAYMENT_NOT_APPROVED
  • 2250503456069UNSPECIFIED_FAILURE
Orange Money ORANGE_CIV
22507345678902250734567130
2 échecs simulés
  • 2250734567030PAYMENT_NOT_APPROVED
  • 2250734567060UNSPECIFIED_FAILURE
🇸🇳

Sénégal

+221 · XOF
Free Money FREE_SEN
221763456789221763456129
2 échecs simulés
  • 221763456049INSUFFICIENT_BALANCE
  • 221763456069UNSPECIFIED_FAILURE
Orange Money ORANGE_SEN
221773456789221773456129
3 échecs simulés
  • 221773456029PAYER_NOT_FOUND
  • 221773456049INSUFFICIENT_BALANCE
  • 221773456069UNSPECIFIED_FAILURE
🇨🇲

Cameroun

+237 · XAF
MTN MoMo MTN_MOMO_CMR
237653456789237653456129
4 échecs simulés
  • 237653456019PAYER_LIMIT_REACHED
  • 237653456029PAYER_NOT_FOUND
  • 237653456039PAYMENT_NOT_APPROVED
  • 237653456069UNSPECIFIED_FAILURE
Orange Money ORANGE_CMR
237653456789237653456129
4 échecs simulés
  • 237653456019PAYER_LIMIT_REACHED
  • 237653456029PAYER_NOT_FOUND
  • 237653456039PAYMENT_NOT_APPROVED
  • 237653456069UNSPECIFIED_FAILURE
🇬🇦

Gabon

+241 · XAF
Airtel Money AIRTEL_GAB
2417434567824174345128
2 échecs simulés
  • 24174345048INSUFFICIENT_BALANCE
  • 24174345068UNSPECIFIED_FAILURE
🇨🇬

Congo Brazzaville

+242 · XAF
Airtel Money AIRTEL_COG
242053456789242053456129
3 échecs simulés
  • 242053456039PAYMENT_NOT_APPROVED
  • 242053456049INSUFFICIENT_BALANCE
  • 242053456069UNSPECIFIED_FAILURE
MTN MoMo MTN_MOMO_COG
242063456789242063456129
4 échecs simulés
  • 242063456029PAYER_NOT_FOUND
  • 242063456039PAYMENT_NOT_APPROVED
  • 242063456049INSUFFICIENT_BALANCE
  • 242063456069UNSPECIFIED_FAILURE
🇰🇪

Kenya

+254 · KES
M-Pesa MPESA_KEN
254703456789254703456129
5 échecs simulés
  • 254703456019PAYER_LIMIT_REACHED
  • 254703456039PAYMENT_NOT_APPROVED
  • 254703456049INSUFFICIENT_BALANCE
  • 254703456059TRANSACTION_ALREADY_IN_PROCESS
  • 254703456069UNSPECIFIED_FAILURE
🇷🇼

Rwanda

+250 · RWF
Airtel Money AIRTEL_RWA
250733456789250733456129
3 échecs simulés
  • 250733456039PAYMENT_NOT_APPROVED
  • 250733456049INSUFFICIENT_BALANCE
  • 250733456069UNSPECIFIED_FAILURE
MTN MoMo MTN_MOMO_RWA
250783456789250783456129
4 échecs simulés
  • 250783456019PAYER_LIMIT_REACHED
  • 250783456029PAYER_NOT_FOUND
  • 250783456039PAYMENT_NOT_APPROVED
  • 250783456069UNSPECIFIED_FAILURE
🇸🇱

Sierra Leone

+232 · SLE
Orange Money ORANGE_SLE
23276123456
🇺🇬

Ouganda

+256 · UGX
Airtel Money AIRTEL_OAPI_UGA
256753456789256753456129
4 échecs simulés
  • 256753456019PAYER_LIMIT_REACHED
  • 256753456039PAYMENT_NOT_APPROVED
  • 256753456049INSUFFICIENT_BALANCE
  • 256753456069UNSPECIFIED_FAILURE
MTN MoMo MTN_MOMO_UGA
256783456789256783456129
3 échecs simulés
  • 256783456019PAYER_LIMIT_REACHED
  • 256783456029PAYER_NOT_FOUND
  • 256783456069UNSPECIFIED_FAILURE
🇿🇲

Zambie

+260 · ZMW
Airtel Money AIRTEL_OAPI_ZMB
260973456789260973456129
4 échecs simulés
  • 260973456019PAYER_LIMIT_REACHED
  • 260973456039PAYMENT_NOT_APPROVED
  • 260973456049INSUFFICIENT_BALANCE
  • 260973456069UNSPECIFIED_FAILURE
MTN MoMo MTN_MOMO_ZMB
260763456789260763456129
4 échecs simulés
  • 260763456019PAYER_LIMIT_REACHED
  • 260763456029PAYER_NOT_FOUND
  • 260763456039PAYMENT_NOT_APPROVED
  • 260763456069UNSPECIFIED_FAILURE
Zamtel Mobile Money ZAMTEL_ZMB
260953456700260953456789
2 échecs simulés
  • 260953456704INSUFFICIENT_BALANCE
  • 260953456712UNSPECIFIED_FAILURE

Subscriptions — 3 modes d'intégration

Une fois ton plan créé via POST /merchant/plans, FidePay te donne un plan_id. Tu as ensuite 3 manières de proposer l'abonnement à tes clients.

1. Lien partagé (le plus simple)

Partage l'URL publique. Idéal pour newsletters, sales pages, in-app banners. Aucun code requis.

<a href="https://admin.fide-pay.com/subscribe/PLAN_ID">
  S'abonner — 9.99€/mois
</a>

2. Iframe embed

Place le formulaire d'abonnement directement dans ta page. La carte reste chez FidePay (PCI-DSS géré). Compatible avec tout site HTTPS.

<iframe
  src="https://admin.fide-pay.com/subscribe/PLAN_ID"
  width="500"
  height="720"
  style="border:0; border-radius:14px;"
  allow="payment"
></iframe>

3. SDK overlay (style Stripe Checkout)

Un bouton, une modale overlay. La page principale reste fluide, le callback onSuccess te donne le token d'abonnement directement en JS. C'est l'option recommandée pour les SPAs.

<button id="sub-btn">S'abonner — 9.99€/mois</button>

<script src="https://admin.fide-pay.com/js/fidepay.umd.min.js"></script>
<script>
  const fp = new Fidepay("YOUR_PUBLIC_KEY");
  document.getElementById("sub-btn").addEventListener("click", () => {
    fp.subscribe({
      planId: 1,
      mode: "overlay",
      onSuccess: (data) => {
        console.log("Sub actif", data.publicToken);
        // data.publicToken = "sub_xxx"
        // data.firstInvoice = { amount, currency, status: "paid" }
      },
      onClose: () => console.log("user fermé"),
      onError: (err) => console.error(err),
    });
  });
</script>

4. Webhook IPN (côté serveur)

Configure ton URL webhook dans merchant.fide-pay.com/dashboard/subscriptions. FidePay POST sur cette URL à chaque évènement :

  • subscription.created — premier signup, carte sauvée
  • invoice.paid — prélèvement réussi (1er ou récurrent)
  • invoice.failed — carte refusée → statut past_due
  • subscription.canceled — annulation manuelle

Signature HMAC SHA-256 dans le body : signature = hash_hmac("sha256", public_token + event + invoice_id, secret_key)

Access Token POST

Le token d'accès est requis pour faire des requêtes de paiement via l'API. Génère-le avec ta public_key et inclus-le dans le header Authorization de chaque appel suivant.

Live URLhttps://admin.fide-pay.com/api/merchant/access-token
Test URLhttps://admin.fide-pay.com/api/merchant/sandbox/access-token
MethodPOST
Param NameTypeRequiredDescription
public_keystringRequiredTa clé publique merchant (générée depuis API Access Key)
use Illuminate\Support\Facades\Http;

$url = 'https://admin.fide-pay.com/api/merchant/access-token';
$publicKey = 'your_public_key';

$response = Http::withHeaders([
    'Content-Type' => 'application/json'
])->post($url, [
    'public_key' => $publicKey,
]);

if ($response->successful()) {
    return response()->json($response->json());
} else {
    return response()->json($response->json());
}

Example Response Success 200

{
    "status": "success",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOi...",
    "expires_at": "2026-05-10T08:00:00Z"
}

Example Response Error (400/401)

// Token invalid or expired (401)
{
    "status": "error",
    "message": "Token is invalid or expired"
}

// Validation error (400)
{
    "status": "error",
    "message": ["The public key is required."]
}

Make Payment POST

Initie une transaction de paiement. Le client est ensuite redirigé sur la page de paiement Fidepay. Quand le paiement est confirmé, ton ipn_url reçoit un IPN signé HMAC.

Live URLhttps://admin.fide-pay.com/api/merchant/make-payment
Test URLhttps://admin.fide-pay.com/api/merchant/sandbox/make-payment
MethodPOST
Param NameTypeRequiredDescription
amountfloat|integerRequiredMontant à charger pour la transaction.
currencystring (4)RequiredCode devise (e.g., USD, EUR, XAF, XOF, CDF)
transaction_idstring (12)RequiredIdentifiant unique de la transaction (12 chars alphanumériques).
descriptionstring (20)RequiredBrève description du paiement.
ipn_urlstring (255)OptionalURL où Fidepay envoie la notification IPN signée.
callback_urlstring (255)OptionalURL de redirection du customer après paiement.
customer_namestring (50)OptionalNom du customer.
customer_emailstring (50)OptionalEmail du customer.
$url = 'https://admin.fide-pay.com/api/merchant/make-payment';
$authToken = 'your_authorization_token_here';

$data = [
    'amount' => 100.00,
    'currency' => 'EUR',
    'transaction_id' => 'TX2026000001',
    'description' => 'Test payment',
    'ipn_url' => 'https://yourdomain.com/ipn',
    'callback_url' => 'https://yourdomain.com/callback',
    'customer_name' => 'Joel Dupont',
    'customer_email' => 'joel@example.com',
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $authToken,
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    $r = json_decode($response, true);
    print_r($r);
} else {
    echo 'Error: ' . $httpCode . PHP_EOL;
    echo $response;
}

Example Response Success 200

{
    "status": "success",
    "data": {
        "tnx": "TRX4MEBJSUPQB",
        "payment_url": "https://admin.fide-pay.com/pay/TRX4MEBJSUPQB",
        "amount": 100.00,
        "charge": 3.50,
        "final_amount": 103.50
    }
}

Example Response Error (400/401)

// Token invalid or expired (401)
{
    "status": "error",
    "message": "Token is invalid or expired"
}

// Validation error (400)
{
    "status": "error",
    "message": ["The transaction id has already been taken."]
}

Transfer wallet-to-wallet POST

Envoie des fonds depuis ton wallet Fidepay vers un autre user Fidepay. Idempotent via le champ reference (2 appels avec la même reference = un seul transfer).

Live URLhttps://admin.fide-pay.com/api/merchant/transfer
Test URLhttps://admin.fide-pay.com/api/merchant/transfer
MethodPOST
Param NameTypeRequiredDescription
to_merchant_user_idintegerRequiredUser ID du destinataire (entier Fidepay). Alternative : recipient_account_number.
amountnumericRequiredMontant à transférer.
currencystring (3)RequiredCode devise (EUR, XAF...). Alternative : currency_id (entier).
referencestring (64)OptionalID unique pour idempotence. Recommandé.
descriptionstring (255)OptionalDescription libre.
ipn_urlstring (255)OptionalURL de notification IPN.
$url = 'https://admin.fide-pay.com/api/merchant/transfer';
$authToken = 'your_authorization_token';

$data = [
    'to_merchant_user_id' => 87,
    'amount' => 90.00,
    'currency' => 'EUR',
    'reference' => 'PC-' . bin2hex(random_bytes(16)),
    'description' => 'Vente Vandy — Guide Forex',
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $authToken,
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

if ($response['data']['idempotent_replay']) {
    // Déjà transféré, pas un nouveau
} else {
    // Nouveau transfer réussi
}
print_r($response);

Example Response Success 200

{
    "status": "success",
    "data": {
        "transfer_id": 753,
        "tnx": "TRXMZGLE6JKJ5",
        "reference": "PC-...",
        "status": "completed",
        "amount": 90.00,
        "currency": "EUR",
        "from_balance_remaining": 1234.56,
        "recipient": {
            "user_id": 87,
            "name": "Vandy Shop"
        },
        "idempotent_replay": false,
        "completed_at": "2026-05-09 08:30:00"
    }
}

Example Response Error (400/401)

// Solde insuffisant (422)
{
    "status": "error",
    "message": "Insufficient balance",
    "errors": {
        "code": "INSUFFICIENT_BALANCE",
        "balance": 50.00,
        "required": 90.00
    }
}

// Reference déjà utilisée avec params différents (422)
{
    "status": "error",
    "message": "Reference already used with different parameters",
    "errors": { "code": "REFERENCE_CONFLICT" }
}

Lookup utilisateur GET

Vérifie l'existence d'un utilisateur Fidepay avant de lui transférer. Réservé aux comptes plateforme. Au moins un des 3 query params requis.

Live URLhttps://admin.fide-pay.com/api/merchant/lookup
Test URLhttps://admin.fide-pay.com/api/merchant/lookup
MethodGET
Param NameTypeRequiredDescription
emailstring (query)OptionalEmail du user.
usernamestring (query)OptionalUsername du user.
user_idinteger (query)OptionalUser ID Fidepay.
$authToken = 'your_authorization_token';
$email = 'marchand@example.com';

$url = 'https://admin.fide-pay.com/api/merchant/lookup?email=' . urlencode($email);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $authToken,
    'Accept: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

if ($response['status'] === 'success') {
    echo "Trouvé : " . $response['data']['business_name'];
}

Example Response Success 200

{
    "status": "success",
    "data": {
        "user_id": 87,
        "email": "marchand@example.com",
        "username": "vandy",
        "account_number": "3763363055",
        "business_name": "Vandy Shop",
        "currency_default": "EUR",
        "verified": true,
        "active": true,
        "is_merchant": true
    }
}

Example Response Error (400/401)

// User pas trouvé (404)
{
    "status": "error",
    "message": "User not found",
    "errors": { "code": "USER_NOT_FOUND" }
}

// Pas le compte plateforme (403)
{
    "status": "error",
    "message": "Only the platform admin can perform user lookups",
    "errors": { "code": "FORBIDDEN_NON_PLATFORM" }
}

Subscriptions — Create plan POST

Crée un plan d'abonnement récurrent. Une fois créé, partage le lien public /subscribe/{plan_id} avec tes clients. Stripe sauvegarde leur carte, FidePay prélève chaque période automatiquement (1% commission par prélèvement).

Live URLhttps://admin.fide-pay.com/api/merchant/plans
Test URLhttps://admin.fide-pay.com/api/merchant/plans
MethodPOST
Param NameTypeRequiredDescription
namestring (100)RequiredNom du plan visible par le client.
amountnumericRequiredMontant à prélèvement par période.
currencystring (3)RequiredDevise (EUR, USD, GBP, CHF, CDF, XOF...).
intervalstringRequiredPériode : day, week, month, year.
interval_countintegerOptionalMultiple de la période (ex. 3 mois = month/3). Défaut 1.
trial_daysintegerOptionalJours d'essai gratuit (0-365).
descriptionstring (500)OptionalDescription du plan affichée au client.
$url = 'https://admin.fide-pay.com/api/merchant/plans';
$authToken = 'your_authorization_token_here';

$data = [
    'name' => 'Plan Pro mensuel',
    'amount' => 9.99,
    'currency' => 'EUR',
    'interval' => 'month',
    'interval_count' => 1,
    'trial_days' => 7,
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $authToken,
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

// Le lien à partager avec ton client :
echo 'https://admin.fide-pay.com/subscribe/' . $response['data']['id'];

Example Response Success 200

{
    "status": "success",
    "data": {
        "id": 1,
        "name": "Plan Pro mensuel",
        "amount": "9.99000000",
        "currency": "EUR",
        "interval": "month",
        "interval_count": 1,
        "trial_days": 7,
        "status": "active",
        "subscribe_url": "https://admin.fide-pay.com/subscribe/1"
    }
}

Example Response Error (400/401)

// Validation error (400)
{
    "status": "error",
    "message": ["The amount must be at least 0.01."]
}

Subscriptions — List subscribers GET

Liste tous tes abonnés. Filtrage par statut possible.

Live URLhttps://admin.fide-pay.com/api/merchant/subscriptions
Test URLhttps://admin.fide-pay.com/api/merchant/subscriptions
MethodGET
Param NameTypeRequiredDescription
statusstring (query)OptionalFiltre : active, trialing, past_due, canceled, incomplete.
plan_idinteger (query)OptionalFiltre par plan.
$url = 'https://admin.fide-pay.com/api/merchant/subscriptions?status=active';
$authToken = 'your_authorization_token';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $authToken,
    'Accept: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

foreach ($response['data'] as $sub) {
    echo $sub['customer_email'] . ' — ' . $sub['status'] . PHP_EOL;
}

Example Response Success 200

{
    "status": "success",
    "data": [
        {
            "id": 3,
            "public_token": "sub_QnX2fRjpxh8O8PqUuXSe1PZb",
            "plan": { "name": "Plan Pro mensuel", "amount": "9.99", "currency": "EUR" },
            "customer_email": "client@example.com",
            "status": "active",
            "mode": "live",
            "current_period_end": "2026-06-30T11:39:34Z"
        }
    ]
}

Example Response Error (400/401)

// Auth invalide (401)
{
    "status": "error",
    "message": "Unauthenticated."
}

Subscriptions — Cancel POST

Annule un abonnement. Le client ne sera plus prélevé à la prochaine période. L'abonnement reste actif jusqu'à la fin de la période en cours.

Live URLhttps://admin.fide-pay.com/api/merchant/subscriptions/{id}/cancel
Test URLhttps://admin.fide-pay.com/api/merchant/subscriptions/{id}/cancel
MethodPOST
Param NameTypeRequiredDescription
id (URL)integerRequiredSubscription ID.
$id = 3;
$url = "https://admin.fide-pay.com/api/merchant/subscriptions/{$id}/cancel";
$authToken = 'your_authorization_token';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $authToken,
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

Example Response Success 200

{
    "status": "success",
    "data": {
        "id": 3,
        "status": "canceled",
        "canceled_at": "2026-05-30T12:00:00Z"
    }
}

Example Response Error (400/401)

// Subscription pas trouvée (404)
{
    "status": "error",
    "message": "Subscription not found"
}

IPN (notification webhook) POST

Quand un paiement est confirmé, Fidepay envoie un POST vers ton ipn_url avec un payload signé HMAC SHA-256. Tu dois répondre HTTP 200 pour acknowledge sinon Fidepay retentera 5 fois.

Live URLTon IPN URL
Test URLTon IPN URL (sandbox)
MethodPOST
Param NameTypeRequiredDescription
data[transaction_id]stringRequiredID de la transaction (le tien).
data[total_amount]stringRequiredMontant total (string brute, à NE PAS reformatter).
signaturestring (hex)RequiredHMAC SHA-256 = hash_hmac(transaction_id + total_amount, secret_key)
statusstringRequired'success' | 'failed'
// Vérification IPN côté merchant
$secretKey = 'your_secret_key_here';
$data = $_POST['data'] ?? [];
$receivedSignature = $_POST['signature'] ?? '';

// Recréer la signature
$dataToHash = $data['transaction_id'] . $data['total_amount'];
$generatedSignature = hash_hmac('sha256', $dataToHash, $secretKey);

// Vérifier
if (hash_equals($generatedSignature, $receivedSignature)) {
    // Signature valide → traiter le paiement
    $tnxId = $data['transaction_id'];
    $amount = $data['total_amount'];
    // Marque la commande comme payée dans ta BDD
    http_response_code(200);
    echo 'OK';
} else {
    // Signature invalide → ne PAS traiter
    http_response_code(403);
    echo 'Invalid signature';
}

FidePay sur Shopify

Shopify ne permet pas d'installer des plugins PHP comme WooCommerce. La méthode recommandée pour intégrer FidePay consiste à ajouter le SDK browser dans ton thème et appeler fp.checkout() ou fp.subscribe() depuis tes pages produit. Aucune app Shopify à publier.

1. Ajoute le SDK au thème

Dans Shopify Admin : Online Store → Themes → Edit code. Ouvre layout/theme.liquid et ajoute juste avant </head> :

<script src="https://admin.fide-pay.com/js/fidepay.umd.min.js" defer></script>

2. Crée tes plans FidePay (une fois)

Va sur merchant.fide-pay.com/dashboard/subscriptions et crée un plan par offre récurrente. Note le plan_id (entier) pour chaque plan.

3. Page produit : bouton "S'abonner"

Édite sections/main-product.liquid (ou templates/product.liquid) et ajoute le bouton là où tu veux :

{% if product.metafields.fidepay.plan_id %}
  <button type="button" id="fidepay-sub-{{ product.id }}"
    style="width:100%;padding:14px;background:#ff4600;color:#fff;border:0;border-radius:10px;font-size:16px;font-weight:600;cursor:pointer;margin-top:12px;">
    S'abonner — {{ product.price | money }}
  </button>

  <script>
    document.getElementById("fidepay-sub-{{ product.id }}").addEventListener("click", function() {
      const fp = new Fidepay("{{ shop.metafields.fidepay.public_key }}");
      fp.subscribe({
        planId: {{ product.metafields.fidepay.plan_id }},
        mode: "overlay",
        onSuccess: function(data) {
          // Optionnel : POST vers /apps/fidepay-webhook si tu as un endpoint custom
          window.location.href = "/pages/merci?ref=" + data.publicToken;
        },
        onClose: function() {},
        onError: function(err) { alert("Erreur : " + err.message); },
      });
    });
  </script>
{% endif %}

4. Lie chaque produit à un plan FidePay

Pour chaque produit récurrent : Settings → Custom data → Products → ajoute un champ Metafield fidepay.plan_id (type Integer). Puis dans chaque produit (édition du produit en bas de page), renseigne le plan_id FidePay.

Pour la public_key globale : Settings → Custom data → Shop → ajoute Metafield fidepay.public_key (type Single line text) et colle ta clé.

5. Paiement ponctuel (panier classique)

Shopify a déjà sa propre passerelle de checkout. Pour ajouter FidePay comme option supplémentaire, le plus simple est un bouton "Pay with FidePay" sur la page panier :

<button type="button" id="fidepay-checkout-btn"
  style="margin-top:12px;width:100%;padding:14px;background:#ff4600;color:#fff;border:0;border-radius:10px;font-weight:600;">
  Payer avec FidePay ({{ cart.total_price | money }})
</button>

<script>
  document.getElementById("fidepay-checkout-btn").addEventListener("click", async function() {
    const fp = new Fidepay("{{ shop.metafields.fidepay.public_key }}");
    const session = await fp.create({
      amount: {{ cart.total_price | divided_by: 100.0 }},
      currency: "{{ cart.currency.iso_code }}",
      description: "Order {{ cart.token }}",
      allowedDomains: [location.origin],
      returnUrl: location.origin + "/pages/merci",
    });
    fp.checkout({
      sessionToken: session.sessionToken,
      mode: "overlay",
      onSuccess: function(data) { window.location.href = "/pages/merci?tnx=" + data.transactionRef; },
      onError: function(err) { alert("Erreur : " + err.message); },
    });
  });
</script>

6. Webhook IPN (côté Shopify Apps proxy ou backend custom)

Shopify ne sait pas recevoir directement les webhooks FidePay. Tu as 2 options :

  • App proxy Shopify : crée une mini app Shopify en Node.js qui expose /apps/fidepay/webhook, valide la signature HMAC, puis crée/met à jour des Orders Shopify via Admin API. Plus de doc sur shopify.dev/apps/app-proxies.
  • Backend externe : héberge un petit script (Vercel Function, Cloudflare Worker, Railway…) qui reçoit le webhook FidePay et appelle Shopify Admin API pour créer des commandes. Plus rapide à mettre en place.

Pour démarrer simple : laisse le webhook FidePay enregistrer juste les paiements côté FidePay (visibles dans ton dashboard merchant). Tu réconcilies manuellement avec les commandes Shopify. Pour le full automatique, prends le temps de coder l'app proxy.

Plugins CMS

Pour les marchands qui veulent encaisser sur leur site existant sans coder, on fournit des plugins prêts à installer.

WooCommerceFidePay for WooCommerce v1.0.0

Ajoute FidePay comme moyen de paiement WooCommerce. Couvre paiements ponctuels (Stripe, PawaPay, PayPal, Mollie) + abonnements récurrents (nécessite WooCommerce Subscriptions). Configuration via WP Admin.

↓ Télécharger ZIP
PrestaShopFidePay for PrestaShop v1.0.0

Module PrestaShop 1.7+ et 8.x. Ajoute FidePay comme moyen de paiement au checkout. One-shot uniquement pour l'instant (abonnements via lien partagé). Configuration via Back Office.

↓ Télécharger ZIP
Magento 2FidePay for Magento 2 v1.0.0

Module Magento 2.3+ et 2.4.x. Compatible Adobe Commerce. Installation via Composer ou ZIP manuel. One-shot uniquement pour l'instant (abonnements via lien partagé). Config dans Stores → Configuration → Payment Methods → FidePay.

↓ Télécharger ZIP

Installation

  1. Dans WP Admin : Plugins → Add New → Upload Plugin
  2. Sélectionne fidepay-for-woocommerce-1.0.0.zipInstallActivate
  3. Va dans WooCommerce → Settings → Payments → FidePay
  4. Renseigne ta Public Key et Secret Key
  5. Copie l'URL Webhook affichée et colle-la dans merchant.fide-pay.com/dashboard/subscriptions

Plugins prévus (bientôt)

  • Shopify (via Stripe Connect proxy)
  • Drupal Commerce

Le wallet de la diaspora, entre vos mains.

Téléchargez Fidepay aujourd'hui. Création de compte en 3 minutes, sans engagement.

FidePay