After creating a transfer with facilitator fee, If I call fees API I get zero.
Request payload for create transfer API
{
"_links":{
"source":{
"href":"https://api-sandbox.dwolla.com/funding-sources/f84cb944-e060-484f-a517-67bca28d88e6"
},
"destination":{
"href":"https://api-sandbox.dwolla.com/funding-sources/6f0a81c3-1efe-4d0b-bf01-0638fb0fd2b6"
}
},
"correlationId":"33ac84070aa145099e46260654a31cb3",
"amount":{
"currency":"USD",
"value":11.79
},
"fees":[
{
"_links":{
"charge-to":{
"href":{
"href":"https://api-sandbox.dwolla.com/customers/07461cfd-5c99-48d2-9a79-161542cc685a"
}
}
},
"amount":{
"value":0.18,
"currency":"USD"
}
}
]
}
If I call list fees for a transfer API I get 0.
Fee API response
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/transfers/c0b6917f-8146-eb11-812b-eb1777c8247b/fees",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "fee"
}
},
"_embedded": {
"fees": []
},
"transactions": [],
"total": 0
}
@spencer Can you help me with this? Thanks.
Hi @spencer @shreya
Can you please help me with this issue? Thanks.
shreya
(Shreya | Developer Advocate @ Dwolla)
January 4, 2021, 7:06pm
5
Hi @PriyanshuJain –
It is likely due to the “fees” object not being formatted correctly -
Would you be able to change the "charge-to" object to the following and see if that works? -
"charge-to": {
"href":"https://api-sandbox.dwolla.com/customers/07461cfd-5c99-48d2-9a79-161542cc685a"
}
shreya
(Shreya | Developer Advocate @ Dwolla)
January 4, 2021, 7:07pm
6
Hi @Bohuslav_Simek – would you be able to share a request-id or the request-body for creating a transfer?
Yes, of course @shreya .
Request is virtually same as the official example on: https://developers.dwolla.com/concepts/facilitator-fee#charging-fees-on-transfers
Example:
$transferRequest = [
'_links' => [
'source' => [
'href' => 'https://api-sandbox.dwolla.com/funding-sources/6de9f494-c037-4618-a087-258c96937270',
],
'destination' => [
'href' => 'https://api-sandbox.dwolla.com/funding-sources/17da3f16-1df4-4af0-aefd-2fa964190b0f',
],
],
'amount' => [
'currency' => 'USD',
'value' => 29.7,
],
'fees' => [
'_links' => [
'charge-to' => [
'href' => 'https://api-sandbox.dwolla.com/customers/e4214545-6c5b-4875-9c51-dbc61cb244e1',
],
],
'amount' => [
'currency' => 'USD',
'value' => 0.3,
],
],
];
$transferApi = new \DwollaSwagger\TransfersApi($this->apiClient);
$transferId = $transferApi->create(
$transferRequest,
[
'Idempotency-Key' => $idempotencyKey,
]
);
Response:
https://api-sandbox.dwolla.com/transfers/eb4a00a1-c74e-eb11-812b-eb1777c8247b
After that I am not able to see any fees attached to transfer eb4a00a1-c74e-eb11-812b-eb1777c8247b in Dwolla dashboard (https://dashboard-sandbox.dwolla.com ) or by calling fee endpoint https://api-sandbox.dwolla.com/transfers/eb4a00a1-c74e-eb11-812b-eb1777c8247b/fees
Thank you in advance!
shreya
(Shreya | Developer Advocate @ Dwolla)
January 4, 2021, 11:15pm
8
Hi @Bohuslav_Simek – thanks for the request-body!
Looks like it’s how the fee object is formatted on this one as well. Would you be able to try replacing the above fee object with the following and seeing if that works? Notice the '[' brackets.
'fees' => [
[
'_links' => [
'charge-to' => [
'href' => 'https://api-sandbox.dwolla.com/customers/e4214545-6c5b-4875-9c51-dbc61cb244e1'
]
],
'amount' => [
'value' => '0.3',
'currency' => 'USD'
]
]
]
@shreya Many thanks. That was a bad mistake.
shreya
(Shreya | Developer Advocate @ Dwolla)
January 5, 2021, 3:15pm
10
No worries! Glad we were able to resolve this!
@shreya That was it, you 're a lifesaver, thank you!
1 Like