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
{"routingNumber":"123456789","accountNumber":"0123456789","type":"checking","name":"rishi"}
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!
The Dwolla API will return an HTTP 400 error if we see that a 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, please use the test routing 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": {}
}
]
}
}
Cross-post here: https://discuss.dwolla.com/t/having-trouble-w-creating-a-funding-source-traditional-account/3803/2