{"id":19083960,"url":"https://github.com/floating/node_balanced","last_synced_at":"2025-04-30T08:55:20.242Z","repository":{"id":5719005,"uuid":"6930305","full_name":"floating/node_balanced","owner":"floating","description":"Balanced payments for Node!","archived":false,"fork":false,"pushed_at":"2023-04-21T14:52:34.000Z","size":192,"stargazers_count":14,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-12T01:04:46.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floating.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-29T23:21:07.000Z","updated_at":"2023-04-21T14:52:39.000Z","dependencies_parsed_at":"2022-08-06T19:00:47.732Z","dependency_job_id":null,"html_url":"https://github.com/floating/node_balanced","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floating%2Fnode_balanced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floating%2Fnode_balanced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floating%2Fnode_balanced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floating%2Fnode_balanced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floating","download_url":"https://codeload.github.com/floating/node_balanced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223780069,"owners_count":17201287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T02:49:35.880Z","updated_at":"2024-11-09T02:49:36.511Z","avatar_url":"https://github.com/floating.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#node_balanced\n\nThe [Balanced API](https://balancedpayments.com/docs/api) for Node.\n\n## Installation\n\n`npm install balanced`\n\n## Usage Overview\n```javascript\n\n  var balanced = require('balanced')(api_secret, marketplace_id)\n\n  //any inital account info - see documentation for all possible params\n  var account = {email_address: 'test@test.com'}\n\n  balanced.account.create(account, function(err, res){\n\n    //make sure there were no errors\n    if (err) { return console.log(err) }\n\n    //account created\n    console.log(\"account_id: \"+res.id)\n\n  })\n\n```\n\n## API\n\nAll methods take a callback as their last parameter, it's called with an error, if any, and the response body, if any.\n\n`cb = function(err, res){ //the response from balanced }`\n\n* `balanced`\n  * `.account`\n      * `.create(account, cb)` - creates a new balanced account, takes bank/card info/ids in options\n      * `.add_card(account_id, card_info_or_id, cb)` - adds a card to their account\n      * `.debit(account_id, debit, cb)` - debits the account's card\n      * `.hold(account_id, hold, cb) ` - puts a hold on the account's card\n      * `.add_bank(account_id, bank_info_or_id, cb)` - adds a bank account to this account\n      * `.credit(account_id, credit, cb)` - credits account's bank account\n      * `.underwrite(account_id, underwriting_info, cb)` - adds extra deatils for underwriting purposes\n      * `.get(account_id, cb)` - returns account details\n      * `.transactions(account_id, cb)` - returns object of credits and debits for the account\n  * `.marketplace`\n      * `.accounts(cb)` - get all of the marketplace's accounts\n      * `.debits(cb)` - get all of the marketplace's debits\n      * `.credits(cb)` - get all of the marketplace's credits\n      * `.refunds(cb)` - get all of the marketplace's refunds\n      * `.holds(cb)` - get all of the marketplace's holds\n\n## Tests\n\nInstall mocha with `npm install mocha -g`, then run `npm test`.\n\n## Author\n\nJordan Muir, development sponsored by [HashPay](https://hashpay.com/).\n\n## License\n\nCopyright (C) 2012 Jordan Muir\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloating%2Fnode_balanced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloating%2Fnode_balanced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloating%2Fnode_balanced/lists"}