Create customer 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.

POST

https://api.dwolla.comhttps://api-sandbox.dwolla.com

/customers/{id}/exchange-sessions

cURL

# Plaid Web Example
POST https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980/exchange-sessions
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"
    }
  }
}

# Plaid Android Example
POST https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980/exchange-sessions
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"
    },
    "redirect-url": {
      "href": "com.example.app123"
    }
  }
}

# Plaid iOS Example
POST https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980/exchange-sessions
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"
    },
    "redirect-url": {
      "href": "https://example.com/app123"
    }
  }
}

# MX Example
POST https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980/exchange-sessions
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/2164407f-33c3-4555-a6a1-40d5e9e58744"
    }
  }
}

# Checkout.com (Push to Card / debit card) Example
POST https://api-sandbox.dwolla.com/customers/bb0e1dc7-f2ea-4cca-b053-4049d49a1c0d/exchange-sessions
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer your_dwolla_access_token

{
  "_links": {
    "exchange-partner": {
      "href": "https://api-sandbox.dwolla.com/exchange-partners/d652517d-9c02-4ea4-87af-2977e6cf3850"
    }
  }
}

Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node

// Plaid Web Example
var customerUrl =
  "https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980";
var requestBodyPlaidWeb = {
  _links: {
    "exchange-partner": {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef",
    },
  },
};
dwolla
  .post(`${customerUrl}/exchange-sessions`, requestBodyPlaidWeb)
  .then((res) => res.headers.get("location"));
// Plaid Android Example
var requestBodyPlaidAndroid = {
  _links: {
    "exchange-partner": {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef",
    },
    "redirect-url": {
      href: "com.example.app123",
    },
  },
};
dwolla
  .post(`${customerUrl}/exchange-sessions`, requestBodyPlaidAndroid)
  .then((res) => res.headers.get("location"));
// Plaid iOS Example
var requestBodyPlaidIOS = {
  _links: {
    "exchange-partner": {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef",
    },
    "redirect-url": {
      href: "https://example.com/app123",
    },
  },
};
dwolla
  .post(`${customerUrl}/exchange-sessions`, requestBodyPlaidIOS)
  .then((res) => res.headers.get("location"));
// MX Example
var requestBodyMX = {
  _links: {
    "exchange-partner": {
      href: "https://api.dwolla.com/exchange-partners/2164407f-33c3-4555-a6a1-40d5e9e58744",
    },
  },
};
dwolla
  .post(`${customerUrl}/exchange-sessions`, requestBodyMX)
  .then((res) => res.headers.get("location"));

Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python

# Plaid Web Example
customer_url = 'https://api.dwolla.com/customer/74a207b2-b7b7-4efa-8bf8-582148e7b980'
request_body_plaid_web = {
  '_links': {
    'exchange-partner': {
      'href': 'https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef'
    }
  }
}
exchange = app_token.post('%s/exchange-sessions' % customer_url, request_body_plaid_web)
exchange.headers['location']
# Plaid Android Example
request_body_plaid_android = {
  '_links': {
    'exchange-partner': {
      'href': 'https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef'
    },
    'redirect-url': {
      'href': 'com.example.app123'
    }
  }
}
exchange = app_token.post('%s/exchange-sessions' % customer_url, request_body_plaid_android)
exchange.headers['location']
# Plaid iOS Example
request_body_plaid_ios = {
  '_links': {
    'exchange-partner': {
      'href': 'https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef'
    },
    'redirect-url': {
      'href': 'https://example.com/app123'
    }
  }
}
exchange = app_token.post('%s/exchange-sessions' % customer_url, request_body_plaid_ios)
exchange.headers['location']
# MX Example
request_body_mx = {
  '_links': {
    'exchange-partner': {
      'href': 'https://api.dwolla.com/exchange-partners/2164407f-33c3-4555-a6a1-40d5e9e58744'
    }
  }
}
exchange = app_token.post('%s/exchange-sessions' % customer_url, request_body_mx)
exchange.headers['location']

Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby

# Plaid Web Example
customer_url = 'https://api.dwolla.com/customers/74a207b2-b7b7-4efa-8bf8-582148e7b980'
request_body_plaid_web = {
  _links: {
    'exchange-partner': {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"
    }
  }
}
exchange = app_token.post "#{customer_url}/exchange-sessions", request_body_plaid_web
exchange.response_headers[:location]
# Plaid Android Example
request_body_plaid_android = {
  _links: {
    'exchange-partner': {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"
    },
    'redirect-url': {
      href: "com.example.app123"
    }
  }
}
exchange = app_token.post "#{customer_url}/exchange-sessions", request_body_plaid_android
exchange.response_headers[:location]
# Plaid iOS Example
request_body_plaid_ios = {
  _links: {
    'exchange-partner': {
      href: "https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef"
    },
    'redirect-url': {
      href: "https://example.com/app123"
    }
  }
}
exchange = app_token.post "#{customer_url}/exchange-sessions", request_body_plaid_ios
exchange.response_headers[:location]
# MX Example
request_body_mx = {
  _links: {
    'exchange-partner': {
      href: "https://api.dwolla.com/exchange-partners/2164407f-33c3-4555-a6a1-40d5e9e58744"
    }
  }
}
exchange = app_token.post "#{customer_url}/exchange-sessions", request_body_mx
exchange.response_headers[:location]

400

401

403

404

{
  "code": "ValidationError",
  "message": "/_links/exchange-partner/href is invalid"
}
{
  "code": "InvalidScope",
  "message": "Missing or invalid scopes for requested endpoint"
}
{
  "code": "forbidden",
  "message": "The exchange partner specified does not support this product"
}
{
  "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

default:application/vnd.dwolla.v1.hal+json

required

The media type of the response. Must be application/vnd.dwolla.v1.hal+json

Available options:

application/vnd.dwolla.v1.hal+json

Path Parameters

id

string

required

Customer's unique identifier

Body

application/vnd.dwolla.v1.hal+json

Parameters for creating an exchange session

Create exchange session with redirect URL (required for mobile sessions with Plaid)

Response

201

created