Create a funding source for an account

This section details how to add a bank account to your main Dwolla Account. To add a bank account as a Funding Source, you provide the account number and a routing number along with the Treasury Account in relation to which you want to attach the bank account. Funding Sources are relational to a main Dwolla Account and have the ability to send and receive funds.

Treasury Accounts

A treasury account is a prerequisite to sending and receiving ACH transfers. It also identifies your business so Dwolla can connect with your banking partner. To learn how to create a treasury acccount, contact us.
In Dwolla’s Sandbox environment, your test account will be pre-configured with a fake Treasury Account and Funding Source (Bank Account) associated with that Treasury Account. Using the pre-configured Funding Source for sending and/or receiving ACH transfers is intended to reduce the time and effort required to get started integrating with the Dwolla Connect API. You can retrieve the Funding Source ID associated with the fake bank account by listing your account’s funding sources.

HTTP request

POST https://api.dwolla.com/funding-sources

Request parameters

HTTP status and error codes

HTTP StatusCodeMessage
400ValidationErrorDuplicate funding source or validation error.
403ForbiddenNot authorized to create funding source.

Request and response

POST https://api.dwolla.com/funding-sources
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer connect.eyJraWQiOiJPNVVOUVR0VHdDSXBcL0lsYnNlWldtdUFVZHJaVjFuU3lIYlVubkpwYW54WT0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzZ2I3dTQyMjFkb2RwYWYwdGNyM3VrZm04MSIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYnliLWFwaVwvZXh0ZXJuYWwtcGFydGllczpleGNoYW5nZXMuY3JlYXRlIGJ5Yi1hcGlcL2FjY291bnRzLnJlYWQgYnliLWFwaVwvZXhjaGFuZ2VzLmNyZWF0ZSBieWItYXBpXC9leHRlcm5hbC1wYXJ0aWVzLmNyZWF0ZSBieWItYXBpXC90cmFuc2ZlcnMuY3JlYXRlIGJ5Yi1hcGlcL2V4dGVybmFsLXBhcnRpZXM6ZXhjaGFuZ2VzLnJlYWQgYnliLWFwaVwvdHJlYXN1cnktYWNjb3VudHMucmVhZCBieWItYXBpXC90cmFuc2ZlcnMucmVhZCBieWItY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jFkb2RwYWYwdGNyM3VrZm04MSJ9.GxCWTNTih35m-ZZX6rjCVr3CAg_Y3u5n_xz4K3yZRPAmemvSniy5k0moBK-Dq534TyjGOIbi0iQyKKPoEip3YRpQLVrk7Bq5HwYZTgjwdxDbhIUe9LkgWXaVKDOVG-ufrMo7vwsDsfNYhLj70OpBZ2fS3Wnuog3875SeVPN2qlLGa6_vU_WsRCcRJw8Y8eWEttZeLZWm7j30s41ssJL8-Epwq7-__bDM3sFLcfQIADAxSHNPYqq9pACA3qrpCOlo17F8EVqSIT2MJrIrhsi8sT8Y9i1cScaoRZf7MWLJzbtnzOP2M7YDfoXxH9MqsABvcoRJaQoSMjDCgheu1h0clQ
{
  "_links": {
    "treasury-account": {
      "href": "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98"
    }
  },
  "name": "My Savings Bank",
  "bankAccountType": "savings",
  "accountNumber": "123456789",
  "routingNumber": "222222226"
}

...

HTTP/1.1 201 Created
Location: https://api.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3
/**
 * No example for this language yet.
 **/
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
request_body = {
  _links: {
    "treasury-account" => {
      href: "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98"
    }
  },
  name: "My Checking Bank",
  bankAccountType: "checking",
  accountNumber: "123456789",
  routingNumber: "222222226"
}

funding_source = app_token.post "funding-sources", request_body
funding_source.response_headers[:location] # => "https://api.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3"
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
request_body = {
  '_links': {
    'treasury-account': {
      'href': 'https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98'
    }
  },
  'name': 'My Checking Bank',
  'bankAccountType': 'checking',
  'accountNumber': '123456789',
  'routingNumber': '222222226'
}

funding_source = app_token.post('funding-sources', request_body)
funding_source.headers['location'] # => 'https://api.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var requestBody = {
  _links: {
    "treasury-account": {
      href: "https://api.dwolla.com/treasury-accounts/ea5f9468-4374-410f-b52e-5461d8cbca98",
    },
  },
  name: "My Savings Bank",
  bankAccountType: "savings",
  accountNumber: "123456789",
  routingNumber: "222222226",
};

dwolla
  .post("funding-sources", requestBody)
  .then((res) => res.headers.get("location")); // => 'https://api.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'