I found the mistake in the sample code given in the documentation. All I had to do was omit the /debits
from the uri in balanced.Accounts.get
call...
The following code works...
balanced.Accounts.get("/v1/marketplaces/TEST-MP60c88vnFHzgzEyzGcbMKic/accounts/AC1a77avbmVTUt8pciwDlMJW", function(err, result) {
var user = balanced.Accounts.nbalanced(result);
user.Debits.create({ amount: 1000 }, function(err, result) {
/* . . . */
});
});