Returns all exchanges for a specific customer. Exchanges represent connections between the customer's external bank accounts and open banking partners. Includes exchange status, creation date, and links to associated funding sources and partners.
declare(strict_types=1);
require 'vendor/autoload.php';
use Dwolla;
use Dwolla\Models\Components;
$sdk = Dwolla\Dwolla::builder()
->setSecurity(
new Components\Security(
clientID: '<YOUR_CLIENT_ID_HERE>',
clientSecret: '<YOUR_CLIENT_SECRET_HERE>',
)
)
->build();
$response = $sdk->customers->exchanges->list(
id: '<id>'
);
if ($response->exchanges !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | ✔️ | The ID of the Customer to list exchanges for |
?Operations\ListCustomerExchangesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ListCustomerExchangesDwollaV1HalJSONException | 404 | application/vnd.dwolla.v1.hal+json |
| Errors\APIException | 4XX, 5XX | */* |
Creates an exchange connection between a customer and Dwolla. Request body varies by partner (Plaid, MX, Flinks, Finicity, Checkout.com). For bank accounts, use Plaid, MX, Flinks, or Finicity to establish secure access to the customer's bank account data. For debit cards (Push to Card), use Checkout.com and pass the payment ID from Checkout.com Flow.
declare(strict_types=1);
require 'vendor/autoload.php';
use Dwolla;
use Dwolla\Models\Components;
$sdk = Dwolla\Dwolla::builder()
->setSecurity(
new Components\Security(
clientID: '<YOUR_CLIENT_ID_HERE>',
clientSecret: '<YOUR_CLIENT_SECRET_HERE>',
)
)
->build();
$response = $sdk->customers->exchanges->create(
id: '<id>',
body: new Components\CreatePlaidOpenBankingExchange(
links: new Components\CreatePlaidOpenBankingExchangeLinks(
exchangePartner: new Components\CreatePlaidOpenBankingExchangeExchangePartner(
href: 'https://api.dwolla.com/exchange-partners/f53ffb32-c84f-496a-9d9d-acd100d396ef',
),
),
plaid: new Components\Plaid(
publicToken: 'public-production-d5456acb-01d5-4932-9783-e4c883cf1c0c',
),
)
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | ✔️ | The ID of the customer to create an exchange for |
body |
Components\CreateFinicitySecureExchange|Components\CreateTokenBasedExchange|Components\CreateMXOpenBankingExchange|Components\CreatePlaidOpenBankingExchange | ✔️ | N/A |
?Operations\CreateCustomerExchangeResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\InvalidExchangeTokenException | 400 | application/vnd.dwolla.v1.hal+json |
| Errors\InvalidExchangeException | 400 | application/vnd.dwolla.v1.hal+json |
| Errors\CreateCustomerExchangeResponseBodyException1 | 401 | application/vnd.dwolla.v1.hal+json |
| Errors\CreateCustomerExchangeResponseBodyException2 | 401 | application/vnd.dwolla.v1.hal+json |
| Errors\NotFoundError | 404 | application/vnd.dwolla.v1.hal+json |
| Errors\APIException | 4XX, 5XX | */* |