Having trouble w/ Creating a Funding Source (Traditional Account)

(Rishi Bhat) #1


I’m new to the Dwolla API and am trying to get some basic functionality working in my company’s application. We are currently using the co-branded solution (Account).

I am able to authenticate using the oauth interface successfully, and subsequently have successfully managed to retrieve and list funding sources for an account. What is not working for me is creating a funding source. I have examined the data I’m sending over and over and it appears to be exactly in the same format as specified by: https://docsv2.dwolla.com/#create-a-funding-source-for-an-account

I have also verified that my access_token and so forth is valid. Here is the data I try to send, which returns a 400 error. This is my test data (starting w/ the headers), which is being sent via HTTP POST to: https://api-uat.dwolla.com/funding-sources (the sandbox app url)

Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer 6W8Kis3THqRN5Ezetp1botXzREmeCz7dA0DM4s9ARMRxnM8yxe
Content-Length: 91
Content-Type: application/vnd.dwolla.v1.hal+json


As far as I can tell, the data looks fine to me, yet I continue to get a 400 error. I’d be extremely grateful if someone could help out. The application is written in PHP, and I am interfacing directly with the API endpoints using cURL. As I said, I am able to authenticate and list funding sources successfully. Thanks!

(Spencer Hunter) #2

Hi @Rishi_Bhat, Sorry for the delay in response. It looks like we’ll return an error if we see that the routing number is invalid. We do validation on the routing number. The validation on the routing number includes a checksum, length must be 9 digits, and the first two numbers are checked to be in a certain range. If testing in our Sandbox, feel free to use the number 222222226 or any valid routing number that exists. If you check the response body you should see the following error response.

  "code": "ValidationError",
  "message": "Validation error(s) present. See embedded errors list for more details.",
  "_embedded": {
    "errors": [
        "code": "Invalid",
        "message": "Invalid parameter.",
        "path": "/routingNumber",
        "_links": {}

(Rishi Bhat) #3

thank you so much, Spencer, that worked =).

However, I should mention that when I was getting 400 errors, there was no content in the response body, at all. That was one of the reasons I had such a difficult time debugging this. In any event, thank you for your help!