1.1.0 • Published 12 months ago

@dieyne/wave-sn-api v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

WAVE API

Cette librairie a pour objectif de simplifier l'accès à l'API Wave.

Que contient cette librairie ?

  • Checkout API

    • Création d'un checkout, pour accepter les paiements.
    • Récupération d'un checkout.
    • Remboursement.
  • Wave Signature Validation : pour vérifier si les requêtes sur les webhooks proviennent du serveur Wave.

Installation

  npm i @dieyne/wave-sn-api

Exemple d'utilisation

import { WaveSnAPI } from '@dieyne/wave-sn-api';
import { CheckoutApi } from '@dieyne/wave-sn-api/dist/checkout';

export function ExampleCheckout(){
   // Initialisation de la lib en fournissant votre API KEY
   const waveSnApi = await WaveSnAPI.init("Your API KEY HERE");
   // Création d'une instance CheckoutApi
   const waveCheckout:CheckoutApi = waveSnApi.newCheckoutApi();
    
    // Create d'un nouvelle checkout 
    const result = await waveCheckout.createCheckoutSession({
      amount: '100',
      currency: 'XOF',
      error_url: 'https://www.toto.com?error=true',
      success_url: 'https://www.toto.com?success=true',
      client_reference: 'toto_reference',
    });
    console.log(result);
}
1.1.0

12 months ago

1.0.6

12 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago