1.4.0 • Published 9 years ago

balanced-official v1.4.0

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

Balanced Node.js library

Build Status

The official Node.js library for Balanced Payments.

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

v1.x requires Balanced API 1.1.

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-official

Basic Usage

var balanced = require('balanced-official');

balanced.configure('api-secret-key');

var customer = balanced.marketplace.customers.create();

var card = balanced.marketplace.cards.create({
	'number': '4111111111111111',
	'expiration_year': '2016',
	'expiration_month': '12',
	 'cvv': '123'
});

card.associate_to_customer(customer)
	.debit(5000)
	.then(function (debit) {
		// save the result of the debit
	}, function (err) {
		// record the error message
	});;

More examples

Testing

To run the tests in a terminal run

npm test

To run a specific test, you can do

node test/test.js [test name]
1.4.0

9 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.0

10 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago