Node JS SDK is released!

Payments in Node For Javascript lovers

We are pleased to announce the new Node JS SDK to join our lineup. This SDK is the latest addition to Beanstream’s suite of SDKs, rounding out the server-side toolset for developers. The SDK provides easy hooks to our APIs so you can:
  • make credit card payments
  • get payments
  • return or void payments
  • pre-authorize and capture payments
  • search payments
  • store payment information in secure payment profiles
  • tokenize payments
  • and much more
The SDK is released under the MIT license, so you can feel free to modify and use it as you please. If you find any bugs or want to make improvements, please do not hesitate to submit a pull request or post in the issue tracker on GitHub.

Install the SDK

The SDK is easy to install; with a few steps you can be up and running taking credit card payments from your customers.

Step 1) Install the module using NPM

Import the project directly from NPM: npm install beanstream-node

Step 2) Import the module to your project

var beanstream = require('beanstream-node')
('merchantId', 'Payments API key', 'Profiles API key', 'Reporting API key');

Supply your merchant ID, payments API Key, Profiles API key (optional), and Reporting API key (optional).

Step 3) Make a Payment

The Beanstream SDK uses promises to handle asynchronous calls to the server. You will get your results in a Promise object. Here is an example:
var tokenPayment = {
  order_number: 'order-abc1234',
     name:'John Doe',
    code: 'token-string',
    complete: true
    // successful payment
    console.log("Payment response: ", response);
    // all errors end up here, even declined payments
Nicole Stright

Nicole Stright

Nicole is our coffee dependent content specialist. With a quick-witted way with words, she could make you enjoy reading an instruction manual. She was born American, raised Canadian and has lived briefly in Poland. A quintessential west coastian she can be found running the seawall, practicing savasana in yoga or enjoying an over-hopped I.P.A. Nicole is responsible for all of the bean puns as well as creating compelling copy driven by analytics that converts. She strives to simplify the complicated and wants readers to easily understand the often convoluted industry of payments.
Nicole Stright