Language

Step 3: Retrieving 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:

  • A funding source to pull the funds from (your Customer’s linked bank funding source)
  • A funding source to push the funds to (your Dwolla Master Account’s linked bank funding source)

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

Step 3A: Retrieve your Customer’s list of available Funding Sources

In order to find your Customer’s available bank and balance funding sources, you will need to first retrieve the funding sources from your Customer, via the API.

Request and response (view schema in ‘raw’)

GET https://api-sandbox.dwolla.com/customers/4BB512E4-AD4D-4F7E-BFD0-A232007F21A1/funding-sources
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

{
    "_links": {
        "self": {
            "href": "https://api-sandbox.dwolla.com/customers/d8a443b3-c7b2-4a0a-86a2-0a03dfbca24c/funding-sources?removed=false",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
        },
        "customer": {
            "href": "https://api-sandbox.dwolla.com/customers/d8a443b3-c7b2-4a0a-86a2-0a03dfbca24c",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "customer"
        }
    },
    "_embedded": {
        "funding-sources": [
            {
                "_links": {
                    "transfer-from-balance": {
                        "href": "https://api-sandbox.dwolla.com/transfers",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "transfer"
                    },
                    "on-demand-authorization": {
                        "href": "https://api-sandbox.dwolla.com/on-demand-authorizations/df2dde3c-d194-e811-810d-97e8a429c2fb",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "on-demand-authorization"
                    },
                    "self": {
                        "href": "https://api-sandbox.dwolla.com/funding-sources/b7b3d4ef-8191-4c4b-bdec-b4bf719fbfa6",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "funding-source"
                    },
                    "transfer-to-balance": {
                        "href": "https://api-sandbox.dwolla.com/transfers",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "transfer"
                    },
                    "balance": {
                        "href": "https://api-sandbox.dwolla.com/funding-sources/b7b3d4ef-8191-4c4b-bdec-b4bf719fbfa6/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"
                    },
                    "remove": {
                        "href": "https://api-sandbox.dwolla.com/funding-sources/b7b3d4ef-8191-4c4b-bdec-b4bf719fbfa6",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "funding-source"
                    },
                    "customer": {
                        "href": "https://api-sandbox.dwolla.com/customers/d8a443b3-c7b2-4a0a-86a2-0a03dfbca24c",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "customer"
                    },
                    "transfer-receive": {
                        "href": "https://api-sandbox.dwolla.com/transfers",
                        "type": "application/vnd.dwolla.v1.hal+json",
                        "resource-type": "transfer"
                    }
                },
                "id": "b7b3d4ef-8191-4c4b-bdec-b4bf719fbfa6",
                "status": "verified",
                "type": "bank",
                "bankAccountType": "checking",
                "name": "Incomplete Account #1 - CHECKING",
                "created": "2018-07-31T14:51:41.000Z",
                "removed": false,
                "channels": [
                    "ach"
                ],
                "bankName": "SANDBOX TEST BANK",
                "iavAccountHolders": {
                    "selected": "account holder"
                }
            }
        ]
    }
}
<?php
$customerUrl = 'https://api-sandbox.dwolla.com/customers/5b29279d-6359-4c87-a318-e09095532733';

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

$fundingSources = $fsApi->getCustomerFundingSources($customerUrl);
$fundingSources->_embedded->{'funding-sources'}[0]->name; # => "Jane Doe’s Checking"
?>
# Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby
customer_url = 'https://api-sandbox.dwolla.com/customers/5b29279d-6359-4c87-a318-e09095532733'

funding_sources = app_token.get "#{customer_url}/funding-sources"
funding_sources._embedded['funding-sources'][0].name # => "Jane Doe’s Checking"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
customer_url = 'https://api-sandbox.dwolla.com/customers/5b29279d-6359-4c87-a318-e09095532733'

funding_sources = app_token.get('%s/funding-sources' % customer_url)
funding_sources.body['_embedded']['funding-sources'][0]['name'] # => 'Jane Doe’s Checking'
var customerUrl = 'https://api-sandbox.dwolla.com/customers/5b29279d-6359-4c87-a318-e09095532733';

appToken
  .get(`${customerUrl}/funding-sources`)
  .then(res => res.body._embedded['funding-sources'][0].name); // => 'Jane Doe’s Checking'

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

In order to find your Master Account’s available bank funding sources, you will need to first retrieve the funding sources from your Master Account, via the API. 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 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 end 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.