Configuration options are available for utilizing dwolla.js in both our Sandbox and production environments. Configuration of an environment should take place after you have included the dwolla.js library.
// Sandbox
dwolla.configure("sandbox");
//Â Production
dwolla.configure("prod");
routingNumber
, accountNumber
, type
, and name
. See example below. routingNumber
represents a string value nine digit routing number. accountNumber
represents a string value account number. type
represents a string value of either checking
or savings
. name
represents a string value identifying name of the user's bank.dwolla.fundingSources.create(
"1zN400zyPUobbdmeNfhTGH2Jh5JkFREJa9YBI8SLXp0ERXNTMT",
{
routingNumber: document.getElementById("routingNumber").value,
accountNumber: document.getElementById("accountNumber").value,
type: document.getElementById("type").value,
name: document.getElementById("name").value,
},
function (err, res) {
console.log(
"Error: " + JSON.stringify(err) + " -- Response: " + JSON.stringify(res)
);
}
);
Assuming dwolla.js
is already included and configured on your page, you will create the function that will call dwolla.fundingSources.create()
. For this example, jQuery is used to call the function that creates a funding source when the user clicks the "Add Bank" button on your page. To test in the sandbox environment, use the dwolla.configure()
helper function and pass in the value of sandbox
.
In our example, dwolla.fundingSources.create()
takes three arguments: a string value of the funding sources token, JavaScript object containing bank account information entered by the user, and a callback function that will handle any error or response.
$("form").on("submit", function () {
dwolla.configure("sandbox");
var token = "Z9BvpNuSrsI7Ke1mcGmTT0EpwW34GSmDaYP09frCpeWdq46JUg";
var bankInfo = {
routingNumber: document.getElementById("routingNumber").value,
accountNumber: document.getElementById("accountNumber").value,
type: document.getElementById("type").value,
name: document.getElementById("name").value,
};
dwolla.fundingSources.create(token, bankInfo, callback);
return false;
});
function callback(err, res) {
var $div = $("<div />");
var logValue = {
error: err,
response: res,
};
$div.text(JSON.stringify(logValue));
console.log(logValue);
$("#logs").append($div);
}
Use sandbox environment to test API requests.
Dwolla, Inc. is the operator of a software platform that communicates user instructions for funds transfers to our financial institution partners.
Dwolla is an agent of Veridian Credit Union. All ACH and Wire transfers are performed by Veridian Credit Union. Your Dwolla Balance, if any, is held in one or more pooled holding accounts held by Veridian Credit Union. These funds may not be eligible for share insurance by the National Credit Union Share Insurance Fund.
Sponsorship and Settlement of Push-to-Debit payment services provided by MetaBank®, N.A.
Push-to-Debit payments are typically available within 30 minutes.
Real-Time Payments are performed by Cross River Bank, which holds funds on behalf of the Receiver of such transactions in one or more pooled custodial accounts. These funds are not subject to FDIC pass-through deposit insurance.