Issue Simulating Transfer Statuses in Dwolla Sandbox

I’m using the Dwolla Sandbox to simulate transfer statuses (created, pending, processed, failed) by passing sentinel values (e.g., 1.01, 1.02, 2.01, 9.99) in the amount field as documented. However, my transfer requests are still failing with a “BadRequest” error. Here’s a summary of the request payload I’m using:

{
  "amount": {
    "currency": "USD",
    "value": "1.01"
  },
  "_links": {
    "destination": { "href": "https://api-sandbox.dwolla.com/funding-sources/a4f72cc4-8a98-4392-b806-bb7c900a58c8" },
    "source": { "href": "https://api-sandbox.dwolla.com/funding-sources/mockSourceUrl" }
  }
}```

I expect this to trigger a transfer with a “created” status according to the sandbox documentation. However, the request fails with a “BadRequest” error. Could you please provide guidance on why this error occurs and how to correctly simulate transfer statuses in the sandbox?

Hi @buddy, Looking at the API logs, it appears that the variable “mockSourceUrl” in the “source” _link field is being passed as it. It needs to be replaced with the funding-source ID that is to be the source of the transfer.

Also, the sentinel values you are referring to only apply to Dwolla Connect. Were you looking to test Dwolla Connect or were you perhaps looking into using Dwolla Balance?

Thank you for your reply, Shreya. Based on our needs, Balance seems to be the best fit. So good to know that the sensible feature isn’t something we need to test for. As for source and destination IDs (not mocked) - this is a Plaid to Dwolla unit test failing, are ID required?

Yup! You don’t need to test for those transfer statuses with Dwolla Balance! :slight_smile:

Yes, a valid Dwolla funding-source ID is required in order to create a transfer. If the unit test failing for Plaid to Dwolla is something we can help with, please feel free to share what errors you might be encountering. We’ll help as much as we can!

Newbie question - Do I have to create customers (with funding sources) if I am using the Plaid integration?

All questions are valid! :slight_smile:

Yes – we require a Customer account created for every user who you wish to transact with using Dwolla. Our Customer Types documentation is a helpful resource for determining what type of Customer account best suits the needs of your user - Customer Types in the Dwolla API | Developer Tools | Dwolla

Let us know if you have any questions about that!

Ok, I’m creating a customer (I’ve confirmed) and I’m using that to find or create the funding. source. No issues until I try to use it when I initiate a transfer - Status: 400, Response: {“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,“_embedded”:{“errors”:[{“code”:“Invalid”,“message”:“Invalid funding source.”,“path”:“/_links/source/href”,“_links”:{}}]}}

Here’s some data from my test log:
2024-09-19T23:03:42.486-05:00 INFO 47786 — [ main] FundingSourceLogger : Existing funding source FundingSource(_links={transfer-from-balance=Link(href=https://api-sandbox.dwolla.com/transfers, resourceType=transfer), self=Link(href=https://api-sandbox.dwolla.com/funding-sources/e80fc0fa-f2e8-4dfe-b95b-15aefa6742e4, resourceType=funding-source), remove=Link(href=https://api-sandbox.dwolla.com/funding-sources/e80fc0fa-f2e8-4dfe-b95b-15aefa6742e4, resourceType=funding-source), initiate-micro-deposits=Link(href=https://api-sandbox.dwolla.com/funding-sources/e80fc0fa-f2e8-4dfe-b95b-15aefa6742e4/micro-deposits, resourceType=micro-deposits), customer=Link(href=https://api-sandbox.dwolla.com/customers/6d5e827a-8d5a-48f1-a270-a99b255a60a8, resourceType=customer), transfer-receive=Link(href=https://api-sandbox.dwolla.com/transfers, resourceType=transfer)}, id=e80fc0fa-f2e8-4dfe-b95b-15aefa6742e4, status=UNVERIFIED, type=BANK, bankAccountType=CHECKING, name=8gx3MNm6A1uEmmdAngKAtLP54QvqRKtW7NqV6, created=2024-09-20T03:13:39.813Z, balance=null, removed=false, channels=[ACH], bankName=SANDBOX TEST BANK, iavAccountHolders=null, fingerprint=13e00e9479aa5acecba149b14719679fd49ff7f69435856088797fc485a45b19) is valid for use.

Hi @buddy, while I see that the funding-source was added, it still needs to be verified before you can debit that funding-source. Check out our documentation on ways to verify a bank account - Bank Funding Source | Dwolla API Documentation

Are you looking to send funds to Customers or receive funds from them? Depending on your use case, you might not have to verify the bank account. If your customers are gonna be on the receiving end of funds, then their funding-source may remain “unverified”.

Check out these guides that might be helpful in determining which use case fits your needs the best -

Hope this helps!

Our setup involves customers sending money to an (ours) intermediary account, and from there, we pay other customers. We’re using Plaid for bank verification, so we’re not storing any banking info when it’s passed to Dwolla.

Our tech stack is React on the front end and Java on the back end, using the Dwolla Kotlin API for creating customers and funding sources. Transfers are handled via HTTP sockets. (note - we couldn’t figure out how to handle transfers with the API) Do we need to verify the funding source for this flow, or is the “unverified” status sufficient since the customers aren’t receiving the funds directly? If so, how do we ‘turn off’ the verification check?

Hi @buddy,

Since your use case also involves receiving funds from your users, their funding-sources need to be verified in order to be debited. This is a requirement and cannot be turned off, I’m afraid.

However, since you’re using Plaid for bank verification, you may use our Secure Exchange solution to send us the bank details that were verified by bank in order to attach a “verified” funding-source to your Dwolla customer accounts! Here’s out detailed guide on how to do so - Dwolla Balance: Integrate Secure Exchange with Plaid | Dwolla API Documentation

Once you attach a verified funding-source to your user’s account, you may use that funding-source as the “source” of the transaction.

Let us know if you have any questions about that!