When a resource is created in Dwolla (i.e. HTTP status code 201 Created is returned), the response body will be empty. To grab the newly-created resource, you will want to grab the Location header instead. Then, once you have the Location URL, you can call a GET request on it to grab the resource information.
As an example, let’s say that your application sent the following request to Dwolla:
POST https://api-sandbox.dwolla.com/customers/15e8df87-0bda-4fc9-8395-780aabe9ed92/funding-sources
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer [YOUR OAUTH TOKEN HERE]
Content-Type: application/vnd.dwolla.v1.hal+json
{
"routingNumber": "222222226",
"accountNumber": "123456781",
"type": "checking",
"name": "Jane Doe - Checking"
}
...
HTTP/1.1 201 Created
Location: https://api-sandbox.dwolla.com/funding-sources/a72c694d-392e-4099-9872-d8fbbf1800a6
Now that you have the full URL for the created resource, you can execute a GET request on it:
GET https://api-sandbox.dwolla.com/funding-sources/a72c694d-392e-4099-9872-d8fbbf1800a6
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer [YOUR OAUTH TOKEN HERE]
Content-Type: application/vnd.dwolla.v1.hal+json
...
HTTP/1.1 200 OK
{
"_links": { ... },
"id": "a72c694d-392e-4099-9872-d8fbbf1800a6",
"status": "unverified",
"type": "bank",
"bankAccountType": "checking",
"name": "Jane Doe - Checking",
"created": "2022-06-23T18:23:57.300Z",
"removed": false,
"channels": [
"ach"
],
"bankName": "SANDBOX TEST BANK",
"fingerprint": "ea2f9562b698e1353d5c7e73b75dd5997de9a5329a7b7dd6f032a15352addec3"
}
For more information on these topics, I would recommend checking out our Developer Documentation on creating a new funding source for a customer and retrieving a funding source.
As for the error that you are seeing, when a funding source with the same account and routing number already exists and is active for the specified customer, you will be unable to create a new funding source using the same values. Instead, you will either have to remove the funding source and then re-add it. Additionally, since you are integrating Plaid, you can choose to pair with a new bank, which should provide a different routing number, or you can select another account, such as a savings account versus a checking, which should provide a different account number.