Richard
(Peng)
March 21, 2019, 5:54am
1
I sent:
{“amount”:{“currency”:“USD”,“value”:“0.01”},"_links":{“destination”:{“href”:“https://api-sandbox.dwolla.com/funding-sources/524e1a62-017a-4409-ad27-577952b138f0"},“source”:{“href”:"https://api-sandbox.dwolla.com/accounts/a320cfe7-5d86-4582-80f9-4d273c162ace ”}}}
Response from sandbox:
{header=null, body={“code”:“BadRequest”,“message”:“The request body contains bad syntax or is incomplete.”}}
The request URL:
String transferUrl = "https://api-sandbox.dwolla.com/transfers
Anyone can help me to solve this problem?
Thanks a lot.
shreya
(Shreya | Developer Advocate @ Dwolla)
March 21, 2019, 4:33pm
2
Hi @Richard ,
Looks like it’s the double quotes in the request-body that is causing the issue. I tried calling the API with the above request, and it worked for me when I changed the quotation marks from “ ” to " ".
It is also best practice to use the the funding-source ID of the accounts when creating transfers, and not the account ID.
Here’s my request-body:
{
"amount": {
"currency": "USD",
"value": "0.01"
},
"_links": {
"destination": {
"href": "https://api-sandbox.dwolla.com/funding-sources/{{FundingSourceId}}"
},
"source": {
"href": "https://api-sandbox.dwolla.com/funding-sources/{{FundingSourceId}}"
}
}
}
Let me know if that works when you try it on your machine.