Language
Tools
Articles
Access API Articles
Try it out
require 'dwolla_v2'
$dwolla = DwollaV2::Client.new(id: ENV["DWOLLA_ID"], secret: ENV["DWOLLA_SECRET"]) do |config|
config.environment = :sandbox
end
account_token = $dwolla.tokens.new access_token: "GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N"
request_body = {
:_links => {
:source => {
:href => "https://api-sandbox.dwolla.com/funding-sources/118b08b9-e1eb-48b7-94ad-866989b0764e"
},
:destination => {
:href => "https://api-sandbox.dwolla.com/funding-sources/2fa64102-185d-443d-9001-dda9bc37651d"
}
},
:amount => {
:currency => "USD",
:value => "1.00"
}
}
transfer = account_token.post "transfers", request_body
transfer.headers[:location] # => "https://api-sandbox.dwolla.com/transfers/74c9129b-d14a-e511-80da-0aa34a9b2388"
var dwolla = require('dwolla-v2');
var client = new dwolla.Client({id: "...", secret: "..."});
var accountToken = new client.Token({access_token: "GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N"});
var requestBody = {
_links: {
source: {
href: 'https://api-sandbox.dwolla.com/funding-sources/118b08b9-e1eb-48b7-94ad-866989b0764e'
},
destination: {
href: 'https://api-sandbox.dwolla.com/funding-sources/2fa64102-185d-443d-9001-dda9bc37651d'
}
},
amount: {
currency: 'USD',
value: '1.00'
}
};
accountToken
.post('transfers', requestBody)
.then(function(res) {
res.headers.get('location'); // => 'https://api-sandbox.dwolla.com/transfers/74c9129b-d14a-e511-80da-0aa34a9b2388'
});
curl -X POST -H "Authorization: Bearer GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N" \ -H "Content-Type: application/vnd.dwolla.v1.hal+json" \ -H "Accept: application/vnd.dwolla.v1.hal+json" \ -d '{
"_links": {
"source": {
"href": "https://api-sandbox.dwolla.com/funding-sources/118b08b9-e1eb-48b7-94ad-866989b0764e"
},
"destination": {
"href": "https://api-sandbox.dwolla.com/funding-sources/2fa64102-185d-443d-9001-dda9bc37651d"
}
},
"amount": {
"currency": "USD",
"value": "1.00"
}
}' 'https://api-sandbox.dwolla.com/transfers' -v
import dwollav2
client = dwollav2.Client(
id = os.environ['DWOLLA_ID'],
secret = os.environ['DWOLLA_SECRET'],
environment = 'sandbox'
)
account_token = client.Token(access_token = 'GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N')
request_body = {
'_links': {
'source': {
'href': 'https://api-sandbox.dwolla.com/funding-sources/118b08b9-e1eb-48b7-94ad-866989b0764e'
},
'destination': {
'href': 'https://api-sandbox.dwolla.com/funding-sources/2fa64102-185d-443d-9001-dda9bc37651d'
}
},
'amount': {
'currency': 'USD',
'value': '1.00'
}
}
transfer = account_token.post('transfers', request_body)
transfer.headers['location'] # => 'https://api-sandbox.dwolla.com/transfers/74c9129b-d14a-e511-80da-0aa34a9b2388'
<?php
DwollaSwagger\Configuration::$auth_token = 'GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N';
$apiClient = new DwollaSwagger\ApiClient("https://api-sandbox.dwolla.com/");
$transfer_request = array (
'_links' =>
array (
'source' =>
array (
'href' => 'https://api-sandbox.dwolla.com/funding-sources/118b08b9-e1eb-48b7-94ad-866989b0764e',
),
'destination' =>
array (
'href' => 'https://api-sandbox.dwolla.com/funding-sources/2fa64102-185d-443d-9001-dda9bc37651d',
),
),
'amount' =>
array (
'currency' => 'USD',
'value' => '9.00',
),
);
$transferApi = new DwollaSwagger\TransfersApi($apiClient);
$myAccount = $transferApi->create($transfer_request);
print($xfer); # => https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388
?>