Transfer Request is successful but I receive BadRequest response


(Luis Guerra) #1

Im testing paying via transfer with the following headers and body:

endPoint = "https://api.dwolla.com/transfers"
headers = [
“Authorization”: "Bearer " + self.tk,
“Accept”: “application/vnd.dwolla.v1.hal+json”,
“Content-Type”: “application/vnd.dwolla.v1.hal+json”
]

body
{
"_links" : {
“destination” : {
“href” : "mailto:lguerra10@gmail.com"
},
“source” : {
“href” : “https://api.dwolla.com/funding-sources/e0a0d1c1-e9a1-4b13-93be-e3f4f5f97ecd
}
},
“amount” : {
“currency” : “USD”,
“value” : “0.43”
}
}

The request is successful because I see it in the activity of my source account.The payment goes through, The source account gets its balance reduced by $0.44 and the recipient gets his balance increased by $0.43

but I get the following response
{
“message” : “The request body contains bad syntax or is incomplete.”,
“code” : “BadRequest”
}

the response is clearly mistaken, the transaction was successful.
How can this happen?


(Spencer Hunter) #2

@lguerra10, I am seeing several 400’s when attempting to initiate transfers from your app, however none of the request timestamps match up with the timestamps I see for created transactions. Im assuming there was a subsequent transaction after we returned an error response that was successful in creating a transaction. As an aside, I do want to mention that we have a fully functional Sandbox environment that can be used for testing sending transactions using our API.