npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@buckaroo/buckaroo_sdk

v1.3.4

Published

Buckaroo payment SDK

Downloads

1,587

Readme

Node SDK

Latest release


Index


About

Buckaroo is the Payment Service Provider for all your online payments with more than 15,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. Buckaroo developed their own Node SDK. The SDK is a modern, open-source Node.js library that makes it easy to integrate your Javascript application with Buckaroo's services. Start accepting payments today with Buckaroo.

Requirements

To use the Buckaroo API client, the following things are required:

  • A Buckaroo account (Dutch or English)
  • Node.js 6.14.× or greater

Installation

npm install @buckaroo/buckaroo_sdk

Example

Initiate the buckaroo client with your website key and secret key. The keys can be retrieved from your Buckaroo account.

import Buckaroo from '@buckaroo/buckaroo_sdk';

const buckarooClient = Buckaroo.InitializeClient(
    {
        secretKey: 'KEY',
        websiteKey: 'SECRET',
    },
    {
        mode: 'TEST', // OR 'LIVE'
        currency: 'EUR',
        returnURL: 'RETURN_URL',
        pushURL: 'PUSH_URL',
    }
);

Create a payment with all the available payment methods. In this example, we show how to create a credit card payment. Each payment has a slightly different payload.

const payment = await buckarooClient
    .method('mastercard')
    .pay({
        amountDebit: 100,
    })
    .request();

After you create a transaction, you can retrieve several transaction information on demand.

const transaction = buckarooClient.transaction(payment.getTransactionKey());

await transaction.status(); // Retrieve transaction status
await transaction.refundInfo(); // Retrieve refund info
await transaction.cancelInfo(); // Retrieve cancellation info

Find our full documentation online on docs.buckaroo.io.

Need more examples?

More examples can be found in the examples folder


Regarding Usage Outside of Node.js

This library is written in JavaScript, a versatile programming language with broad applicability. While it's technically possible to integrate this library into a website or mobile application, it's strongly advised against doing so.

In the standard configuration, you make requests to the Buckaroo API using one of our provided libraries, typically from your server (such as a Node.js server). Your secret key is securely stored on this server, inaccessible to external entities.

However, if you incorporate this library directly into a website or app, your secret key will be exposed to users. This could enable users to take actions on your behalf using that key.


Contribute

We really appreciate it when developers contribute to improve the Buckaroo plugins. If you want to contribute as well, then please follow our Contribution Guidelines.


Versioning

  • MAJOR: Breaking changes that require additional testing/caution
  • MINOR: Changes that should not have a big impact
  • PATCHES: Bug and hotfixes only

Additional information

License

Buckaroo Node.js SDK is open-sourced software licensed under the MIT license.