New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

balanced-node-new

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balanced-node-new

Offical Balanced Payments API Client for node.js, https://www.balancedpayments.com/docs/api

  • 0.4.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Balanced Node.js library

Build Status

The official Node.js library for Balanced Payments. Written by uh-sem-blee, Co.

The Balanced Payments API located here: https://www.balancedpayments.com/docs/api.

Installation

The preferred way to install balanced for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:

npm install balanced-node-new

Testing

Set up your definitions: cp tests/definitions.sample.js tests/definitions.js

Edit the new definitions.js to contain your API secret, api_verion, and marketplace_uri (although marketplace_uri) is not used yet.

Run the tests: node tests/run

Make your own tests with simple JSON. Place them in tests/run/*.js

Basic Usage

var balanced = require('balanced-node-new');

balanced.init("API_SECRET", "MARKETPLACE_URI");

// Create a credit card
new balanced.card().create({
    card_number: "5105105105105100",
    expiration_year: 2020,
    expiration_month: 12,
    security_code: "123"
}, function (err, object) {
    if (err) {
        console.error("api.Cards.create", err);
        throw err;
    }
    myCard = object;
    console.log("Created new Card:", myCard.uri);
    next("api.Cards.create");
});

Customers

Customers are the best way to manage an entity's bank accounts, cards and transactions in the Balanced API and supersede the functionality previously provided by Accounts. Customers were created to simplify merchant underwriting so that you can accept money on a vendors behalf.

new balanced.customer().create({ name: "Valued Customer" }, function (err, newCustomer) {
    if (err) {
        console.error("customer.create", err);
        throw err;
    }
});

Which now allows us to do:

new balanced.customer(newCustomer.uri).add_bank({
  bank_account_uri: <bank_account_uri>
},  function(err, response){ ... })

In this API call we use the customer's URI on the customer object when calling the add_bank method with a JSON packet of required data.

Keywords

FAQs

Package last updated on 19 Sep 2013

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