Balanced Payments for Node
npm install balanced
var balanced = api_secret marketplace_id//any inital account info - see documentation for all possible paramsaccount = email_address: 'firstname.lastname@example.org'balancedaccount
All methods take a callback as their last parameter, it's called with an error, if any, and the response body, if any.
.create(account, cb)- creates a new balanced account, takes bank/card info/tokens in options
.add_card(account_id, card_info_or_id, cb)- adds a card to their account
.debit(account_id, debit, cb)- debits the accounts card
.hold(account_id, hold, cb)- puts a hold on the accounts card
.add_bank(account_id, bank_info_or_id, cb)- adds a bank account to this account
.credit(account_id, credit, cb)- credits accounts bank account
.underwrite(account_id, underwriting_info, cb)- adds extra deatils for underwriting purposes
.get(account_id, cb)- returns account details
.transactions(account_id, cb)- returns object of recent credits and debits for the account
.accounts(cb)- get all of the marketplace's accounts
.debits(cb)- get all of the marketplace's debits
.credits(cb)- get all of the marketplace's credits
.refunds(cb)- get all of the marketplace's refunds
.holds(cb)- get all of the marketplace's holds
Install mocha with
npm install mocha -g, then run
Copyright (C) 2012 C. Jordan Muir
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.