🌊 NguePay SDK — Démo

Testez l'intégration NguePay en local

Intégration JS (recommandée)

Intégration data-attributes (sans JS)

Code d'intégration

<!-- 1. Charger le SDK -->
<script src="https://cdn.nguepay.com/sdk/nguepay.min.js"></script>

<!-- 2. Bouton de paiement -->
<button id="pay-btn">Payer 5 000 XOF</button>

<!-- 3. Initialiser -->
<script>
const nguepay = NguePay.init({
  publicKey : 'pk_live_VOTRE_CLE',
  amount    : 5000,       // en XOF
  reference : 'cmd_001',  // unique
  onSuccess : (data) => {
    console.log('Paiement reçu !', data);
  },
  onError   : (err) => {
    console.error('Erreur', err);
  }
});

document.getElementById('pay-btn')
  .addEventListener('click', () => nguepay.open());
</script>