Ask AI or search...
Get API Keys

Create an exchange for a customer #

This section contains information on how to create an exchange for an end-user/Customer. The creation of an exchange serves as the “hand-shake” between Dwolla and a trusted ecosystem partner. The creation of an exchange requires a _link to the exchange partner and tokenized data which encapsulates limited permissioned access between an ecosystem partner and Dwolla.

HTTP request #

POST https://api.dwolla.com/customers/{id}/exchanges

Request parameters #

ParameterRequiredTypeDescription
_linksyesobjectA _links JSON object containing an exchange partner link. See example raw request and response below.
tokenconditionalstringA third party provider processor token. Required for MX, Flinks and Plaid integrations.
mxconditionalobjectContains an availableConnectionToken. The availableConnectionToken is tied to the Exchange Sessions API within Dwolla's Open Banking product. It is a unique identifier associated with each available exchange connection retrieved through the list available exchange connections endpoint.
finicityconditionalobjectFinicity resource object containing access key receipt information. Required for Mastercard integration. See finicity JSON object below (including nested product and accessPeriod JSON objects).

Finicity JSON Object #

ParameterTypeDescription
profileintegerInt value obtained by the party integrating with Finicity.
versionstringString value obtained by the party integrating with Finicity.
receiptIdstringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response.
receiptVersionstringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response.
customerIdstringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response.
partnerIdintegerInt value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response.
productsobjectArray of Finicity Product objects obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response.

Finicity product JSON Object

ParameterTypeDescription
productstringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response
accountIdstringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response
accessPeriodobjectFinicity Access Period objects obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response

Finicity accessPeriod JSON object

ParameterTypeDescription
typestringString value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response
startTimeintegerInt value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response
endTimeintegerInt value obtained by the party integrating with Finicity. From Finicity https://api.finicity.com/aggregation/v1/partners/accessKey response

HTTP status and error codes #

HTTP StatusCodeDescription
201CreatedThe Dwolla API accepted the request and created an exchange resource. You can reference the Location header to retrieve a link that represents the created exchange resource.
400ValidationErrorValidation error(s) present. See embedded errors list for more details.
401InvalidScopeMissing or invalid scopes for requested endpoint.
404NotFoundThe requested resource was not found.

Request and Response (MX) #

Raw
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/292317ec-e252-47d8-93c3-2d128e037aa4"
        }
    },
    "token": "someMXProcessorToken"
}

HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d

Request and Response (MX - Exchange Sessions API) #

Raw
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/bca8d065-49a5-475b-a6b4-509bc8504d22"
        }
    },
    "mx": {
        "availableConnectionToken": "eyJhY2NvdW50SWQiOiJBQ1QtMjAxY2FkM2MtYzc2Yi00N2M1LWI3Y2QtMTkxY2FhNzdlZWM5IiwibWVtYmVySWQiOiJNQlItZGNjZWY0ZWMtOGM4MC00NTlmLTlhMGItMTc1ZTA0OTJmZWIzIn0="
    }
}

HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d
Raw
POST https://api.dwolla.com/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/a0b22a57-68df-4450-b507-47c937e64e89"
        }
    },
    "token": "MTExYTFhMWEtMTExMS0xYWExLTExMTEtMTFhMTExYTExMTFhOjIyMmIyYjFiLTIyMjItMmJiMi0yMjIyLTIyYjIyMmIyMjIyYg=="
}

HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d

Request and Response (Mastercard) #

Raw
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/292317ec-e252-47d8-93c3-2d128e037aa4"
        }
    },
    "finicity": {
        "profile": 3,
        "version": "1",
        "receiptId": "cr_4N47ou7SlppuIxq0ZUtACh10vYcloY",
        "receiptVersion": "1",
        "customerId": "5454874858510164117",
        "partnerId": 2445583946651,
        "products": [
            {
                "product": "moneyTransferDetails",
                "accountId": "1015199035827334916",
                "accessPeriod": {
                    "type": "timeframe",
                    "startTime": "2022-07-06",
                    "endTime": "2022-08-16T06:06:20Z"
                }
            }
        ],
        "timestamp": "2022-07-11T06:06:23Z"
    }
}

HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d

Request and Response (Plaid) #

Raw
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/3aef60d1-878f-4692-8c06-c6b478efb60d"
        }
    },
    "token": "somePlaidProcessorToken"
}

HTTP/1.1 201 Created
Location: https://api.dwolla.com/exchanges/fcd15e5f-8d13-4570-a9b7-7fb49e55941d
Test in the Sandbox for free today.
Use sandbox environment to test API requests.
Get API Keys
2024 All Rights Reserved
Financial institutions play an important role in our network.

All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.