Language

Step 3: Retrieve funding sources

Now that you’ve created a Customer and associated its funding source, you are close to being able to initiate your first transfer. The transfer requires the following information:

  • The funding source to pull the funds from (a bank attached to your Dwolla Master Account)
  • The funding source to push the funds to (a bank attached to your created Customer)

Dwolla uses URLs to represent relations between resources. Therefore, you’ll need to provide the full URL of the funding source when creating the transfer.

Step 3A: Retrieve your Dwolla Master Account’s list of available Funding Sources

Use the list an account’s funding sources endpoint to fetch a list of your own funding sources. You’ll need your account URL which can be retrieved by calling the Root of the API.

Request and Response (view schema in raw)

GET https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources?removed=false
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

{
  "_links": {
    "self": {
      "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources"
    }
  },
  "_embedded": {
    "funding-sources": [
    {
          "_links": {
              "transfer-from-balance": {
                  "href": "https://api-sandbox.dwolla.com/transfers",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "transfer"
              },
              "self": {
                  "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "funding-source"
              },
              "remove": {
                  "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "funding-source"
              },
              "transfer-send": {
                  "href": "https://api-sandbox.dwolla.com/transfers",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "transfer"
              },
              "transfer-receive": {
                  "href": "https://api-sandbox.dwolla.com/transfers",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "transfer"
              },
              "account": {
                  "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "account"
              }
          },
          "id": "b5e68264-7d4d-42a9-88d4-5616c77c6baa",
          "status": "verified",
          "type": "bank",
          "bankAccountType": "checking",
          "name": "ABC Bank Checking",
          "created": "2019-03-14T15:18:51.336Z",
          "removed": false,
          "channels": [
              "ach"
          ],
          "bankName": "SANDBOX TEST BANK"
      },
      {
          "_links": {
              "self": {
                  "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "funding-source"
              },
              "balance": {
                  "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7/balance",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "balance"
              },
              "transfer-send": {
                  "href": "https://api-sandbox.dwolla.com/transfers",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "transfer"
              },
              "with-available-balance": {
                  "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "funding-source"
              },
              "transfer-receive": {
                  "href": "https://api-sandbox.dwolla.com/transfers",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "transfer"
              },
              "account": {
                  "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
                  "type": "application/vnd.dwolla.v1.hal+json",
                  "resource-type": "account"
              }
          },
          "id": "b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
          "status": "verified",
          "type": "balance",
          "name": "Balance",
          "created": "2014-07-09T20:39:33.000Z",
          "removed": false,
          "channels": []
      }
    ]
  }
}
account_url = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

# Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
funding_sources = app_token.get "#{account_url}/funding-sources?removed=false"
funding_sources._embedded['funding-sources'][0].name # => "ABC Bank Checking"
var accountUrl = 'https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

appToken
  .get(`${accountUrl}/funding-sources?removed=false`)
  .then(function(res) {
    res.body._embedded['funding-sources'][0].name; // => 'ABC Bank Checking'
  });
account_url = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
funding_sources = app_token.get('%s/funding-sources?removed=false' % account_url)
funding_sources.body['_embedded']['funding-sources'][0]['name'] # => 'ABC Bank Checking'
<?php
$accountUrl = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

$fsApi = new DwollaSwagger\FundingsourcesApi($apiClient);

$fundingSources = $fsApi->getAccountFundingSources($accountUrl, $removed = false);
# Access desired information in response object fields
print($fundingSources->_embedded) # => PHP associative array of _embedded contents in schema
?>

When the funding sources list is successfully retrieved, you will receive a 200 HTTP response with the details of each funding source. After retrieving your list of funding sources, we recommend storing the full URL for future use as it will be referenced when creating the transfer to your user’s bank account.

Step 3B: Fetch your Customer’s list of available funding sources

Use the list an Customer’s funding sources endpoint to fetch a list of your own funding sources. You’ll need the Customer URL which can be retrieved from the API.

Request and Response (view schema in raw)

GET https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

{
  "_links": {
    "self": {
      "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources"
    }
  },
  "_embedded": {
    "funding-sources": [
      {
        "_links": {
          "self": {
            "href": "https://api-sandbox.dwolla.com/funding-sources/0094b1b4-e171-4dc8-865b-cb121c2377bb"
          },
          "customer": {
            "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254"
          },
          "with-available-balance": {
            "href": "https://api-sandbox.dwolla.com/funding-sources/0094b1b4-e171-4dc8-865b-cb121c2377bb"
          }
        },
        "id": "0094b1b4-e171-4dc8-865b-cb121c2377bb",
        "status": "verified",
        "type": "balance",
        "name": "Balance",
        "created": "2013-09-07T14:42:52.000Z"
      },
      {
        "_links": {
          "self": {
            "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa"
          },
          "customer": {
            "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254"
          }
        },
        "id": "b5e68264-7d4d-42a9-88d4-5616c77c6baa",
        "status": "verified",
        "type": "bank",
        "name": "ABC Bank Checking",
        "created": "2014-09-04T23:19:19.543Z"
      }
    ]
  }
}
customer_url = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

# Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
funding_sources = app_token.get "#{customer_url}/funding-sources"
funding_sources._embedded['funding-sources'][0].name # => "ABC Bank Checking"
var customerUrl = 'https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

appToken
  .get(`${accountUrl}/funding-sources`)
  .then(function(res) {
    res.body._embedded['funding-sources'][0].name; // => 'ABC Bank Checking'
  });
customers_url = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
funding_sources = app_token.get('%s/funding-sources' % customer_url)
funding_sources.body['_embedded']['funding-sources'][0]['name'] # => 'ABC Bank Checking'
<?php
$customerUrl = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

$fsApi = new DwollaSwagger\FundingsourcesApi($apiClient);

$fundingSources = $fsApi->getCustomerFundingSources($customerUrl);
# Access desired information in response object fields
print($fundingSources->_embedded) # => PHP associative array of _embedded contents in schema
?>

When the funding sources are successfully retrieved, you will receive a 200 HTTP response with the details of the funding sources. After retrieving the funding sources, we recommend storing the full URL for future use as it will be referenced when creating the transfer to this user’s bank account.


Status
Production: Operational

Financial institutions play an important role in the Dwolla network.

Dwolla, Inc. is an agent of Veridian Credit Union and all funds associated with your account in our network are held in one or more pooled accounts at Veridian Credit Union. These funds may not be eligible for share insurance by the National Credit Union Share Insurance Fund. Dwolla, Inc. is the operator of a software platform that communicates user instructions for funds transfers to Veridian Credit Union.