Retrieve exchange session - Dwolla Developer Portal
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GET
https://api.dwolla.comhttps://api-sandbox.dwolla.com
/exchange-sessions/{id} cURL
GET https://api.dwolla.com/exchange-sessions/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var exchangeSessionUrl =
"https://api.dwolla.com/exchange-sessions/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a";
dwolla
.get(exchangeSessionUrl)
.then((res) => res.body._links["external-provider-session"].href); // MX => redirect URL
// For Plaid: .then((res) => res.body.externalProviderSessionToken)
// For Checkout.com (Push to Card): .then((res) => res.body.externalProviderSessionData) // => { id, payment_session_secret, payment_session_token }
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
exchange_session_url = 'https://api.dwolla.com/exchange-sessions/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a'
exchange_session = app_token.get(exchange_session_url)
exchange_session.body['_links']['external-provider-session']['href'] # MX => redirect URL
# For Plaid: exchange_session.body['externalProviderSessionToken']
# For Checkout.com: exchange_session.body['externalProviderSessionData'] # => { id, payment_session_secret, payment_session_token }
/**
* No example for this language yet.
**/
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
exchange_session_url = 'https://api.dwolla.com/exchange-sessions/e5e9f2d3-a96c-4abd-a097-8ec7ae28aa8a'
exchange_session = app_token.get exchange_session_url
exchange_session['_links']['external-provider-session']['href'] # MX => redirect URL
# For Plaid: exchange_session['externalProviderSessionToken']
# For Checkout.com: exchange_session['externalProviderSessionData'] # => { id, payment_session_secret, payment_session_token }
Response
200
application/vnd.dwolla.v1.hal+json
successful operation
Details of a previously created exchange session. Response shape varies by exchange partner.
- MX: includes
_links.external-provider-session.href(redirect URL). - Plaid: includes
externalProviderSessionToken(Link initialization token). - Checkout.com: includes
externalProviderSessionData(payment session for Flow/debit card capture).
Example Response for 200:
{
"created": "2024-03-25T17:13:38.430Z",
"_links": {
"self": {
"href": "https://api.dwolla.com/exchange-sessions/9b7fb629-0fad-44f4-8c5e-44c25a0bfa8e",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "exchange-sessions"
},
"exchange-partner": {
"href": "https://api.dwolla.com/exchange-partners/bca8d065-49a5-475b-a6b4-509bc8504d22",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "exchange-partner"
},
"external-provider-session": {
"href": "https://www.mx.com/connect/lAfkc7m897s3t1ks9mmwyj4ry7Zq0xql4grzAg1kz77x7c9jrwls1t22w6xt8d2lsxx9zpqv30js3wswfdwcrpAsqgbAfkqwpksp7c2chsx167xy90Asfc67dkj9y48y8p142xw3yp4x5l9t9gkk6m3yk5vwsvyq2qq7w9trszxwdl14lmkg7l6949bn5n41chdkbnxycy40n9b6fkbdwl6qt5wl107k1x8srvlkpz325p412x9tkyA5clf39109lsfrgz2lkgsvntqf7l0zzwb5hl658gdjbxwhb52krwybnbdAqfq69cdy54l05jkvfwyf01q89x48jtgtx290lzjdfcty1lwb8d648wns/eyJ1aV9tZXNzYWdlX3ZlcnNpb24iOjQsInVpX21lc3NhZ2Vfd2Vidmlld191cmxfc2NoZW1lIjoibXgiLCJtb2RlIjoidmVyaWZpY2F0aW9uIn0%3D",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "text/html"
}
},
"externalProviderSessionToken": "link-production-b41e8ed3-0874-4c64-b07d-a77088979d5f",
"externalProviderSessionData": {
"id": "ps_39vhHjFxZuJRKOw5Hexbnv39fC7",
"payment_session_secret": "pss_2400dd88-171d-4a9c-bebf-e06b56d59bb6",
"payment_session_token": "YmFzZTY0:eyJpZCI6InBzXzM5dmhIakZ4WnVKUktPdzVIZXhibnYzOWZDNyIs..."
}
}
Error Responses:
403: Not authorized to retrieve exchange session.
{ "code": "forbidden", "message": "Not authorized to retrieve exchange session." }404: Exchange session not found.
{ "code": "notFound", "message": "Exchange session not found." }
Authorizations
Authorization
- Type:
string - Location:
header - Required: true
- Description: The access token received from the authorization server in the OAuth 2.0 flow.
Headers
- Accept
- Type:
enum<string> - Default:
application/vnd.dwolla.v1.hal+json - Required: true
- Description: The media type of the response. Must be application/vnd.dwolla.v1.hal+json
- Available options:
application/vnd.dwolla.v1.hal+json
- Type:
Path Parameters
- id
- Type:
string - Required: true
- Description: Exchange session's unique identifier.
- Type:
Response Structure
- created
- Type:
string<date-time> - Required: true
- Example:
"2024-03-25T17:13:38.430Z"
- Type:
- _links
- Type:
object - Required: true
- Type:
- externalProviderSessionToken
- Type:
string - Description: Present for Plaid exchange sessions; contains the token to initialize the Plaid Link flow.
- Example:
"link-production-b41e8ed3-0874-4c64-b07d-a77088979d5f"
- Type:
- externalProviderSessionData
- Type:
object - Description: Present for Checkout.com exchange sessions (Push to Card / debit card flow).
- Use these fields to initialize the Checkout.com Flow component for card capture.
- Type: