Accounts
Create a funding source for an account
Create a funding source by adding a bank account to a Main Dwolla Account. This endpoint allows you to connect a checking or savings account using either manual bank account details or an exchange resource.
For more information about funding sources, see the Funding Sources API Reference.
POST
/
funding-sources
cURL
POST https://api-sandbox.dwolla.com/funding-sources
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"routingNumber": "222222226",
"accountNumber": "123456789",
"bankAccountType": "checking",
"name": "My Bank"
}// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var requestBody = {
routingNumber: "222222226",
accountNumber: "123456789",
bankAccountType: "checking",
name: "My Bank",
};
dwolla
.post("funding-sources", requestBody)
.then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
request_body = {
'routingNumber': '222222226',
'accountNumber': '123456789',
'bankAccountType': 'checking',
'name': 'My Bank'
}
funding_source = app_token.post('funding-sources', request_body)
funding_source.headers['location'] # => 'https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$fundingApi = new DwollaSwagger\FundingsourcesApi($apiClient);
$fundingSource = $fundingApi->createFundingSource([
"routingNumber" => "222222226",
"accountNumber" => "123456789",
"bankAccountType" => "checking",
"name" => "My Bank"
]);
$fundingSource; # => "https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
request_body = {
routingNumber: '222222226',
accountNumber: '123456789',
bankAccountType: 'checking',
name: 'My Bank'
}
funding_source = app_token.post "funding-sources", request_body
funding_source.response_headers[:location] # => "https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3"
{
"code": "ValidationError",
"message": "Validation error(s) present. See embedded errors list for more details.",
"_embedded": {
"code": "ValidationError",
"message": "Validation error(s) present. See embedded errors list for more details."
}
}{
"code": "forbidden",
"message": "Not authorized to create funding source."
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
FlowClient Credentials
- Token URL
- /token
Headers
The media type of the response. Must be application/vnd.dwolla.v1.hal+json
Available options:
application/vnd.dwolla.v1.hal+json Body
application/json
Parameters for the funding source to be created
Response
successful operation
Was this page helpful?
⌘I
cURL
POST https://api-sandbox.dwolla.com/funding-sources
Content-Type: application/vnd.dwolla.v1.hal+json
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"routingNumber": "222222226",
"accountNumber": "123456789",
"bankAccountType": "checking",
"name": "My Bank"
}// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var requestBody = {
routingNumber: "222222226",
accountNumber: "123456789",
bankAccountType: "checking",
name: "My Bank",
};
dwolla
.post("funding-sources", requestBody)
.then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
request_body = {
'routingNumber': '222222226',
'accountNumber': '123456789',
'bankAccountType': 'checking',
'name': 'My Bank'
}
funding_source = app_token.post('funding-sources', request_body)
funding_source.headers['location'] # => 'https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$fundingApi = new DwollaSwagger\FundingsourcesApi($apiClient);
$fundingSource = $fundingApi->createFundingSource([
"routingNumber" => "222222226",
"accountNumber" => "123456789",
"bankAccountType" => "checking",
"name" => "My Bank"
]);
$fundingSource; # => "https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
request_body = {
routingNumber: '222222226',
accountNumber: '123456789',
bankAccountType: 'checking',
name: 'My Bank'
}
funding_source = app_token.post "funding-sources", request_body
funding_source.response_headers[:location] # => "https://api-sandbox.dwolla.com/funding-sources/04173e17-6398-4d36-a167-9d98c4b1f1c3"
{
"code": "ValidationError",
"message": "Validation error(s) present. See embedded errors list for more details.",
"_embedded": {
"code": "ValidationError",
"message": "Validation error(s) present. See embedded errors list for more details."
}
}{
"code": "forbidden",
"message": "Not authorized to create funding source."
}