Docs
Get API Keys

Step 4: Handle JavaScript Callback #

The callback function (err, res) allows you to determine if there is an error with the request (e.g. Routing number invalid.) or if the response was successful. In the example above, we are displaying any error or response within a logs container on our page.

If there is an error: Display the error to the user to have them correct any fields, and have them re-attempt to add their bank.

Example:
json
{
  "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"
        }
      ]
    }
  }
}

If successful: You will receive a JSON response that includes a link to the newly attached funding source.

Example:
json
{
  "error": null,
  "response": {
    "_links": {
      "funding-source": {
        "href": "https://api-sandbox.dwolla.com/funding-sources/746d5c93-acb9-4826-a9c1-78ecf16401a6"
      }
    }
  }
}
Test in the Sandbox for free today.
Use sandbox environment to test API requests.
Get API Keys
2023 All Rights Reserved
Financial institutions play an important role in our network.

All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.