Neverending Prototype Mode

    basqet-checkout
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.8 • Public • Published

    Basqet SDK

    Basqet SDK is a library to be used on the client (browser) which would help load the Basqet Checkout in order to receive cryptocurrencies from users.

    How to install

    You can install via npm with:@quidax/basqet-checkout

    npm install @quidax/basqet-checkout
    

    Usage

    If you intalled the package via npm, you can use it like so:

    import payWithBasqet from '@quidax/basqet-checkout';
    
    payWithBasqet({
      amount: '5000',
      currency: 'NGN',
      email: 'john@doe.com',
      public_key: 'pk_test_123',
      name: 'John Doe', // optional
      description: 'Payment for Sofresh Parfait', //optional
      meta: { // any data (meta will be returned with every webhook response)
        transaction_reference: 'REF312532412' // sample payload
      }, //optional
      onSuccess: (ref) => {
        alert(`Transaction successful: ${ref}`);
      },
      onError: (error) => {
        alert(`Transaction failed ${error}`);
      },
      onClose: () => {
        alert('Checkout closed');
      },
    });

    But if you installed it via a CDN (like unpkg.com), a payWithBasqet method will be attached to the window object so you can use it this way:

    window.payWithBasqet({
      ...
    })

    Need help?

    If you have any questions, feel free to reach out to basqet-support@quidax.com

    Install

    npm i basqet-checkout

    DownloadsWeekly Downloads

    35

    Version

    0.1.8

    License

    none

    Unpacked Size

    48.1 kB

    Total Files

    14

    Last publish

    Collaborators

    • basqet