Errors When Adding Bank Funding Sources in Sandbox


I am testing out Dwolla in sandbox mode and have successfully created a verified customer. I now am trying to test out adding a Bank Funding Source to that customer.

I am using the guide here for my code:

However, when I run the form, I get this message even if I put real bank information:

{"error":{"code":"ValidationError","message":"Validation error(s) present. See embedded errors list for more details.","_embedded":{"errors":[{"code":"Invalid","message":"Routing number invalid.","path":"/routingNumber"},{"code":"Invalid","message":"Account number invalid.","path":"/accountNumber"},{"code":"Invalid","message":"Type invalid.","path":"/type"},{"code":"Invalid","message":"Name invalid.","path":"/name"}]}}}

Do the values need to be certain test values since it is in sandbox mode?

Thank you

Hi @Matt_J !

I personally try to shy away from using real bank account information in the sandbox, but I can definitely help.

  1. Make sure that both the routing and account numbers are US Valid. The Dwolla API handles high level validation of those fields. Validation of the account number checks to see if the string passed in is between 4-17 characters (alphanumeric). Validation of the routing number includes: a checksum, length must be 9 digits, and the first two numbers are checked to be in a certain range.

You can use the same numbers found in our Postman collection for this endpoint to test
"routingNumber": "222222226"
"accountNumber": "123456789"

  1. If you are using real bank information certain accounts (like money market accounts) do not allow for ACH debit or creditsPlease let me know if this helped or if you are still experiencing and error. You can also include a snippet of your code.

Thank you for your reply. Using the numbers found in the Postman collection resulted in the same errors. Here is the code I am using:

Relevant head section:
<script src=""></script>

Relevant body section:


$params = array(
	'client_id' => 'REMOVED',
	'client_secret' => 'REMOVED',
	'grant_type' => 'client_credentials'
$token = json_decode(func_quick_curl('', '', $params))->access_token;
DwollaSwagger\Configuration::$access_token = $token;

$apiClient = new DwollaSwagger\ApiClient("");

$customer = "";

	<label>Routing number</label>
	<input type="text" id="routingNumber" value="222222226" />
	<label>Account number</label>
	<input type="text" id="accountNumber" placeholder="Account number" value="123456789" />
	<label>Bank account name</label>
	<input type="text" id="name" placeholder="Name" value="Capital One" />
	<select name="type" id="type">
	  <option value="checking">Checking</option>
	  <option value="savings">Savings</option>
	<input type="submit" value="Add Bank" />

<div id="logs"></div>

$customersApi = new DwollaSwagger\CustomersApi($apiClient);

$fsToken = $customersApi->createFundingSourcesTokenForCustomer($customer);

// Sandbox

  "<?php echo $fsToken->token;?>",
	routingNumber: $("routingNumber").val(),
	accountNumber: $("accountNumber").val(),
	type: $("type").val(),
	name: $("name").val(),
  function (err, res) {
	  "Error: " + JSON.stringify(err) + " -- Response: " + JSON.stringify(res)

$("form").on("submit", function () {
  var token = "<?php echo $fsToken->token;?>";
  var bankInfo = {
	routingNumber: $("routingNumber").val(),
	accountNumber: $("accountNumber").val(),
	type: $("type").val(),
	name: $("name").val(),
  dwolla.fundingSources.create(token, bankInfo, callback);
  return false;

function callback(err, res) {
  var $div = $("<div />");
  var logValue = {
	error: err,
	response: res,

Thank you for your assistance.

Hi @Matt_J ,

Apologies we missed this before. Not sure if you still need the hep, but we think the issue is with

Try $("#routingNumber") instead.

.val() off the inputs aren’t selecting what we want them to select - it needs the ID selector #