I want to test the Braintree Marketplace API in the sandbox mode. I have already created the sandbox account and using the node.js SDK.
I am referring the docs from here : https://developers.braintreepayments.com/guides/marketplace/onboarding/node
Below is my Node code :
app.get('/', function(req, res) {
merchantAccountParams = {
individual: {
firstName: "Jane",
lastName: "Doe",
email: "jane@14ladders.com",
phone: "5553334444",
dateOfBirth: "1981-11-19",
ssn: "456-45-4567",
address: {
streetAddress: "111 Main St",
locality: "Chicago",
region: "IL",
postalCode: "60622"
}
},
business: {
legalName: "Jane's Ladders",
dbaName: "Jane's Ladders",
taxId: "98-7654321",
address: {
streetAddress: "111 Main St",
locality: "Chicago",
region: "IL",
postalCode: "60622"
}
},
funding: {
descriptor: "Blue Ladders",
//destination: MerchantAccount.FundingDestination.Bank,
destination:"Demo Bank",
email: "funding@blueladders.com",
mobilePhone: "5555555555",
accountNumber: "1123581321",
routingNumber: "071101307"
},
tosAccepted: true,
masterMerchantAccountId: "14ladders_marketplace",
id: "blue_ladders_store"
};
gateway.merchantAccount.create(merchantAccountParams, function (err, result) {
res.send(result.success);
});
});
The above code always return false.I am wondering that can we even test this with the sandbox or not? or am i missing something ?
Anyone face this issue before please help.
Thank you.
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The destination parameter is not looking for the name of a bank, it is looking for a literal string that indicates if the account should be funded using a bank
, email
, or mobile_phone
. You can use these strings directly, but we suggest you use the constant references, because it makes the code cleaner and protects against future changes.
You can read more about the details of the different funding destination types in our guide and reference.