Create an exchange for a customer - Dwolla Developer Portal
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST
https://api.dwolla.comhttps://api-sandbox.dwolla.com
/customers/{id}/exchanges
cURL
POST https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980/exchanges
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
{
"_links": {
"exchange-partner": {
"href": "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"
}
},
"token": "somePlaidProcessorToken"
}
HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d
Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var customerUrl = "https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980";
var requestBody = {
_links: {
"exchange-partner": {
href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef",
},
},
token: "somePlaidProcessorToken",
};
dwolla.post(`${customerUrl}/exchanges`, requestBody).then((res) => res.headers.get("location")); // => 'https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d'
Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
customer_url = 'https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980'
request_body = {
'_links': {
'exchange-partner': {
'href': 'https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef'
}
},
'token': 'somePlaidProcessorToken'
}
exchange = app_token.post('%s/exchanges' % customer_url, request_body)
exchange.headers['location'] # => 'https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d'
Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$exchangesApi = new ExchangesApi($apiClient);
$customerUrl = "https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980";
$exchange = $exchangesApi->createCustomerExchange(new CreateExchangeRequest([\
"_links" => [\
"exchange-partner" => [\
"href" => "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"\
]\
],\
"token" => "somePlaidProcessorToken"\
]), $customerUrl);
$exchange; # => https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d
?>
Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
customer_url = 'https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980'
request_body = {
_links: {
'exchange-partner': {
href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"
}
},
token: 'somePlaidProcessorToken'
}
exchange = app_token.post "#{customer_url}/exchanges", request_body
exchange.response_headers[:location] # => "https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d"
Error Responses
{
"code": "InvalidExchangeToken",
"message": "Exchange token is expired."
}
{
"code": "InvalidExchangeToken",
"message": "The exchange token is not valid to perform this operation. Either the token is expired or invalid, or the products permissions to the token are invalid or expired."
}
{
"code": "NotFound",
"message": "The requested resource was not found."
}
Authorizations
Authorization
string
header
required
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Accept
enum
Path Parameters
id
string
required
The ID of the customer to create an exchange for
Body
application/vnd.dwolla.v1.hal+json
- CreateFinicitySecureExchange
- CreateTokenBasedExchange
- CreateMXOpenBankingExchange
- CreatePlaidOpenBankingExchange
Response
201
created