Dwolla Developers Logo
Back
API Reference
CommunityOpen in new tabChangelog
Get API Keys
CommunityOpen in new tabChangelog
JavaScript
Get API Keys

Create a funding source for a customer #

There are two methods available for adding a bank or credit union account to a Customer. You can either collect the Customer's bank account information and pass it to Dwolla via the Create a Customer Funding Source endpoint, or you can send the Customer through the the Instant Account Verification (IAV) flow which will add and verify a bank account within seconds.

Before a Dwolla account or Dwolla API Customer is eligible to transfer money from their bank or credit union account they need to verify ownership of the account, either via Instant Account Verification (IAV) or micro-deposits. For more information on bank account verification, reference this funding source verification resource article.

Customers can have a maximum of 2 active funding sources.

HTTP request #

POST https://api.dwolla.com/customers/{id}/funding-sources

Request parameters #

ParameterRequiredTypeDescription_linksnoobjectA _links JSON object containing an on-demand-authorization link relation. See example bash request and response below.routingNumberyesstringA bank routing number that identifies a bank or credit union in the U.S. Note: Validation of the routing number includes: a checksum, the first two digits of the routing number must fall within the range "01" through "12", or "21" through "32", and the string value must consist of nine digits.accountNumberyesstringThe bank account number. Note: The account number is validated to check if it is a numeric string of 4-17 digits.bankAccountTypeyesstringType of bank account: checking, savings, general-ledger or loan.nameyesstringArbitrary nickname for the funding source. Must be 50 characters or less.plaidTokennostringA processor token obtained from Plaid for adding and verifying a bank. Reference our Plaid Link developer guide to learn more about this integration.channelsnoarrayAn array containing a list of processing channels. ACH is the default processing channel for bank transfers. Acceptable value for channels is: "wire". e.g. “channels”: [ “wire” ]. A funding source (Bank Account) added using the wire channel only supports a funds transfer going to the bank account from a balance. As a result, wire as a destination funding source can only be added where the Customer account type is a Verified Customer. Note: channels is a premium feature that must be enabled on your account and is only available to select Dwolla customers.

HTTP status and error codes #

HTTP StatusCodeDescription400ValidationErrorCan be: Duplicate funding source or validation error. Authorization already associated to a funding source.403ForbiddenNot authorized to create funding source.

Request and response #

JavaScript
var customerUrl =
  "https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C";
var requestBody = {
  routingNumber: "222222226",
  accountNumber: "123456789",
  bankAccountType: "checking",
  name: "Jane Doe’s Checking",
};

dwolla
  .post(`${customerUrl}/funding-sources`, requestBody)
  .then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31'

Request and response - using on-demand authorization #

JavaScript
var customerUrl =
  "https://api-sandbox.dwolla.com/customers/AB443D36-3757-44C1-A1B4-29727FB3111C";
var requestBody = {
  _links: {
    "on-demand-authorization": {
      href:
        "https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388",
    },
  },
  routingNumber: "222222226",
  accountNumber: "123456789",
  bankAccountType: "checking",
  name: "Jane Doe’s Checking",
};

dwolla
  .post(`${customerUrl}/funding-sources`, requestBody)
  .then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31'

Test in the Sandbox for free today.

Use sandbox environment to test API requests.

Get API Keys
2022 All Rights Reserved

Dwolla

  • About
  • Blog
  • Pricing
  • Contact Sales
  • Terms of Service
  • Privacy Policy
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.