Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@buckaroo/buckaroo_sdk

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buckaroo/buckaroo_sdk

Buckaroo payment SDK

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
557
decreased by-18.57%
Maintainers
4
Weekly downloads
 
Created
Source

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.

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.

Need more examples?

More examples can be found in the examples folder

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.

Keywords

FAQs

Package last updated on 20 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc