1.1.1 • Published 11 months ago

@dieyne/wave-sn-api v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
11 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.1

11 months ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago